You are on page 1of 696

6.

1
Quality
Analyst

User’s Manual

Northwest Analytical, Inc.


Portland, OR
NWA Quality Analyst
Version 6.1
©1997-2007
Northwest Analytical, Inc., Portland, Oregon
This manual and the accompanying computer software are copyrighted and may
not be copied by any means without the prior written consent of Northwest
Analytical, Inc. (NWA). Purchasers may only make copies for use on their system.
Users of NWA products are welcome to call NWA during normal business hours,
Pacific time.
Northwest Analytical, Inc.
Portland, OR
USA
TEL: (503) 224-7727
FAX: (503) 224-5236 (Sales)
FAX: (503) 248-1735 (Technical Support)

Windows, Microsoft Word, and Microsoft Excel are trademarks of Microsoft


Corporation.
NWA Quality Analyst is a registered trademark of Northwest Analytical, Inc.

(7316)
Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Contents at a Glance

CHAPTER 1
Introduction ..........................................................................................1
Overview of NWA Quality Analyst Features ........................................ 1
Background Knowledge Required ....................................................... 3
Typographical and Layout Conventions .............................................. 3
Technical Support................................................................................ 4

CHAPTER 2
Quality Analyst Files..............................................................................7
File Names ........................................................................................... 7
File Types and Their Extensions .......................................................... 7
Data File Structure ............................................................................ 15
Subgroup Types................................................................................. 17
Missing Data Handling....................................................................... 24
Tagged Data ...................................................................................... 26

CHAPTER 3
Creating and Editing Data Files...........................................................27
Opening an Existing Data File ........................................................... 28
Creating a New Data Set ................................................................... 29
Modifying the Data Structure and Display ........................................ 70
Editing Functions............................................................................... 73
The Data Menu .................................................................................. 90
Inserting Data from Another Data Set ............................................ 112
Saving a Data File............................................................................ 112
Printing Data ................................................................................... 113

CHAPTER 4
Selecting Variables........................................................................... 121
Selecting a Single Variable .............................................................. 121
Selecting Multiple Variables ............................................................ 123
Changing the Display Order ............................................................ 125

CHAPTER 5
SQC Charting and Analysis ............................................................... 126
Selecting a Variable First................................................................. 126
Selecting a Chart Type First ............................................................ 127
Variable Control Charts ................................................................... 128
Process Capability Charting and Analysis ....................................... 137
Attribute Control Charts .................................................................. 141
Pareto Diagrams.............................................................................. 144

Contents at a Glance • iii


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Analyzing Assignable Causes and Corrective Actions ..................... 148


Exception Reporting ........................................................................ 157
Other Charts .................................................................................... 166
Creating Short Run Charts .............................................................. 183
Saving Charts .................................................................................. 183

CHAPTER 6
Managing Charts with the Graphics Viewer .................................... 187
Running the Graphics Viewer Alone................................................ 188
Configuring the Graphics Viewer Interface..................................... 191
Individual Chart Windows............................................................... 192
Printing Charts and Text Reports .................................................... 194
Annotating Charts ........................................................................... 203
Viewing Chart Details ...................................................................... 206
Assigning Causes and Corrective Actions to Data Points ................ 217
Configuring the Appearance of Graphics and Text.......................... 220
Saving Charts and Reports .............................................................. 230
Dragging and Dropping ................................................................... 232
Copying Charts and Text Reports to Other Programs ..................... 233

CHAPTER 7
Customizing Charts .......................................................................... 236
System Parameters ......................................................................... 242
File Parameters ............................................................................... 278
Variable Parameters........................................................................ 283
Control Chart Parameters................................................................ 295
Process Capability (Histogram) Parameters ................................... 318
Capability Report Parameters ......................................................... 331
Box Plot Parameters........................................................................ 332
Pareto Parameters .......................................................................... 333
Short Run Parameters ..................................................................... 336

CHAPTER 8
General Statistical Analysis.............................................................. 338
Overview ......................................................................................... 338
One-way ANOVA.............................................................................. 340
Chi-square ....................................................................................... 344
Correlation....................................................................................... 349
Kruskal-Wallis Statistic ................................................................... 351
Descriptive Statistics....................................................................... 353
t-Statistics ....................................................................................... 356
Wald-Wolfowitz Runs Test .............................................................. 364
Regression Analysis......................................................................... 366

iv • Contents at a Glance
Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

CHAPTER 9
Automating Procedures with Run Files............................................ 384
Creating Run Files ........................................................................... 385
How Run Files Work ........................................................................ 385
Run File Commands and Parameters .............................................. 386
Replaceable Parameters.................................................................. 484
Creating Complete Task Sequences ................................................ 490
Creating Header Files from within Run Files ................................... 495
Executing Run Files ......................................................................... 496
Run File Errors................................................................................. 505
Using Older Run Files ...................................................................... 506

CHAPTER 10
Using External Data Files ................................................................. 510
Importing Data................................................................................ 510
Exporting Data to a Comma-Delimited File..................................... 521
Using the Clipboard with the Editor ................................................ 522

CHAPTER 11
Manipulating Data Files ................................................................... 530
Changing the Missing Data Symbol................................................. 530
Rotating a Data Set ......................................................................... 531
Converting Subgroups To or From a Single Column........................ 532
Extracting Subsets from a Data File ................................................ 536
Defining Calculations for Run files .................................................. 538

CHAPTER 12
Database Connectivity ..................................................................... 542
Overview ......................................................................................... 542
Before Using Connectivity ............................................................... 542
Defining Connectivity Data Sets...................................................... 543
Using Replaceable Parameters with Filter Criteria in SQL
Statements ...................................................................................... 573
Using Connectivity Data Sets .......................................................... 579
Modifying Connectivity Data Sets ................................................... 580
Using Database Connectivity in Run files........................................ 583
Configuring and Troubleshooting.................................................... 587
Getting Technical Support for Connectivity .................................... 599

APPENDIX A
Missing-Data Techniques in Control Charts..................................... 600
Missing Data with Rowwise Subgroups .......................................... 601
Missing Data with Columnwise Subgroups ..................................... 606

Contents at a Glance • v
Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

APPENDIX B
Alternative Statistical Calculation Methods..................................... 624
EPA Control Limits........................................................................... 624
Ford Process Capability Indices ...................................................... 625
Control Chart Limits Based on Probability ...................................... 626
Standard Deviation Calculation Methods ........................................ 627

APPENDIX C
The ASCII Standard.......................................................................... 630

APPENDIX D
Numeric Limits and Precision .......................................................... 632
Accuracy and Precision.................................................................... 632
Significant Digits ............................................................................. 632
Computational Considerations ........................................................ 633
Quality Analyst Internal Numeric Data Types ................................. 634

APPENDIX E
References........................................................................................ 635
Citations .......................................................................................... 635
Where to Buy Books ........................................................................ 638

APPENDIX F
Equations.......................................................................................... 640

INDEX
Index ................................................................................................ 663

vi • Contents at a Glance
Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Table of Contents

CHAPTER 1
Introduction ..........................................................................................1
Overview of NWA Quality Analyst Features ........................................ 1
Data and SQC Chart Management ....................................................... 1
Graphics Presentation and Management ............................................ 1
General Statistical Analysis ................................................................. 2
Run File Interpreter............................................................................. 2
SQC Chart Server ................................................................................. 2
Background Knowledge Required ....................................................... 3
Statistical Quality Control ................................................................... 3
The Windows Environment.................................................................. 3
Typographical and Layout Conventions .............................................. 3
Technical Support................................................................................ 4

CHAPTER 2
Quality Analyst Files..............................................................................7
File Names ........................................................................................... 7
File Types and Their Extensions .......................................................... 7
Data Sets.............................................................................................. 8
Data Files ............................................................................................8
Header Files ........................................................................................9
Managing Data Sets ............................................................................9
Graphics Files..................................................................................... 12
Run Files ............................................................................................ 12
Summary Files ................................................................................... 12
Definition Files................................................................................... 13
Entering File Names........................................................................... 13
Registered File Types......................................................................... 14
Data File Structure ............................................................................ 15
Subgroup Types................................................................................. 17
Rowwise Subgroups .......................................................................... 18
Columnwise Subgroups ..................................................................... 19
Moving-Average Subgroups .............................................................. 21
Variable-Size Subgroups ................................................................... 23
Missing Data Handling....................................................................... 24
User-Defined Missing Data Symbols ................................................. 24
Missing-Data Techniques................................................................... 25
Tagged Data ...................................................................................... 26

CHAPTER 3
Creating and Editing Data Files...........................................................27
Opening an Existing Data File ........................................................... 28
Creating a New Data Set ................................................................... 29

Table of Contents • vii


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Data Structure Editing Functions ...................................................... 31


Moving Around in the Grid ................................................................31
Modifying the Definition....................................................................32
Inserting, Deleting, and Moving Variables ........................................35
Specifying Variable Definition and Specifications............................. 35
Variable Name...................................................................................36
Data Type ..........................................................................................37
Description ........................................................................................46
Lower, Upper, and Target Specifications...........................................46
Reading Specifications from a Database...........................................46
Other Variable-Definition Parameters...............................................55
Specifying Key Columns for the Data Set ..........................................57
Specifying Lists of Assignable Causes and Corrective Actions ..........59
Printing and Saving the Data Definition ........................................... 60
Specifying Column Definition and Calculations ................................ 61
Variable Name and Data Type ...........................................................62
Defining Calculated Variables ...........................................................62
Rearranging Data Columns ...............................................................69
Printing and Saving the Data Definition ........................................... 69
Modifying the Data Structure and Display ........................................ 70
Variable Definition and Specifications .............................................. 71
Column Definition and Calculations .................................................. 72
Editing Functions............................................................................... 73
Selecting a Font for the Editor........................................................... 73
Configuring the Toolbar..................................................................... 74
Moving Around in the Data Grid ........................................................ 75
Choosing Cursor Mode ......................................................................76
Moving to a Specific Data Cell ...........................................................77
Modifying Data .................................................................................. 78
Copying and Pasting Data ................................................................. 79
Entering Missing Data........................................................................ 80
Inserting and Deleting Rows............................................................. 80
Tagging Data...................................................................................... 81
Tagging Individual Values.................................................................81
Tagging Rows of Data .......................................................................82
Tagging Specific Data Using Autotag ................................................84
Removing Tags..................................................................................85
Finding and Replacing Data............................................................... 85
Overriding an Input Mask.................................................................. 87
Freezing Columns .............................................................................. 87
Automating Data Entry Using Autocopy............................................ 89
The Data Menu .................................................................................. 90
Filtering Data ..................................................................................... 90
Specifying a Filter .............................................................................91
Filtering on a DateTime Variable.......................................................92
Multiple Filters ..................................................................................95
Removing a Filter ..............................................................................97
Using Data Filters ..............................................................................97
Saving Filtered Data..........................................................................98
Recalculating Data............................................................................. 98

viii • Table of Contents


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Sorting Data....................................................................................... 98
Verifying Data .................................................................................. 100
Generating Random Numbers ......................................................... 101
Entering Data Using DDE ................................................................. 102
Dynamic Data Exchange—The Basics ..............................................102
How Quality Analyst Handles DDE Data ..........................................103
Configuring a DDE Connection ........................................................104
Customizing a DDE Connection .......................................................108
Closing a DDE Connection ...............................................................109
A DDE Example................................................................................109
Inserting Data from Another Data Set ............................................ 112
Saving a Data File............................................................................ 112
Printing Data ................................................................................... 113
Printing a Data Listing..................................................................... 113
Printing a Formatted Report ........................................................... 115
Selecting a Report Format ..............................................................115
Specifying a Report Format.............................................................116

CHAPTER 4
Selecting Variables........................................................................... 121
Selecting a Single Variable .............................................................. 121
Selecting Multiple Variables ............................................................ 123
Changing the Display Order ............................................................ 125
List By .............................................................................................. 125
Sort By Name ................................................................................... 125

CHAPTER 5
SQC Charting and Analysis ............................................................... 126
Selecting a Variable First................................................................. 126
Selecting a Chart Type First ............................................................ 127
Variable Control Charts ................................................................... 128
Creating Variable Control Charts..................................................... 128
Specifying Sample Size.................................................................... 129
Creating Cumulative Sum Charts .................................................... 130
Gallery of Variable Control Charts................................................... 131
Process Capability Charting and Analysis ....................................... 137
Process Capability Histogram.......................................................... 137
Process Capability Report................................................................ 137
Selecting Statistics and Display Codes ............................................139
Breakdown ......................................................................................139
Output Type ....................................................................................140
Attribute Control Charts .................................................................. 141
Pareto Diagrams.............................................................................. 144
Multiple Variables ............................................................................ 145
Single Variable................................................................................. 146
Analyzing Assignable Causes and Corrective Actions ..................... 148
Creating a Report of Assignable Causes and Corrective Actions .... 149
Charting Assignable Causes and Corrective Actions ....................... 152

Table of Contents • ix
Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Saving Assignable Causes and Corrective Actions to a Data File ... 155
Exception Reporting ........................................................................ 157
Creating an Exception Definition File.............................................. 158
Generating an Exception Report ..................................................... 160
Using an Exception Report .............................................................. 161
Viewing Exception Details...............................................................161
Charting Exception Data .................................................................162
Saving an Exception Report to a File...............................................163
Printing an Exception Report ..........................................................165
Other Charts .................................................................................... 166
Run Chart......................................................................................... 166
Scatter Diagram............................................................................... 169
Normal Probability Plot ................................................................... 171
Quantile Plot .................................................................................... 172
Weibull Analysis............................................................................... 174
Background .....................................................................................174
Weibull Distribution ........................................................................174
Exponential Distribution .................................................................175
Data Requirements .........................................................................175
Performing a Weibull Analysis ........................................................176
Using Weibull with Large Data Sets ................................................178
Box Plots .......................................................................................... 179
Selecting Variables..........................................................................180
Selecting Statistics ..........................................................................181
Breakdown ......................................................................................182
Box Type .........................................................................................182
Units ................................................................................................182
Creating Short Run Charts .............................................................. 183
Saving Charts .................................................................................. 183
Assigning Permanent File Names .................................................... 184
Viewing Graphics Files..................................................................... 185
Changing Your Mind ........................................................................ 185
Saving the Files................................................................................ 185

CHAPTER 6
Managing Charts with the Graphics Viewer .................................... 187
Running the Graphics Viewer Alone................................................ 188
Configuring the Graphics Viewer Interface..................................... 191
Individual Chart Windows............................................................... 192
Switching Between Chart Windows ................................................ 192
Arranging Multiple Chart Windows ................................................. 192
Minimizing Chart Windows.............................................................. 193
Printing Charts and Text Reports .................................................... 194
Configuring the Layout of Printed Charts and Reports................... 195
Single Charts or Text Reports ......................................................... 195
Group Layout ................................................................................... 196
Display the Charts ...........................................................................196
Create a Group Layout Window ......................................................197
Assemble the Layout .......................................................................198

x • Table of Contents
Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Formatting the Group Layout ..........................................................200


Printing the Group Layout...............................................................201
Previewing Printed Output .............................................................. 201
Annotating Charts ........................................................................... 203
Modifying Chart Titles ..................................................................... 203
Working with Graphics Comments.................................................. 204
Adding Graphics Comments ............................................................204
Moving Comments...........................................................................205
Editing or Deleting Graphics Comments..........................................205
Modifying Chart Footers .................................................................. 205
Viewing Chart Details ...................................................................... 206
Using the Detail Window ................................................................. 207
Specifying the Content of the Detail Window .................................207
Displaying the Detail Window .........................................................208
Working with the Detail Window ....................................................209
Working with Callouts ..................................................................... 210
Specifying the Content of Callouts ..................................................211
Adding Callouts to Data Points........................................................212
Removing Callouts from a Chart .....................................................213
Zooming in on Charts ...................................................................... 214
Assigning Causes and Corrective Actions to Data Points ................ 217
Configuring the Appearance of Graphics and Text.......................... 220
Specifying Colors and Line Thicknesses .......................................... 220
Configuring the General Appearance of Charts ...............................221
Bar Fill .............................................................................................222
Background Color for Callouts.........................................................222
Configuring the Appearance of Control Charts................................223
Configuring Colors for Other Charts................................................224
Configuring the Appearance of Text Reports ..................................224
Specifying Fonts .............................................................................. 225
Specifying Plotting Characters ........................................................ 226
Specifying Advanced Graphics Options ........................................... 228
Specifying JPEG Quality ..................................................................228
Specifying Decimal Symbol .............................................................228
Including the Variable Name in the Window Title...........................229
Wrapping Date and Time on the X Axis ...........................................229
Including a Border on Printed Charts..............................................230
Saving Charts and Reports .............................................................. 230
Dragging and Dropping ................................................................... 232
Copying Charts and Text Reports to Other Programs ..................... 233

CHAPTER 7
Customizing Charts .......................................................................... 236
System Parameters ......................................................................... 242
General............................................................................................. 246
Title for Graphics and Reports.........................................................246
Date Format ....................................................................................248
Run File Error Handling ...................................................................248
Text Settings ...................................................................................249
Report Date.....................................................................................249

Table of Contents • xi
Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Decimal Symbol...............................................................................249
Time Delimiter.................................................................................249
Plotting Characters .........................................................................250
Limits and Specifications................................................................. 250
Limits and Specifications.................................................................251
Rainbow Zones................................................................................252
Chart Parameters............................................................................. 253
Calculation Methods for Charts .......................................................254
Basis of Control Limit Calculations..................................................255
Control Limit Adjustment for Subgroup Size...................................255
Pattern Rules ................................................................................... 256
Overview .........................................................................................256
Specifying Pattern Rules .................................................................258
Defining New Pattern Rules ............................................................259
Changing Pattern Rules...................................................................262
Deleting Pattern Rules ....................................................................262
Histogram Statistics ........................................................................ 262
Number of Footer Lines...................................................................263
Selecting Statistics ..........................................................................264
Capability Parameters ..................................................................... 266
Standard Deviation Calculation Method..........................................267
Capability Index Calculation Assumptions ......................................267
Sigma Factor ...................................................................................268
Confidence Limits............................................................................268
Calculated Bar Location ..................................................................268
File Paths and Permissions .............................................................. 269
Missing and Tagged Data ................................................................ 271
Tagged Data Mode ..........................................................................271
Missing Data Mode ..........................................................................272
Missing Data Symbol .......................................................................272
Box Plot and Capability Report ....................................................... 272
Capability Report Statistics.............................................................273
Box Plot Statistics ...........................................................................274
Box Plot Type ..................................................................................274
Box Plot Units..................................................................................274
External Database ........................................................................... 275
Assignable Cause Corrective Action ................................................ 275
Overview of Assignable Causes and Corrective Actions ..................275
Defining Lists of Assignable Causes and Corrective Actions ...........276
File Parameters ............................................................................... 278
File Title ........................................................................................... 278
File Range ........................................................................................ 279
Description Variables....................................................................... 279
X-Axis Description Variables ........................................................... 281
Maximum Variables on X Axis .........................................................281
Characters per Variable...................................................................281
Show Minor Tick Marks ...................................................................282
Display Interval...............................................................................282
Variable Parameters........................................................................ 283
Variable............................................................................................ 284
Data Ranges..................................................................................... 284

xii • Table of Contents


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Analysis and Display Range.............................................................285


Control Limit Recalculation Range ..................................................286
Missing and Tagged Data ................................................................ 286
Missing Data Handling ....................................................................287
Tagged Data Handling.....................................................................287
Subgroup/Sample Size and Type .................................................... 287
Subgroup Size and Type–Variable Data ..........................................288
Sample Size–Attribute Data ............................................................290
Control Limit Adjustments ..............................................................291
Graphics Comments......................................................................... 292
Other ................................................................................................ 293
Set Process Parameters ..................................................................293
Description Variables....................................................................... 294
Control Chart Parameters................................................................ 295
Scale................................................................................................. 297
Center Line and Limits..................................................................... 298
Specifying Center Line and Limits ...................................................301
Defining Regions .............................................................................304
Default Chart Limits......................................................................... 307
Chart Types .....................................................................................308
Specifying Warning and Inner Limits ..............................................308
Plotting Characters.......................................................................... 309
Plotting Individual Measurements ..................................................309
Plotting Characters .........................................................................313
Cumulative Sum............................................................................... 314
Type of CUSUM................................................................................314
V-mask Design ................................................................................315
Set Process Parameters ..................................................................315
CUSUM Protractor ...........................................................................316
Other ................................................................................................ 316
Use Pattern Rules............................................................................317
Show Rainbow Zones on Charts ......................................................317
p-chart Units ...................................................................................317
u-chart Units ...................................................................................318
Show Target or Specifications on Charts ........................................318
Exponentially Weighted Moving Average........................................318
Process Capability (Histogram) Parameters ................................... 318
Histogram Statistics ........................................................................ 320
Default Statistics.............................................................................320
Number of Footer Lines...................................................................321
Selecting Statistics ..........................................................................321
Histogram Parameters..................................................................... 323
Histogram Bars................................................................................324
Calculated Bar Location ..................................................................325
Additional Limits .............................................................................325
Features Displayed..........................................................................325
Probability Distribution ...................................................................326
Histogram Scale............................................................................... 326
Process Capability Calculation ........................................................ 328
Standard Deviation Calculation Method..........................................329
Capability Index Calculation Assumptions ......................................329

Table of Contents • xiii


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Confidence Limits............................................................................330
Capability Report Parameters ......................................................... 331
Default Variables ............................................................................. 331
Breakdown Defaults ........................................................................ 331
Box Plot Parameters........................................................................ 332
Default Variables ............................................................................. 333
Breakdown Defaults ........................................................................ 333
Pareto Parameters .......................................................................... 333
Pareto Format .................................................................................. 334
File Range (Multiple Variable Pareto only) ..................................... 335
Multiple Variable Pareto .................................................................. 335
Short Run Parameters ..................................................................... 336

CHAPTER 8
General Statistical Analysis.............................................................. 338
Overview ......................................................................................... 338
General Procedure ........................................................................... 339
Output of Statistics Routines .......................................................... 339
One-way ANOVA.............................................................................. 340
Completely Randomized .................................................................. 340
Randomized Block Design ............................................................... 342
Chi-square ....................................................................................... 344
Bartlett’s Chi-square Statistic ......................................................... 345
Difference Among Proportions ........................................................ 346
Equal Expected Frequencies ............................................................ 347
Unequal Expected Frequencies........................................................ 348
Correlation....................................................................................... 349
Kruskal-Wallis Statistic ................................................................... 351
Descriptive Statistics....................................................................... 353
t-Statistics ....................................................................................... 356
Ordinary Unpaired Sample t-Statistic ............................................. 356
Paired............................................................................................... 358
Single Sample .................................................................................. 360
Pearson Product Moment Correlation ............................................. 362
Wald-Wolfowitz Runs Test .............................................................. 364
Regression Analysis......................................................................... 366
Single-Variable Regression ............................................................. 366
Selecting Variables..........................................................................367
Regression Type ..............................................................................368
Graphics Output ..............................................................................369
Text Output .....................................................................................370
Confidence Limits............................................................................373
Multiple Regression ......................................................................... 374
Selecting Variables..........................................................................374
Graphics Output ..............................................................................375
Text Output .....................................................................................376
Confidence Limits............................................................................378
Polynomial Regression .................................................................... 378
Selecting Variables..........................................................................379

xiv • Table of Contents


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Order of Polynomial ........................................................................380


Graphics Output ..............................................................................380
Text Output .....................................................................................381
Confidence Limits............................................................................383

CHAPTER 9
Automating Procedures with Run Files............................................ 384
Creating Run Files ........................................................................... 385
How Run Files Work ........................................................................ 385
Run File Commands and Parameters .............................................. 386
General Form of Run File Commands .............................................. 391
Examples of Run File Commands ....................................................391
Requirements for Run File Commands ............................................392
ACCA ................................................................................................ 393
Text Report .....................................................................................393
Pareto Chart ....................................................................................394
Data File ..........................................................................................395
ANOVA.............................................................................................. 396
ANOVAR ........................................................................................... 397
APPEND............................................................................................ 397
AskAlpha AskDate AskInteger AskNumber AskTime ...................... 399
AskAlphaMatchFilter AskDateMatchFilter
AskIntegerMatchFilter AskNumberMatchFilter
AskTimeMatchFilter ......................................................................... 401
AskAlphaRange AskDateRange AskIntegerRange
AskNumberRange AskTimeRange ................................................... 403
AskAlphaRangeFilter AskDateRangeFilter
AskIntegerRangeFilter AskNumberRangeFilter
AskTimeRangeFilter......................................................................... 405
AskAlphaSelectFilter AskDateSelectFilter
AskIntegerSelectFilter AskNumberSelectFilter
AskTimeSelectFilter ......................................................................... 408
AskDATFile ....................................................................................... 411
AskList.............................................................................................. 413
AskOpenFile ..................................................................................... 416
AskSaveFile...................................................................................... 418
AskVariable ...................................................................................... 420
ATTRIBUT......................................................................................... 422
BOXPLOT .......................................................................................... 423
CALC................................................................................................. 425
CHART .............................................................................................. 426
CHITEST ........................................................................................... 427
CLEANUP .......................................................................................... 429
External to Quality Analyst—E.........................................................429
Fixed-Field to Quality Analyst—F.....................................................430
Quality Analyst to Comma-Delimited—S .........................................430
Quality Analyst to Comma-Delimited with Quotes—Q.....................430
Change Missing-Data Symbol—C.....................................................431
CLEAR............................................................................................... 431

Table of Contents • xv
Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

$COMMENT ...................................................................................... 431


CONNECT ......................................................................................... 432
COPY ................................................................................................ 432
CORVAR ........................................................................................... 433
CreateNWH ...................................................................................... 433
CUSUM ............................................................................................. 435
DELETE ............................................................................................. 436
EWMA............................................................................................... 436
EXCEPT............................................................................................. 437
EXTRACT .......................................................................................... 438
$FILTER............................................................................................ 439
FLIP.................................................................................................. 440
GROUP ............................................................................................. 440
IR ..................................................................................................... 442
KRUSKAL.......................................................................................... 443
MCAPREP ......................................................................................... 443
MERGE.............................................................................................. 445
MPCAP.............................................................................................. 447
MR .................................................................................................... 448
MSORT ............................................................................................. 449
MULTREG ......................................................................................... 450
NEWVAR........................................................................................... 451
NORMPLOT....................................................................................... 452
NoWorkingMessage ......................................................................... 453
PARETO ............................................................................................ 453
ParseFileName ................................................................................. 454
PAUSE .............................................................................................. 455
PCAP................................................................................................. 457
POLREG ............................................................................................ 457
PRINT............................................................................................... 459
PROMPT ........................................................................................... 460
REDUCE ............................................................................................ 462
REGRESS .......................................................................................... 463
REM .................................................................................................. 466
RENAME ........................................................................................... 466
REPORT ............................................................................................ 466
RUN .................................................................................................. 467
RUNCHART....................................................................................... 468
SAVE................................................................................................. 469
SCATTER .......................................................................................... 470
SET ................................................................................................... 470
SetCurrentDir................................................................................... 472
SHELL ............................................................................................... 472
SINGCOL .......................................................................................... 473
SUMMARY ........................................................................................ 474
SUMSTAT.......................................................................................... 475
SYSTEM ............................................................................................ 476
TITLE................................................................................................ 476
TTESTS ............................................................................................. 476

xvi • Table of Contents


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

UpdateNWH ..................................................................................... 478


USETEMPDIR ................................................................................... 480
WALDRUN ........................................................................................ 481
WEIBULL .......................................................................................... 482
XRS................................................................................................... 483
Replaceable Parameters.................................................................. 484
Introduction..................................................................................... 484
Naming Replaceable Parameters .................................................... 485
Assigning Values to Replaceable Parameters ................................. 486
Prompting for Replaceable Parameters at Run Time ......................486
Setting Replaceable Parameters within Run Files...........................486
Passing Replaceable Parameters from the Command Line .............486
Using Replaceable Parameters for File and Path Names ................ 487
Using the “$” Replaceable Parameters ........................................... 488
Creating Complete Task Sequences ................................................ 490
Example 1 ........................................................................................ 490
Example 2 ........................................................................................ 490
Example 3 ........................................................................................ 491
Example 4a ...................................................................................... 491
Example 4b ...................................................................................... 493
Example 5 ........................................................................................ 494
Creating Header Files from within Run Files ................................... 495
Executing Run Files ......................................................................... 496
Executing Run Files from within Quality Analyst............................ 496
Executing Run Files Directly............................................................ 497
Executing Run Files Using a Command Line ................................... 497
Executing Run Files from a Program Shortcut ................................498
Executing Run Files Using Task Scheduler ......................................498
Executing Run Files from Other Programs ......................................502
Command Line Options ...................................................................502
Interacting with the Run File Interpreter ....................................... 504
Run File Errors................................................................................. 505
Using Older Run Files ...................................................................... 506
Windows-based Run Files Earlier than Version 6.1 ........................ 507
Converting Files to the New Formats ..............................................507
Modifying Run Files .........................................................................507
DOS-based Run Files ....................................................................... 508
Using Existing DOS-based Run Files under Windows......................508
Converting DOS Run Files to Windows............................................509

CHAPTER 10
Using External Data Files ................................................................. 510
Importing Data................................................................................ 510
Importing a Comma-Separated-Value File...................................... 510
Importing a Fixed-Field File ............................................................ 512
Creating and Editing a Fixed-Field Definition File ...........................514
Opening a Data File without a Header File...................................... 518
Using an Existing Header File..........................................................519
Creating a New Header File.............................................................520

Table of Contents • xvii


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Exporting Data to a Comma-Delimited File..................................... 521


Using the Clipboard with the Editor ................................................ 522
Pasting Data into the Editor ............................................................ 522
Copying Data Out of the Editor ....................................................... 526

CHAPTER 11
Manipulating Data Files ................................................................... 530
Changing the Missing Data Symbol................................................. 530
Rotating a Data Set ......................................................................... 531
Converting Subgroups To or From a Single Column........................ 532
Single Column to Multiple Columns ................................................ 533
Multiple Columns to a Single Column.............................................. 535
Extracting Subsets from a Data File ................................................ 536
Extracting Data................................................................................ 536
Creating and Editing an Extract Definition File............................... 537
Defining Calculations for Run files .................................................. 538
Overview .......................................................................................... 538
Creating a Variable Definition File .................................................. 539
Defining Calculated Variables ......................................................... 540
Saving New Calculated Variables to a Data File.............................. 541

CHAPTER 12
Database Connectivity ..................................................................... 542
Overview ......................................................................................... 542
Before Using Connectivity ............................................................... 542
Direct Connection ............................................................................ 543
ODBC Connection............................................................................. 543
Defining Connectivity Data Sets...................................................... 543
Select New External Database ........................................................ 544
Selecting a Connection Type ........................................................... 545
Selecting a Data Source................................................................... 546
Direct-Connection Sources..............................................................546
ODBC Sources..................................................................................547
Specifying a Data Table ................................................................... 547
Using an Existing Table in the Data Source.....................................547
Denormalizing a Normalized Table .................................................548
Using SQL to Create a Data Table....................................................555
Setting External Database Access Options ..................................... 557
Assigning Database Fields to Quality Analyst Variables ................. 558
Selecting Fields Individually ...........................................................560
Selecting All Fields ..........................................................................561
Using Date-and-Time Fields ............................................................562
Defining Connectivity Data Filters .................................................. 563
Defining Filters to Retrieve Matching Data .....................................565
Defining Filters to Retrieve Similar Data.........................................566
Defining Filters to Retrieve Ranges of Data ....................................567
Using the (Ask) Settings..................................................................569
Removing Filters .............................................................................570
Specifying Key Columns ..................................................................570

xviii • Table of Contents


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Viewing SQL Commands Generated by Filter Settings ....................572


Completing Data Definition ............................................................. 572
Using Replaceable Parameters with Filter Criteria in SQL
Statements ...................................................................................... 573
Prompting for Filter Criteria at Run Time ....................................... 574
Setting Filter Criteria within Run files............................................. 578
Passing Filter Criteria from the Command Line .............................. 578
Viewing SQL Commands Generated by Replaceable Parameters ... 579
Using Connectivity Data Sets .......................................................... 579
Modifying Connectivity Data Sets ................................................... 580
Using Database Connectivity in Run files........................................ 583
Overview .......................................................................................... 583
The USETEMPDIR Command ........................................................... 584
The CONNECT command.................................................................. 584
The CALC Command......................................................................... 585
Replaceable Parameters and Connectivity...................................... 585
Examples.......................................................................................... 585
Configuring and Troubleshooting.................................................... 587
Configuring Connectivity ................................................................. 587
Database Options ............................................................................588
Data Retrieval .................................................................................590
Database Debugging .......................................................................591
ODBC Settings .................................................................................591
MS Jet Database Engine ..................................................................592
Microsoft Access / Jet Database Engine ......................................... 593
Microsoft Access / Jet Database Engine Security............................593
Open Database Connectivity (ODBC) .............................................. 594
Database Access Methods ............................................................... 594
Which Options Are Best? .................................................................595
Remote Databases (SQL Server, Oracle, etc.) .................................596
Microsoft Access Databases ............................................................596
Paradox, dBase, and FoxPro Databases ..........................................596
Other Desktop Databases................................................................597
Debug and Message Logging........................................................... 597
Getting Technical Support for Connectivity .................................... 599

APPENDIX A
Missing-Data Techniques in Control Charts..................................... 600
Missing Data with Rowwise Subgroups .......................................... 601
Mode 1 with Subgroup in Every Row .............................................. 602
Mode 2 with Subgroup in Every Row .............................................. 603
Mode 3 with Subgroup in Every Row .............................................. 604
Mode 4 with Subgroup in Every Row .............................................. 605
Mode 5 with Subgroup in Every Row .............................................. 606
Summary Overview—Rowwise Subgroups...................................... 606
Missing Data with Columnwise Subgroups ..................................... 606
Mode 1 with Subgroup Every 3 Rows.............................................. 607
Mode 2 with Subgroup Every 3 Rows.............................................. 609
Mode 3 with Subgroup Every 3 Rows.............................................. 610

Table of Contents • xix


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Mode 4 with Subgroup Every 3 Rows.............................................. 612


Mode 5 with Subgroup Every 3 Rows.............................................. 613
Summary Overview—Columnwise Subgroups Every 3 Rows.......... 615
Mode 1 with Subgroup in Moving Window of 3 Rows..................... 616
Mode 2 with Subgroup in Moving Window of 3 Rows..................... 617
Mode 3 with Subgroup in Moving Window of 3 Rows..................... 619
Mode 4 with Subgroup in Moving Window of 3 Rows..................... 620
Mode 5 with Subgroup in Moving Window of 3 Rows..................... 622

APPENDIX B
Alternative Statistical Calculation Methods..................................... 624
EPA Control Limits........................................................................... 624
Ford Process Capability Indices ...................................................... 625
Control Chart Limits Based on Probability ...................................... 626
Standard Deviation Calculation Methods ........................................ 627
Variable Control Charts ................................................................... 628
Process Capability............................................................................ 628
Statistical Routines.......................................................................... 628
Practical Differences Between Methods.......................................... 629

APPENDIX C
The ASCII Standard.......................................................................... 630

APPENDIX D
Numeric Limits and Precision .......................................................... 632
Accuracy and Precision.................................................................... 632
Significant Digits ............................................................................. 632
Computational Considerations ........................................................ 633
Quality Analyst Internal Numeric Data Types ................................. 634

APPENDIX E
References........................................................................................ 635
Citations .......................................................................................... 635
Where to Buy Books ........................................................................ 638

APPENDIX F
Equations.......................................................................................... 640

INDEX
Index ................................................................................................ 663

xx • Table of Contents
Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

CHAPTER 1

Introduction
NWA Quality Analyst is a Windows-based application that provides a
comprehensive, integrated set of Statistical Quality Control (SQC) charting and
analysis functions. Quality Analyst gives you the tools you need to analyze
quality-control data as well as produce the required control charts. It includes a
complete array of data-manipulation and -analysis capabilities. Quality Analyst
helps you locate and identify sources of variation, and can help you determine the
cause.

Overview of NWA Quality Analyst Features


NWA Quality Analyst consists of several fully integrated components:
Data and SQC Chart Management
Graphics Presentation and Management
General Statistical Analysis
Run File Interpreter
SQC Chart Server

Data and SQC Chart Management


With the Quality Analyst Editor you can create and manage Data Sets, enter and
manipulate data, and create and configure SQC charts. The typical work session
begins with and centers on this component, which also provides access to the
other components.
See CHAPTER 3: Creating and Editing Data Files starting on page 27.

Graphics Presentation and Management


With the Quality Analyst Graphics Viewer, you manage all graphics presentation
and manipulation under Windows. All charting is done through this routine, which
can manage the display of multiple charts on the screen or printer. It lets you

CHAPTER 1: Introduction • 1
Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

annotate charts, view detail for individual data points, and customize the layout of
charts on the screen and printer. This routine can be run from the Editor or
independently to view and print graphs that have been saved from previous
Quality Analyst sessions or obtained from other users.
See CHAPTER 6: Managing Charts with the Graphics Viewer starting on
page 187.

General Statistical Analysis


Quality Analyst lets you perform several types of statistical analyses on your data
including one-way ANOVA, Chi-square, correlation, Kruskal-Wallis statistic,
descriptive statistics, t-statistics, Wald-Wolfowitz runs test, and regression
analysis.
See CHAPTER 8: General Statistical Analysis starting on page 338.

Run File Interpreter


The Quality Analyst Run File Interpreter processes Quality Analyst Run files—
scripts that allow you to create “batch” processes in Quality Analyst. Run files are
used to:
automate procedures,
provide simplified operation for some users, and
generate large numbers of graphs with a single request.

You can also use Run files to integrate Quality Analyst functions with other
systems and applications.
See CHAPTER 9: Automating Procedures with Run Files on page 384.

SQC Chart Server


NWA Quality Analyst includes a computational engine that performs all
calculations needed to generate SQC charts. Operating “behind the scenes,” the
SQC Chart Server provides a common computational base to ensure complete
analytical consistency in all Quality Analyst functions.

2 • CHAPTER 1: Introduction
Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Background Knowledge Required


Statistical Quality Control
This manual assumes that you are familiar with the concepts of Statistical Quality
Control (SQC) and know how to create and interpret control charts.
APPENDIX E contains bibliographic information for many general references on
SQC and control charting.

The Windows Environment


This manual assumes that you are familiar with the Windows environment and
know how to use it. Among the things you need to know are:
how to run an application;
how to minimize, maximize, and restore a running application and individual
windows within that application;
how to execute menu options;
what dialog boxes are; and
how to use the controls in dialog boxes such as buttons, tabs, drop-down lists,
list boxes, check boxes, and option buttons.

If you are not familiar with these terms, please refer to your Windows
documentation.
Though Quality Analyst adheres to most common conventions in the design of its
Windows interface, unique aspects of the Quality Analyst Windows user interface
are described throughout this manual as they occur.

Typographical and Layout Conventions


This manual uses different fonts to indicate different types of information or
actions. This section explains those typographical conventions. The fonts and their
corresponding meanings are as follows.

CHAPTER 1: Introduction • 3
Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Typographical Conventions Used in This Manual

Typeface Description
<KEY STROKES> This font is used to indicate keys or combinations of keys that
you should press. For instance, <ENTER> indicates that you
press the Enter key, and <SHIFT+F1> indicates that you press
the <F1> key while holding down the <SHIFT> key.
On-Screen Text This font is used to indicate on-screen text such as menu items
to select, labels in dialog boxes, or buttons to click. For
example, the manual might say “Open the File menu and
select Open,” or “Click the OK button.”
Keyboard Entry Text that you enter using the keyboard is shown on its own
Text indented line in this typeface. For example:
Door Clearance (10th mm)

Also, when a button on the toolbar serves the same purpose as a menu selection,
that button will be shown in the margin to the left of the paragraph in which the
operation is explained. For example:
To create X-bar and Range charts of the data, open the Variable menu and select X-
Bar & Range.

Technical Support
Northwest Analytical is strongly committed to supporting the users of our
software. Registered users who have questions or encounter difficulties of any
kind with Quality Analyst are encouraged to contact us by phone, fax, or mail.
(Please call during normal business hours—8:30 PM–4:30 PM Pacific time.) An
experienced and interested staff is available to help, and there is no charge for this
service.
Our experience has shown that many support calls are the result of problems that
could have been solved by a careful re-reading of the instructions, or that were not
related to Quality Analyst in the first place. Before calling, please read (or re-read)
the pertinent section(s) of the manual, check input data for validity, and try to
reproduce the problem. If it is still necessary to call, please have the following
information available:
Your name and the name of your company or institution.
Product name (Quality Analyst), version, and serial number (required).
Type of computer and operating system.

4 • CHAPTER 1: Introduction
Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To allow us to help you effectively, please also have the following information:
Clear, concise description of the problem.
Source of the data involved.
Exact sequence of events (keystrokes, buttons, menu selections, and so on)
leading to the problem.
Description of program output.
Complete error message(s), if any.

It is always helpful, and sometimes essential, that you have access to your
computer system when calling. Although we can solve most problems quickly by
telephone, it may be necessary for you to provide printouts and/or the data files.
We encourage you to call with questions or problems. We are also interested in
comments and suggestions you have regarding Quality Analyst’s performance,
capabilities, ease of use, and documentation. We release updated versions of
Quality Analyst periodically, and user feedback is the largest single source of
ideas for these updates. If you have suggestions on how to improve Quality
Analyst, please let us know.

To contact NWA:
1 Open the Help menu and select Contact Northwest Analytical.

2 Do one of the following:


Mail, call, or fax us at the address and phone numbers shown.
Click Email to start an email message to us using your default email
software.
Click Web to go to our web site using your default browser.

When you contact technical support, we may ask you to provide information about
your computer and your Quality Analyst installation.

CHAPTER 1: Introduction • 5
Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To view system information:


Open the Help menu and select About Quality Analyst.

We may ask you to email us the information in this box by clicking the Email
button.
If you are troubleshooting database connectivity, we may also ask you to view the
connectivity debug log.

To view the connectivity debug log:


Click the Show Debug Log button on the About NWA Quality Analyst dialog
box. (This button appears only when debug logging is enabled, as explained
under Database Debugging on page 591.)

We may ask you to email us the information in this box by clicking the Email
button.

6 • CHAPTER 1: Introduction
Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

CHAPTER 2

Quality Analyst Files


Using Quality Analyst for Windows revolves around the Data Set. You select or
create a Data Set and then analyze and view that data in any of Quality Analyst’s
many ways of analyzing and displaying data. Thus, you select the data first and
then select the action (or actions) you want to take on the data.
This section discusses the types of Quality Analyst files and their structure.
A clear understanding of the Quality Analyst standard file structure will make the
software more useful and will help you transfer information between Quality
Analyst and other software and data sources.
All Quality Analyst files are ASCII text files. 1 This simple file format is the same
as that commonly used by text editors like Windows Notepad. This format makes
it easy for you to exchange data with other software, and lets you supplement the
Quality Analyst utilities for creating and modifying files.

File Names
Quality Analyst file names can be any file name allowed by Windows. The
following are examples of valid file names:
SAMPLE.DAT VENEER.NWG Board Defects.dat
PART32 R12.DAT JM-42 Viscosity.NWH

File Types and Their Extensions


Quality Analyst uses several file types to store data and information used to
analyze data and create control charts. To help organize these files, Quality
Analyst uses a different file-name extension for each file type. The file types and
their default extensions are listed below. The following sections describe each file
type.

1
ASCII stands for American Standard Code for Information Interchange.

CHAPTER 2: Quality Analyst Files • 7


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

File Types and Default Extensions

Default
File Type Description
Extension
Data (*) DAT data only
Header (*) NWH definition of the data
Graphics NWG information needed to display a chart or text
report
Run RUN script for the “batch” processor
Summary SMY summary of out-of-control data points
Definition See page 13.
(*) A Data file and a Header file together constitute a Quality Analyst “Data Set.”

Data Sets
In Quality Analyst, the data and the information needed to describe the data and to
manage charting and analysis are stored in Quality Analyst “Data Sets.” A Data
Set consists of two files—a Data file that contains only data, and a corresponding
Header file that contains descriptions of the data and parameters used to analyze
and chart the data.

Data Files
Data files are created by you (using the Quality Analyst Editor) or obtained from
other sources. For example, Data files can be downloaded from remote computers
or can be created by other software. Data files normally contain the actual
measurements or data obtained directly from quality-control procedures. Data files
may also contain any number of descriptive fields to help identify individual data.
Data file names are assigned by you. The default file-name extension for Data
files is DAT. For example, a Data file might be named PARTS.DAT. For reasons
discussed below, under Managing Data Sets, we strongly suggest using this
default extension.
Quality Analyst Data files are space-delimited ASCII files in the form of a table.
But you probably won’t need to think about that unless you are moving files
between Quality Analyst and another software application. (See Data File
Structure below for more details.)
Normally, Quality Analyst will read and analyze all data in a Data file. But you
can also instruct Quality Analyst to read and analyze only some of your data. To

8 • CHAPTER 2: Quality Analyst Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

do this for an entire file, see the instructions in the File Range section under File
Parameters on page 279. To do so for individual variables within a file, refer to
Data Ranges under Variable Parameters on page 284. To do so for specific
combinations of chart type and individual variable within a file, refer to Center
Line and Limits under Chart Parameters on page 298. You can also apply filters
that will cause Quality Analyst to analyze only those rows with data that meet
certain criteria. This is explained under Filtering Data beginning on page 90.

Header Files
Header files, which are automatically created and maintained by Quality Analyst,
contain all the file-structure information needed to perform SQC charting and
analysis on the corresponding Data file. They includes the names and descriptions
of each variable in the Data file, the definitions of any calculated variables, and
parameters such as control limits and how they are calculated, chart scale and
labeling information, and product specifications used in process capability
analysis.
Header files have the same name as their corresponding Data files but use the
extension NWH. For example, the Header file for the Data file PARTS.DAT
would be named PARTS.NWH. Header files are created automatically by the
Quality Analyst Editor when you create Data files, and are updated as you make
changes to configuration parameters or the structure of the file. You can also
create and modify Header files from within Run files, as explained under Creating
Header Files from within Run Files on page 495.

Managing Data Sets


Although you will rarely, if ever, deal directly with Header files, you should keep
several things in mind as you create, copy, move, rename, and delete Data Sets.
When you copy or move a Data file, be sure to copy or move the corresponding
Header file with it (along with, for that matter, all other files with the same root
file name). If you copy files using a command line, you can use a “wild card”
designation like SAMPLE.* to include all related files in the copy operation. If
you copy files using the Windows Explorer, you should sort the file listing by file
name, select all files with the same root file name (and various extensions), then
copy or move them as a group.
Quality Analyst’s data-set system offers exceptional flexibility, but also requires
that you exercise some caution when naming files. Remember that Quality Analyst
gives Header files the same root file name as the Data file in the Data Set. For
example, if you create a Data Set and name the Data file BOLTS.DAT, Quality
Analyst will automatically create a Header file named BOLTS.NWH. If you then
create a Data file named BOLTS.PRN, Quality Analyst will replace the original

CHAPTER 2: Quality Analyst Files • 9


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Header file (for BOLTS.DAT) with the new Header file (for BOLTS.PRN) named
BOLTS.NWH. This will leave BOLTS.DAT without its Header file. Worse, if
you try to use BOLTS.DAT, Quality Analyst will use the Header for BOLTS.PRN
and an error will result.
For these reasons, we strongly suggest using the default Quality Analyst file-name
extensions for all Quality Analyst files. If you intend to use a file that was created
by another program but is usable “as is” by Quality Analyst, we suggest renaming
it first—before loading it into the Quality Analyst Editor or operating on it in a
Quality Analyst Run file.
To make managing Data Sets easier, Quality Analyst includes several file-
management commands, all of which appear on the Utilities submenu of the File
menu.

To copy a Quality Analyst Data Set:


1 Open the File menu, select Utilities, then select Copy. The Copy Files dialog
box will appear.

2 Specify the Data file you want to copy in the upper half of the dialog box.
3 If you want to copy both the Header file and the Data file, select the Copy
both .DAT and .NWH files check box. If you want to copy only one of the two
associated files, clear this check box and specify which file (.DAT or .NWH)
you want to copy.
4 Select a Destination folder in the lower half of the dialog box.

10 • CHAPTER 2: Quality Analyst Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

5 Click Copy.

To delete a Quality Analyst Data Set:


1 Open the File menu, select Utilities, then select Delete.
2 In the Delete Files dialog box, specify the Data Set you want to delete.

3 If you want to delete both the Header file and the Data file, select the Delete
both .DAT and .NWH files check box. If you want to delete only one of the two
associated files, clear this check box and specify which file (.DAT or .NWH)
you want to delete.
4 Click Delete.

To rename a Quality Analyst Data Set:


1 Open the File menu, select Utilities, then select Rename. The Rename Files
dialog box will appear.

2 Specify the Data Set you want to rename in the upper part of the dialog box.
3 If you want to rename both the Header file and the Data file, select the
Rename both .DAT and .NWH files check box. If you want to rename only one

CHAPTER 2: Quality Analyst Files • 11


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

of the two associated files, clear this check box and specify which file (.DAT
or .NWH) you want to rename.
4 Select a new name for the Data Set in the New File Name box. You need not
supply a file name extension; Quality Analyst will apply the appropriate
extensions for each component of the Data Set.
5 Click Rename.

Note: You can also copy, delete, and rename files from within Run files. For
details, see COPY on page 432, DELETE on page 436, and RENAME
on page 466.

Graphics Files
Graphics files store information needed to display a chart or text report. They are
created by the Graphics Viewer and stored in XML format. Graphics files have the
extension NWG. Quality Analyst often creates several Graphics files from a single
Data file so it assigns temporary names like 1000001.NWG or 1.NWG (depending
on your license type) as it creates graphics output. The Editor lets you select
individual NWG files to save by renaming them.

Run Files
Run files are used in “batch processing.” Run files contain a series of commands
instructing Quality Analyst to perform its charting and analysis functions
automatically. Each row in a Run file contains the instructions necessary for
Quality Analyst to perform one of its functions. Run files are not necessarily
associated with a specific Data Set. They may contain instructions that let you
perform the same operations on different files with different parameters. You
create Run files using a text editor (like Windows Notepad) or a word processor
(using its ASCII-export or -save feature) or the built-in Run File Wizard. When
you name Run files, you must use the extension RUN.

Summary Files
Several Control Chart functions create Summary files that contain out-of-control
data points for display and printing. The default file name extension for Summary
files is SMY.

12 • CHAPTER 2: Quality Analyst Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Definition Files
Definition files are special files used to store format information to increase the
efficiency of certain Quality Analyst functions. These functions and their
corresponding default file-name extensions are listed below. Quality Analyst
provides a user interface for creating and maintaining these files so you need not
be concerned with their structure. We recommend that you use the default
extensions for these file types to help keep track of these special files.

Definition File Extensions

File Extension Description Created via:


FFD Fixed-Field File | Import | Fixed Field to Quality Analyst
Definition Format > Create
RPT Report Format File | Report > Create Format
SEL Extract Definition File | Utilities | Extract Subset from Data
File > Create
VDF Variable Definition File | Utilities | Define Calculations for Run
files > Create
QXP Exception Definition Other | Exception > Create

Entering File Names


Normally, you will not need to supply the extension when entering a file name.
Quality Analyst adds the appropriate extension to your file name automatically, if
you do not supply one. For example, if you enter HOUSING for a Data file name,
Quality Analyst will add the extension DAT, and the full file name will be
HOUSING.DAT. Thus, entering HOUSING and HOUSING.DAT are equivalent.
This use of file-name extensions makes it easier to identify all files of a particular
type—such as all Data files (with a DAT extension)—or to identify all the files
related to a particular Data Set—files with the same name but different extensions.

Example File Names by Type and Data Set

Files of the Files Related to the


Same Type Same Data Set
SAMPLE.DAT SAMPLE.DAT
PART32.DAT SAMPLE.NWH

CHAPTER 2: Quality Analyst Files • 13


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

DEFECTS.DAT SAMPLE.NWG
HOUSING.DAT SAMPLE.RUN

If you want to use an existing file with an extension that is not the standard
Quality Analyst extension for that file type, you can first list those files by
entering the file name *.EXT (where EXT is the extension you want) and pressing
<ENTER>, then selecting your file from the list. Or you can enter the complete file
name, including the nonstandard extension. For example, if you created a Data file
named FAILRATE.PRN, you must enter FAILRATE.PRN when Quality Analyst
asks for the name of a Data file. If you created a file with no extension, you can
use it by typing a period at the end of the name. For example, if you created a Data
file named PART32, you must enter “PART32.” (with the period) when Quality
Analyst asks for the name of a Data file.
Remember, however, that we strongly suggest using Quality Analyst’s default
extensions for file names. See Managing Data Sets on page 9 for details.

Entering Data File Names

If you enter: This file name will be used:


DEFECTS DEFECTS.DAT
DEFECTS.DAT DEFECTS.DAT
DEFECTS. DEFECTS
DEFECTS.PRN DEFECTS.PRN

When you import files to Quality Analyst from other programs, give them distinct
file-name extensions to prevent confusion, especially if you intend to run them
through the Quality Analyst conversion functions. For example, a “print file”
created in Lotus 1-2-3 will generally have the extension “.PRN” but does not need
converting. You should rename this file with the extension “.DAT” before using it
in Quality Analyst as a Data file. If you import and convert a file (such as a
comma-separated-value file, usually named with a “.CSV” extension) to Quality
Analyst format using one of the Import functions, you should name the output file
with the extension “.DAT.”

Registered File Types


The Quality Analyst installation program registers several file-name extensions in
the Windows registry. If you double-click on one of these file types (or a shortcut

14 • CHAPTER 2: Quality Analyst Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

to one) in Explorer or on the Desktop, that file will be opened by the associated
Quality Analyst program component. This table shows which extensions are
registered with which component.

Registered File Types

Extension Double-clicking does this


NWH Opens the Data Set (this Header file and the same-name Data file) in the
Editor (QAEdit.exe)
NWG Opens the Graphics file in the Graphics Viewer (NWAGraph.exe)
PLT Opens the Graphics file from an older version of Quality Analyst in the
Graphics Viewer (NWAGraph.exe)
RUN Executes the Run file using the Run File Interpreter (QARFI.exe)

If you use other programs that also use these extensions, you can use Windows’
built-in features to unregister and re-register a file type. In Explorer, 2 open the
View menu, select Folder Options (or Options), then select the File Types tab.
Consult the Windows documentation for instructions on using this feature.

Data File Structure


A Quality Analyst Data file is a row-by-column array, where each row is a record
(sample or subgroup) and each column is a variable (individual measurement or
description). The fields in each record are separated by spaces. These spaces are
called “delimiters”: they delimit or separate individual data elements. Each line
(record) ends with a carriage return–line feed pair—the normal end-of-line
condition in most text editors. A Data file can contain up to 500 columns and up to
999,999 rows.
Quality Analyst Data files are in essentially the same format as the “tables” that
are created using the “export as text” feature of many database managers. This
format has long provided a practical balance of clarity and compactness for storing
and presenting data. This similarity between the storage format of Quality Analyst
and the export format of many database-management programs makes it easier for
you to exchange data and develop integrated applications.
Quality Analyst requires that each row of a Data file contain the same number of
data entries. Since Quality Analyst identifies a data field as a value in a row

2
These menu selections apply to Windows 95/98 and may differ in subsequent versions.

CHAPTER 2: Quality Analyst Files • 15


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

separated from other values by spaces, data rows may not contain “blank” or
empty fields. Each field position must contain at least a “place holder.” For
example, if a file contains five variables, each line in the file must contain five
entries, separated by spaces. If a field datum is “missing,” its place in the row
must contain a missing-data symbol as a “place holder” for that data element to
maintain the structure of the Data file. The Quality Analyst Editor automatically
fills empty cells with the current missing data symbol when saving a Data file.
A typical Quality Analyst Data file, when loaded into a text editor, might look
something like this:

Quality Analyst Data file in Notepad

In this example, the first three columns are description fields (date, time, and
machine code), and the last four columns are the individual data elements of a
series of measurements (in this case, a subgroup). Each row is a separate sample—
in this example, a set of measurements. Both description and data elements are
separated by single spaces.
When loaded into the Quality Analyst Editor, this sample Data file (with
associated variable names and types supplied by you) looks like this:

16 • CHAPTER 2: Quality Analyst Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Example Data Set in the Quality Analyst Editor

The names at the top of each column are supplied by you as you define the data
structure when you create the Data Set (see Creating a New Data Set on page 29).
You use these names, which are stored in the Data Set’s Header file, to select
variables for analysis and to label graphs and reports. Each variable definition
includes a “data type,” which tells Quality Analyst what kind of information is
contained in the variable. Data types include DateTime, time, alphanumeric,
individual measurement, subgroup, and several others. Data types are discussed in
more detail under Data Type on page 37.
Measurements in Quality Analyst may be defined as individual values or as
subgroups—two or more related measurements. Subgroups may take many forms
(see the next section on Subgroup Types) but most commonly a single variable
spans multiple columns in the Data file.

Subgroup Types
Subgroups in Quality Analyst may be organized in one of four ways:
Rowwise Subgroups
Columnwise Subgroups

CHAPTER 2: Quality Analyst Files • 17


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Moving-Average Subgroups
Variable-Size Subgroups

The type of subgroups allowed depends on the variable type of the data. (Quality
Analyst variable types and data types are explained in detail under Data Type on
page 37.) When the data is type “1, 2,…n” (subgroup), “X” (mean), “R” (range),
or “S” (standard deviation), each subgroup occupies one row of the Data file
(rowwise). With data type “I” (individual measurements), each subgroup can
occupy more than one row in a Data file (columwise). When the subgroups are
processed as moving averages (or moving ranges, or moving standard deviations),
consecutive subgroups “share” data rows.
The following sections describe each type of subgroup and provide an example of
each.

Rowwise Subgroups
In “rowwise” subgroups, the measurements for a subgroup variable are all in one
row of the Data file. A subgroup variable of five measurements would occupy five
fields in one row of the Data file. That is, each Data file row contains a complete
subgroup.
In this example, the subgroup size is three and each row contains the three
measurements for one subgroup. The X-bar chart values show how subgroup
values are combined for charting and analysis.

Rowwise Subgroup Example

Data File Contents


Data File Row Measurement Number Subgroup Number X-bar Chart Value
1 2 3
1 5.5 5.6 7.3 1 6.13
2 7.1 6.7 6.8 2 6.87
3 5.4 6.4 5.4 3 5.73
4 5.6 5.3 6.9 4 5.93

18 • CHAPTER 2: Quality Analyst Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Rowwise subgroup example

Columnwise Subgroups
In “columnwise” subgroups, each row of a Data file contains only one
measurement of a subgroup variable. Therefore, each subgroup occupies several
rows of a Data file. One subgroup begins on the row immediately following the
end of the previous subgroup. For example, with a columnwise subgroup of five
measurements, each subgroup would occupy five Data file rows, and a new
subgroup would begin every five rows.
In this example, the subgroup size is three, but the data all is located in one
column. Each subgroup occupies three rows of the Data file, and a subgroup
begins every three rows. The X-bar chart values show how subgroup values are
combined for charting and analysis.

CHAPTER 2: Quality Analyst Files • 19


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Columnwise Subgroup Example

Data File Row Data File Contents Subgroup Number X-bar Chart Values
1 5.5 1
2 5.6 1
3 7.3 1 6.13
4 7.1 2
5 6.7 2
6 6.8 2 6.87
7 5.4 3
8 6.4 3
9 5.4 3 5.73
10 5.6 4
11 5.3 4
12 6.9 4 5.93

Columnwise subgroup example

20 • CHAPTER 2: Quality Analyst Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Moving-Average Subgroups
In “moving-average” subgroups, each row of the Data file contains only one
measurement of the subgroup variable. Therefore, each subgroup occupies several
rows of a Data file. Unlike columnwise subgroups, however, a new subgroup
begins on each row of the Data file. For example, with a subgroup of five
measurements, each subgroup would use five rows of a Data file, and a new
subgroup would begin at each row. This type of subgrouping produces moving
average charts.
In this example, the subgroup size is three, but the data all is located in one
column. Each subgroup requires three Data file rows, but a subgroup begins on
every row. The X-bar chart values show how subgroup values are combined for
charting and analysis.

CHAPTER 2: Quality Analyst Files • 21


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Moving-Average Subgroup Example

Data Data X-bar


File File Subgroup Number Chart
Row Contents Values
1 5.5 1
2 5.6 1 2
3 7.3 1 2 3 1 6.13
4 7.1 2 3 4 2 6.67
5 6.7 3 4 5 3 7.03
6 6.8 4 5 6 4 6.87
7 5.4 5 6 7 5 6.30
8 6.4 6 7 8 6 6.20
9 5.4 7 8 9 7 5.73
10 5.6 8 9 10 8 5.80
11 5.3 9 10 9 5.43
12 6.9 10 10 5.93

Moving-average subgroup example

22 • CHAPTER 2: Quality Analyst Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Variable-Size Subgroups
In “variable-size” subgroups, each row of the Data file contains only one
measurement of a subgroup variable. Therefore, each subgroup occupies several
rows of a Data file. The subgroups vary in size, and are identified by the value of
an associated variable. A subgroup begins on the row immediately following the
end of the previous subgroup. For example, if a subgroup consists of a single
day’s samples, a variable such as DATE would be used to identify each subgroup;
a new subgroup begins each time the value of DATE changes.
In this example, a new subgroup starts each time the DATE variable changes. The
actual data occupy only one column. Each subgroup occupies a different number
of rows in the Data file. The X-bar chart values show how subgroup values are
combined for charting and analysis.

Variable Subgroup Size Example

Data File DATE Data File Subgroup X-bar Chart


Row Variable Contents Number Values
1 12/15/05 5.5 1
2 12/15/05 5.6 1
3 12/15/05 7.3 1 6.13
4 12/16/05 7.1 2
5 12/16/05 6.7 2
6 12/16/05 6.8 2
7 12/16/05 5.4 2
8 12/16/05 6.4 2 6.48
9 12/17/05 5.4 3
10 12/17/05 5.6 3
11 12/17/05 5.3 3
12 12/17/05 6.9 3 5.8

Notice in the figure that Quality Analyst automatically adjusts the control limits
for differences in subgroup size.

CHAPTER 2: Quality Analyst Files • 23


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Variable subgroup size example

Missing Data Handling


Normally a Data file is completely filled with data. That is, each line of the Data
file has the same number of entries and each entry represents a measurement or
description of some type. However, data may sometimes be incomplete, with some
entries “missing.” Since Quality Analyst Data files must contain the same number
of entries on each line, the missing entries are represented by a missing-data
symbol.

User-Defined Missing Data Symbols


Quality Analyst is initially configured to use an asterisk (“*”) to represent missing
data. However, you may reconfigure Quality Analyst to use any character or string
of characters (without spaces) to represent missing data. Examples include “-
999999” and “MISSING.” You can change the missing-data symbol either
temporarily or permanently as explained under Missing Data Symbol on
page 272.
You should make sure that the symbol for missing data in the Data file matches
the symbol that Quality Analyst is configured to recognize as missing data. If they
are different, Quality Analyst will treat the symbol in the Data file as data. For
example, if missing data in a Data file is represented by “-999999,” but Quality

24 • CHAPTER 2: Quality Analyst Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Analyst is configured to recognize “*” as missing data, Quality Analyst will


interpret each “-999999” as numeric data and use it in computations. If missing
data in a Data file is represented by “*” (or any string containing alphabetic
characters), but Quality Analyst is configured to recognize “-999999” as missing
data, Quality Analyst will interpret each “*” as a zero and use it in computations.

Missing-Data Techniques
In Quality Analyst control charts, you have several options for handing missing
data, as discussed in APPENDIX A: Missing-Data Techniques in
Control Charts.
Most Quality Analyst statistical functions deal with missing data by ignoring cases
with missing data and adjusting the results accordingly.
Calculated variables that use formulas that include missing data may result in the
missing-data symbol depending on the functions and operators in the formula.
The following functions accept multiple arguments (including ranges of variables)
and will result in numeric values if some (but not all) of the arguments are missing
data. The missing-data arguments are simply ignored.
AVG MIN STDDEV
MAX RANGE SUM
The following functions accepts only a single argument and will result in missing
data if the argument is missing data:
ABS GRD SIN
ATN INT SQR
COS LN TAN
DEG LOGn
EXP MOD
Here are some examples of functions operating on missing data (represented
by [MD]):
AVG(4,[MD],7,6) = 5.6666667
MAX([MD],-1.5,2.6,3.0) = 3.0
MIN([MD],[MD],[MD]) = [MD]
COS([MD]) = [MD]
The addition (+) and subtraction (−) operators produce numeric results if at least
one term is not the missing-data symbol. The multiplication (*) and division (/)
operators will result in missing data:
4.3 + [MD] = 4.3
-4.3 − [MD] = -4.3

CHAPTER 2: Quality Analyst Files • 25


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

[MD] + [MD] = [MD]


4.6 / [MD] = [MD]
2.7 * [MD] = [MD]

Note: Calculated variables (including operators and functions) are discussed in


detail under Defining Calculated Variables on page 62.

Tagged Data
Quality Analyst lets you “tag” data for “special” treatment. Quality Analyst can
treat tagged data either as normal data or as missing data, according to the current
settings for handling missing data, described in APPENDIX A. By default,
Quality Analyst treats tagged data as missing. Tagging data and treating it as
missing is primarily done to eliminate selected values from calculations of control
limits.
You can configure the way Quality Analyst treats tagged data globally, as
explained under Missing and Tagged Data on page 271.
You can override that global setting for each variable in a Data file, as
explained under Tagged Data Handling on page 287.
How to tag data is explained under Tagging Data on page 81.

26 • CHAPTER 2: Quality Analyst Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

CHAPTER 3

Creating and Editing


Data Files
You create and edit Data files using the NWA Quality Analyst Editor. To use the
Editor, first start NWA Quality Analyst:
Click the Start button, point to Programs, point to NWA Quality Analyst, and
click NWA Quality Analyst 5.2.

The Quality Analyst start-up screen, shown below, includes a menu, toolbar, and a
console with prominent buttons for common start-up operations:
Create a new Data Set
Open an existing Data Set
Execute Run files
Settings
Help

The top two buttons start the Quality Analyst Editor.

CHAPTER 3: Creating and Editing Data Files • 27


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Opening an Existing Data File


To open an existing Data file, either open the File menu and select Open or click
the File Open button on the toolbar or the title screen. The Quality Analyst Open
dialog box will appear.

28 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

This is the standard Windows dialog box, except that, when you select a Data file
in the file list, the Quality Analyst file Title (if the file contains one) appears at the
bottom of the dialog box.

To open a Data Set, do one of the following:


Double-click the file name.
Select the file name (using the arrow keys on the keyboard or the mouse) then
click Open.
In the File name box, type the file name, then press <ENTER> or click Open.

Creating a New Data Set


To create a new Data file, either open the File menu and select New or click the
File New button (on the toolbar or title screen). The New Data Set dialog box will
appear.

CHAPTER 3: Creating and Editing Data Files • 29


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Before you can enter data into a Quality Analyst Data file, you must define the
structure of the data. In this dialog box, you choose either to define that structure
“from scratch” (using the Define New button) or to use the structure of an existing
file as a starting point (using the Use Existing button).
If you click Use Existing, the Quality Analyst Open dialog box (described under
Opening an Existing Data File above) will be displayed. Select the file whose
structure you want to borrow for your new file. The main Editor data grid will
appear with column headings representing the data structure of the file you
selected.
If you click Define New, an empty Variable Definition and Specifications form
(shown below) will appear. The upper portion of this dialog box contains a
spreadsheet-like grid in which you define the structure of your Data Set. Before
we explain the use of this form, we will describe the editing functions and features
of the spreadsheet-like grid.
If you want to create a connectivity Data Set, click New External Database. Refer
to CHAPTER 12: Database Connectivity on page 542 for additional instructions.

30 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Data Structure Editing Functions


Defining the structure of a Quality Analyst Data Set is accomplished in two
forms—the Variable Definition and Specifications dialog box (above) and the
Column Definition and Calculations dialog box (page 61). Both use a spreadsheet-
like form to display and edit data-structure settings. The content of these forms is
explained in detail below, but this section explains several editing functions and
features common to both forms. Any editing features unique to either form are
explained in the corresponding sections below.

Note: The editing functions of the main data-set grid of the Quality Analyst
Editor are slightly different (and more numerous) and are described under
Editing Functions on page 73.

Moving Around in the Grid


When a data-structure form is first displayed, the upper left-hand cell in the grid is
selected. The thick black border around the cell indicates this.

CHAPTER 3: Creating and Editing Data Files • 31


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

There are several ways of moving from cell to cell, as follows.

Selecting Cells in Data Structure Forms

User Action or
Result
Keystroke
<RIGHT> Selects the cell to the right of the currently selected cell.
<LEFT> Selects the cell to the left of the currently selected cell.
<UP> Selects the cell above the current cell.
<DOWN> Selects the cell below the current cell.
<ENTER> Selects the cell to the right. Skips from the last cell in the row
to the first cell in the next row.
<TAB> Same as <ENTER>.
<SHIFT+TAB> Selects the cell to the left. Skips from the first cell in the row to
the last cell in the previous row, if any.
<HOME> Selects the cell in the first column of the current row.
<END> Selects the last nonblank cell in the current row.
<CTRL+HOME> Selects the cell in the first column of the first row.
<CTRL+END> Selects the last nonblank cell in the last row.
<PGDN> Selects the cell one screenful of rows below the current cell.
<PGUP> Selects the cell one screenful of rows above the current cell.
Mouse Click Selects the cell at the mouse pointer.

Modifying the Definition


To modify the contents of the selected cell, use the keystrokes or mouse actions in
the table below.

32 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Keystrokes and Mouse Actions for Editing Cell Contents in


Data Structure Forms

User Action or
Result
Keystroke
<ESC> Enters edit mode and selects the current contents of the cell.
<DELETE> Same as <ESC>.
Double-Click Same as <ESC>.
<DELETE><DELETE> Deletes current cell contents and enters edit mode.
<ESC><RIGHT> Enters edit mode with insertion point at end of current cell
contents.
<ESC><HOME> Enters edit mode with insertion point at beginning of
current contents.
Text Enters edit mode and replaces current cell contents with
“Text”.

These actions place and leave you in edit mode. While in edit mode, the thick
black border around the cell will disappear and the Windows text-insertion cursor
(normally a vertical blinking bar) will appear. The following keystrokes apply
while you are in edit mode.

CHAPTER 3: Creating and Editing Data Files • 33


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Edit-Mode Keystrokes in a Data Structure Form

User Action or
Result
Keystroke
<LEFT> Moves insertion point one character to the left.
<RIGHT> Moves insertion point one character to the right.
<HOME> Moves insertion point to the left of all text.
<END> Moves insertion point to the right of all text.
<UP> In a cell with a drop-down button, selects the previous option in
the list. Otherwise, accepts current cell contents and selects the
cell above.
<DOWN> In a cell with a drop-down button, selects the next option in the
list. Otherwise, accepts current cell contents and selects the cell
below.
<ENTER> Accepts current cell contents and selects the next cell (skipping
from end of row to next row).
<ESC> Restores original value and exits edit mode.
<TAB> Same as <ENTER>.
<SHIFT+TAB> Accepts current cell contents, exits edit mode, and selects the
previous cell.
<CTRL+RIGHT> Accepts current cell contents and selects cell to the right.
<CTRL+LEFT> Accepts current cell contents and selects cell to the left.
<DELETE> If any text is selected, deletes selected text. Otherwise, deletes
character to the right of the insertion point.
<BACKSPACE> If any text is selected, deletes selected text. Otherwise, deletes
character to the left of the insertion point.
<SHIFT+> When used with <LEFT>, <RIGHT>, <HOME>, or <END>,
selects text in the direction of the move.
Mouse Click In same cell, moves insertion point to under the mouse pointer
(I-beam mouse cursor).
Otherwise, accepts current contents of the cell and selects the
cell under the mouse pointer (fat “+” cursor).
Text Enters “Text” into the cell.

34 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

The cells in the Type column in both forms each contain a drop-down list. You can
select a data type using any of the standard Windows methods for selecting an
item from a drop-down list.

Inserting, Deleting, and Moving Variables


To insert a row in a form, first select a cell in the row above which you want to
insert a new row. Click Insert. In the Insert Variables dialog box, enter the number
of variables you want to Insert. In the Beginning at Variable box, you can change
the number of the variable above which they will be added, if you want.

To delete a variable in a data grid, select it by clicking its row number at the left of
the form, then click either the Delete or Cut buttons. If you click Delete, a warning
dialog box will appear asking you to confirm the deletion of the variable.

Click OK to delete the variable. If you click Cut, the variable definition will simply
disappear but a copy of it will be stored in the Clipboard for possible retrieval. In
both cases, the variables below the deleted variable will move up to fill the gap.
To move a variable in the grid to a new position, first Cut its definition to the
Clipboard as just explained. Then select the variable above which you want to
insert the cut variable. Click the Insert button to insert a blank row in the form,
then click the Paste button to paste the variable definition from the Clipboard.

Specifying Variable Definition and Specifications


The Variable Definition and Specifications form is similar to a spreadsheet program
in most respects. You can move the cursor from cell to cell in the grid and enter
data. In this case, the contents of the cells define the structure of the Quality
Analyst Data file. Each row in this grid represents a variable in the Data file. The

CHAPTER 3: Creating and Editing Data Files • 35


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

first column in the data-entry grid is unlabeled and simply numbers each variable.
The remaining columns are labeled Name, Type, Description, LSL, USL, and Target.
The Variable Parameters tab contains additional variable-definition parameters. If
you are creating your data structure from scratch, you should fill in this table one
row at a time, from left to right. If you are modifying a data structure borrowed
from another file, edit this table if necessary.

Note: Detailed explanations of the editing functions and features of this form
are presented under Data Structure Editing Functions on page 31.

Variable Name
In the column labeled Name, you enter a name for each variable. Variable names
have the following restrictions:
They must be 2 to 32 characters long.
They may contain letters (“A”–“Z”), numerals (“0”– “9”), or the underscore
(“_”).
They must begin with a letter.
Each must be unique within a Data file.

Examples of legal variable names include:

36 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

WEIGHT DATE FLANGE_DENTED


B_220 AA INSIDE_DIAMETER
For subgroup measurement data (multiple measurements of the same
characteristic), the entire subgroup is treated as one variable and is assigned one
variable name. The measurements for each subgroup are differentiated by number.
Thus a subgroup of three diameter measurements would have the variable name
“DIAMETER,” and subgroup numbers 1, 2, and 3, as follows:
DIAMETER:1 DIAMETER:2 DIAMETER:3
The Quality Analyst Editor assigns the subgroup numbers automatically when you
identify the variable as a subgroup type when you create the file.
For “reduced” data, the mean, range, and standard deviation for a variable would
also share a variable name, and be identified as types X, R, and S. For example:
MOISTURE:X MOISTURE:R MOISTURE:S
You specify the variable types X, R, and S when you define the variable in the
Quality Analyst Editor.

Data Type
After you name the variable, you must indicate what type of variable it is. In the
column labeled Type, you can either type in a legal Quality Analyst variable type,
or you can click the button in the right end of the cell and select the variable type
from the resulting drop-down list. Quality Analyst variable types can be composed
of one or more data types depending on the type of data, the form they are in, and
the analyses you intend to perform on them. Variables composed of more than one
data type have a single name but are displayed in the Editor in multiple columns.
The following table lists all legal Quality Analyst data types. The table below that
lists all legal variable types (showing how the data types can be combined) and
notes their common application.

Quality Analyst Data Types

Type Group Type Description


Measurement Types 1,2,…n Subgroup measurement data (See note)
X X-bar (mean) of a subgroup
R Range of a subgroup
S Standard deviation of a subgroup
I Individual measurement (subgroup of one)

CHAPTER 3: Creating and Editing Data Files • 37


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Type Group Type Description


Attribute Types P Number of defects or nonconformities
Z Sample size for defect data
Description Types D DateTime
T Time
A Alphabetic description
N Numeric description (not data)
Other Types G Value for “grouped” data
M Multiplier for “grouped” data
C Category data (one of the Pareto types)
O Other numeric data
Note: For subgroup measurement data, you must type in the number of measurements in the subgroup;
subgroup size is not available from the drop-down list.

38 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Quality Analyst Variable Types

Type Description Application


D DateTime Always an individual variable.
T Time Always an individual variable.
A Alphabetic description Always an individual variable.
N Numeric description Always an individual variable.
I Individual measurement Always an individual variable.
1,2,…200 Subgroup measurement Displayed in the specified number of columns.
data.
O Other numeric data Always an individual variable.
P Number of defects or Corresponding sample size must be specified in
nonconformities a Z variable, as a variable parameter, or when
prompted at chart time (if not yet specified).
Z Sample size for defect Not meaningful without one or more
data. corresponding P variables.
X X-bar (mean) of a Sometimes used as an individual variable.
subgroup
R Range of a subgroup Sometimes used as an individual variable.
S Standard deviation of a Sometimes used as an individual variable.
subgroup
CM Category with Multiplier C and M have no meaning as individual
variables.
GM Value with Multiplier G and M have no meaning as individual
variables.
XR X-bar and Range of a Associated descriptors of the same data.
subgroup
XS X-bar and Standard Associated descriptors of the same data.
Deviation of a subgroup
XRS X-bar, Range, and Associated descriptors of the same data.
Standard Deviation of a
subgroup

For example, one way of describing a subgroup of seven measurements of weight


is to enter “7” as the data type for a variable named WEIGHT. Each of the seven
individual measurements in the subgroup will be displayed in its own column in
the Editor. From this variable, you would be able to create an X-bar, Range,

CHAPTER 3: Creating and Editing Data Files • 39


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Standard Deviation, Individual, or Median chart (among others). Alternatively,


you could describe the subgroup by creating a variable named WEIGHT of type
XRS. The Editor will display this variable in three columns, in which you would
enter the mean, range, and standard deviation of the seven measurements. From
this variable, you could create an X-bar, Range, or Standard Deviation chart, but
not an Individual or Median chart since the individual measurements are not
contained in the file.
When choosing a data type, be sure to choose a type appropriate for the data and
the analyses you will want to perform on them. For example, you can not create an
X-bar chart on type N (numeric description) data; even though they may look like
numerical data, Quality Analyst treats data of this type as descriptive information
and therefore will not perform numerical analysis on them.
The following sections describe each category of data type.

Measurement Data Types


Individual Measurement Data
Individual measurement data is designated as type I. Use this data type when each
line, or record, in your file represents a separate individual measurement, as
opposed to subgroup or reduced data, as discussed below.

Subgroup Measurement Data


Designate subgroup measurement data by entering, for the variable data type, the
number of measurements in the subgroup (up to 200). The measurements will
have the same variable name but will be designated specifically by their ordinal
position in the subgroup. For example, the Editor would display a subgroup of
five weight measurements in five columns with the variable name WEIGHT and
additional column labels “(1)” through “(5)”.

40 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Editor with a subgroup measurement variable (WEIGHT)

Reduced Data
“Reduced” data is data that is represented by the mean, range, and standard
deviation of measurements in a subgroup. This type of data is often available
instead of raw subgroup measurements, possibly from a measuring system that
performs the calculations on the measurements before storing or transmitting the
data. The variable types are designated X (X-bar or mean), R (range), and S
(standard deviation). The data for a single variable should have the same variable
name. For example:

DATE TIME OPERATOR WT(X) WT(R) WT(S)


3/5/86 8:20 JLK 24.00 1.0 0.353
3/5/86 9:00 JLK 22.25 5.0 1.920
3/5/86 18:15 SMW 24.75 3.5 1.25

CHAPTER 3: Creating and Editing Data Files • 41


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Attribute Data Types


Defect data is represented by variables of type P which contain the number of
defects. The sample size for each variable of this type can be either fixed (for the
entire file) or variable. If it is variable, it is represented by a variable of type Z in
the file. When creating control charts, you specify the fixed sample size or the
variable to use for sample size on the Variable Parameter dialog box as described
under Sample Size–Attribute Data on page 290. Note that the P and Z variables
do not have the same variable name. For example:

DATE SCRATCH(P) TESTED(Z)


1/5/05 25 500
1/6/05 31 650
1/8/05 28 400

Description Data Types


Descriptive information fields are used to identify the data found in the same
record or row, and typically represent information such as shift, lot number, time,
date, operator, and production line. There are four types of description data—
DateTime, time, alphabetic, and numeric. Description variables have three primary
uses:
to identify or label data points on charts
to select subsets of data for further analysis
to sort Data files into chronological or other order

Descriptive information cannot be used for numerical calculations in the chart


functions or statistical-analysis functions. The length of a descriptive variable
must be 65 or fewer characters.

DateTime
DateTime variables are designated type D. The value of a DateTime variable must
include a date and may include a time, separated from the date by a space.
Quality Analyst recognizes three date formats.

42 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Quality Analyst Date Formats

Format Example
Month/Day/Year 10/2/06
Day/Month/Year (European) 2/10/06
Day/Month/Year (Military) 2-OCT-06

All dates must contain the year which can be either two or four digits, for
example: 06 or 2006. Date formats may not be mixed within a file.
Date delimiters must be either “/”, “-”, or “.”, and must not be mixed within a file.
Do not use spaces or commas as date delimiters, since Quality Analyst would treat
each element as a separate field.
The first two example date formats require a numeric representation for the month.
For the military date, the months must be represented by JAN, FEB, MAR, and so
on. The characters may be all uppercase, all lowercase, or “proper-name” case
(one uppercase letter and two lowercase letters), for example JAN, jan, or Jan.
You should use case consistently, since many Quality Analyst functions
distinguish between the same character in a different case.
The date format in the Data file must be the same as that specified globally as
explained under Date Format on page 248.
If the value of a DateTime variable includes a time, enter it in the format HH:MM
or HH:MM:SS where HH is the hour (00–24), MM is minutes (00–59), and SS is
seconds (00–59). If the time element is absent, Quality Analyst assumes it is
00:00:00 (midnight at the beginning of the day). If the seconds element is absent
in a time element, Quality Analyst assumes it is 00.
Leading zeros in any date or time element are acceptable but not necessary. For
example, the date 12-01-06 is treated the same as 12-1-06, and the time 03:05 is
treated the same as 3:05 and 3:5.

Time
Time variables are designated type T and contain elements for hour, minutes, and
seconds. Time delimiters may be either “.” or “:” (to configure, see Time
Delimiter on page 249) and must not be mixed in the same file. Leading zeros are
unnecessary.

CHAPTER 3: Creating and Editing Data Files • 43


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Example Quality Analyst Time Formats

Format Example
Hour:Minute 14:20
Hour.Minute 6.30
Hour:Minute:Seconds 18:37:32

If you intend to sort or filter your Data file by time, you should use the 24-hour
time format.
If you are using an existing file that contains a time field in a 12-hour format and
you intend to sort or filter the file by time, you should add an alphabetic
description field (see below) to your file to indicate whether the time is A.M., P.M.,
noon, or midnight. In this field, enter “AM” for A.M., “PM” for P.M., “NN” for
noon, and “AA” for midnight. If you have configured Quality Analyst to be case-
sensitive when sorting or filtering on alphabetic fields (as explained under Text
Settings on page 249), be sure to use case consistently, since “PM” and “pm” are
treated differently when Quality Analyst is configured that way. (By default,
Quality Analyst ignores case in alphabetic comparisons and considers “PM” and
“pm” to be identical.)
The time format in the Data file must be the same as that specified globally as
explained under Time Delimiter on page 249.

Alphabetic Description Fields


Variables for alphabetic description fields, such as those indicating shift, operator
code, or batch number (especially if it has alphabetic characters) are designated
type A. These variables can be used to label charts and to select subsets of the file.
Alpha description fields may contain upper- and lowercase letters, numerals, and
all other printable ASCII characters except spaces or commas, which will be
interpreted as field delimiters. The length of an alphabetic description variable
must be 65 or fewer characters. You can set up Quality Analyst to be either “case
sensitive” (uppercase letters do not equal lowercase letters) or “case insensitive.”
If you set up Quality Analyst to be “case sensitive,” be consistent when using
case, since Quality Analyst will differentiate between entries such as “AM,”
“Am,” and “am.”

Numeric Description Fields


Variables for numeric description fields are designated type N. Use this type if a
description is completely numeric and contains no alphabetic characters. The

44 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

advantage of numeric over alphabetic description variables is in sorting and


formatting for reports. Type N variables cannot be used in charts or statistical
functions except as descriptions.

Additional Data Types


Grouped Data and Multiplier
Data type G is used for values for “grouped data,” where a value is associated
with the number of times that the value occurs. Dimensional data is often collected
in this form. This data type requires a corresponding “multiplier” for the G
value—the number of times the corresponding value is observed. The multiplier is
designated type M, and must have the same variable name as its associated
grouped data variable. For example:

PART4(G) PART4(M)
23.5 5
29.0 8
27.1 3

Category Data and Multiplier


Type C is used for “category data,” as in a list of defects, where a defect is
associated with the number of times that the defect occurs. Defect data is
occasionally collected in this manner, most often by data-collection devices. This
type requires a corresponding “multiplier” for the C value—the number of times
the corresponding defect is observed. The multiplier is designated type M, and
must have the same variable name as its associated category variable. This data
can be used to create Pareto diagrams. For example:

TEST(C) TEST(M)
BENT 15
SCRATCH 12
DIRTY 13

CHAPTER 3: Creating and Editing Data Files • 45


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Other Data
Data that does not match one of the other types is designated type O. Use this type
for numeric data that is neither measurements nor defects, but may be analyzed by
one of the statistical functions.

Description
In the column labeled Description, enter a short description of what the variable is.
This will be used for labeling charts and reports. Descriptions may be up to 40
characters long (including spaces and punctuation). For measurement variables,
you might want to include the units of the measurement, for example,
Door Clearance (mm)

Lower, Upper, and Target Specifications


In the columns labeled LSL, USL, and Target, you may specify, for measurement
variables, the lower and upper specifications and a target value for the variable.
These are used in process-capability displays and in calculating capability indices,
and may be displayed in some control charts.
You can supply specifications by entering them directly into the appropriate cells
in the grid. The Editor will not allow entries in these columns for data types other
than measurements.
You can also configure Quality Analyst to read specifications from an external
database, as explained in the next section. If you do not need to do this, you can
skip ahead to Other Variable-Definition Parameters on page 55.

Reading Specifications from a Database

Note: If you are not reading specifications from a database, you can skip to
Other Variable-Definition Parameters on page 55.

You can configure Quality Analyst to read specifications from a database. Quality
Analyst can read specifications stored in either of the two general table formats
shown in the following examples.

46 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Each Specification in a Separate Database Field

In the format above, each row of the data table contains all specifications, in
separate columns, for a single attribute (for example, length or weight) of a single
product. Other columns indicate the product and attribute.

All Specifications in One Database Field

In the format above, each row of the data table contains a single specification and
the columns indicate the product, measurement name, specification type, and
specification value.
If your specifications are stored in a table that does not match either of these
general formats, you can create your own SQL query to read specifications.

CHAPTER 3: Creating and Editing Data Files • 47


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To start the process, click the External LSL, USL, Target button in the Variable
Definition and Specifications dialog box. The External Specification Database Setup
dialog box will appear.

In the Connection list, select the type of database in which your specifications are
stored. The list contains most popular database formats.
In most cases, when you select a Connection type, a corresponding Open dialog
box will appear.

48 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Select the source where your specifications are stored, then click Open. The name
of the source will appear in the Data Source box.
If you specify ODBC for Connection, no Open dialog box will appear. Instead, the
Data Source box becomes a drop-down list that contains all the Data Source
Names (DSNs) defined on your system. Open the list and select the DSN of the
database that contains your specifications.
If you need to create a custom SQL query to retrieve specifications, you can skip
to Entering a Custom SQL Query on page 54.

Using Specifications Stored in a Typical Format


To configure Quality Analyst to read specifications from one of the typical table
formats illustrated above, select Specifications Table and, in the adjacent list, select
the table in the database that contains the specifications.
In the ID Field list, select the database field (column) that contains the names of the
measurements. In the example table, it is “Variable.”

Each Limit in a Separate Database Field


If your specification table stores each specification in a separate field (as in the
first example above), select Each Limit in a Separate Database Field in the Limit
Identification area.

CHAPTER 3: Creating and Editing Data Files • 49


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

In the USL Field list, select the database field (column) that contains the upper
specification limits for the measurements. In the example table, it is “USL.”
In the LSL Field list, select the database field (column) that contains the lower
specification limits for the measurements. In the example table, it is “LSL.”
In the Target Field list, select the database field (column) that contains the target
values for the measurements. In the example table, it is “Target.”

All Limits in One Database Field


If your specification table stores all specifications in a single field (as in the
second example above), select All Limits in One Database Field in the Limit
Identification area.

50 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

In the Limit Value Field list, select the database field (column) that contains the
values of the specifications. In the example table, it is “SpecValue.”
In the Limit ID Field list, select the database field (column) that contains the type of
the specification. In the example table, it is “SpecType.”
In the USL Name box, enter the value of the Limit Value Field that corresponds to
the upper specification limit for the measurements. In the example table, it is
“USL.”
In the LSL Name box, enter the value of the Limit Value Field that corresponds to
the lower specification limit for the measurements. In the example table, it is
“LSL.”
In the Target Name box, enter the value of the Limit Value Field that corresponds to
the target for the measurements. In the example table, it is “Target.”

Filtering the Specifications Database


If necessary, you can filter out data from the specifications table in your database
so that you read only the correct specifications. For example, your specifications
table may contain specifications for several products, each with their own distinct
set of measurements. If your Data Set represents only a single product or some
subset of all the measurements for a product, you will probably want to filter out
the specifications for the products and measurements that do not apply.
To do this, create one or more filters in the Specifications Filters area. Start by
clicking the New button. The Select Filter Columns dialog box will appear.

Select the database field (column) whose values you want to filter by, then click
OK. That field will appear in the Database Field(s) list.
In the editable Must Match list, specify the value of that database field for which
you want to read specifications. Do one of the following:
Enter a legal value of that database field.
Select (Ask) from the drop-down list. Each time Quality Analyst queries the
database for specifications, Quality Analyst will prompt you to enter a value
for the database field.

CHAPTER 3: Creating and Editing Data Files • 51


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Select one of the field names, if any, in the list. If your Data Set is configured
to connect to an external database, and it is configured to prompt you, when it
connects, for the value of one or more database fields, then those database
fields will appear in this list. If you select one of those database fields here,
then the value you enter when Quality Analyst connects to the database will
be used for this specifications filter.

To remove a filter, select the field in the Database Field(s) list, then click Remove.

Testing the Database Specifications Settings


Before you commit to your database specifications settings, you may want to test
them to see if they retrieve the correct specifications.

To test your database specifications settings:


1 Click the Test button in the Test Connection area. The Database Specifications
dialog box will appear.

2 Verify that the correct specifications are being retrieved for the corresponding
variables.
3 Click OK.

When your settings produce the desired results, click OK in the External
Specification Database Setup dialog box to return to the Variable Definition and
Specifications dialog box.

Assigning Specifications to Variables


Select the Variable Parameters tab.

52 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

For each measurement variable:


1 Select the measurement variable in the Variable list.
2 Click the Select button next to the Specification ID box. The Select
Specification Variable dialog box will appear.

3 Select the value of the Variable Name Identifier field (from the Database
Specification Setup dialog box) that corresponds to the selected variable.
4 Click OK.

CHAPTER 3: Creating and Editing Data Files • 53


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Entering a Custom SQL Query


If the table of specifications in your database is not in one of the two typical
formats discussed above, you can create a custom SQL query for Quality Analyst
to use.

In the External Specification Database Setup dialog box, select User Supplied SQL,
then click the adjacent Enter SQL button. The User Supplied SQL dialog box will
appear.

In the USL, LSL, and Target boxes, enter (or paste from another application) the
SQL commands that will retrieve the appropriate values for each specification
respectively.

54 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Select the Pass SQL to Database for processing check box if you want Quality
Analyst to send the SQL query directly to the database to be processed. You will
want to do this if your query uses the “native” SQL dialect of your database. If
you clear this check box, Quality Analyst will send your query to the Microsoft Jet
database engine on your system, in which case you should use Microsoft
Jet/Access SQL syntax.
Click OK.

Other Variable-Definition Parameters


Click the Variable Parameters tab at the bottom of the dialog box to enter
additional variable-definition parameters for each variable:
Input Mask
Column Width
Decimal Places
Axis Label
Specification ID

The area labeled Parameters will display the current settings for the selected
variable. You can select a variable by clicking its name in the Variables list at the

CHAPTER 3: Creating and Editing Data Files • 55


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

left of the Variable Parameters tab, or by selecting any cell in the row for the
variable in the grid above.

Input Mask
In the box labeled Input Mask, you can enter a “template” or “mask” to make
entering data easier. The mask lets you avoid entering unchanging or repetitive
portions of input for every datum. A mask can contain “replaceable” and “fixed”
characters. Replaceable characters in the mask will be replaced by the characters
you enter into a data cell to which the mask applies. Fixed characters will be
added to the characters you enter.
There are two allowable replaceable characters—the pound sign (#) and the
ampersand (&).
Use # to allow only digits to be entered with an input mask.
Use & to allow any character to be entered with an input mask.

Any other characters in the input mask are treated as fixed characters. The
following table shows some sample input masks and their behavior with sample
entries.

Sample Input Masks and Their Effect

With this Mask Entering This Results in This Comment


1.00### 635 1.00635 ### replaced with digits 635
1.00### 63 1.00630 absent third digit filled with “0”
6/##/94 01 6/01/94 ## replaced with 01
6/##/94 1 6/10/94 absent second digit filled with “0”
R45-&&& TLX R45-TLX &&& replaced with TLX
R45-&&& TL R45-TL_ absent third character filled with “_”
P22&# A3 P22A3 &# replaced with A3
P22&# 33 P2233 & allows digit
P##-A## 4598 P45-A98 45 and 98 split between ##s

While editing the grid, when you select a cell to which an input mask applies, the
status line at the bottom of the Quality Analyst window displays Input Mask:
followed by the mask. You can override the input mask temporarily by pressing
<CTRL+O> or by opening the Edit menu and selecting Override Input Mask. This
is described in more detail under Overriding an Input Mask on page 87.

56 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Column Width
In the box labeled Width, you can specify the approximate number of characters
for the width of the data column when displayed by the Editor. The units of Width
are the approximate number of characters since the widths of characters in most
Windows fonts are not uniform. This setting affects only the display of the values
in the Editor and does not cause data values to be rounded or truncated.

Note: You can also set the column width in the Editor using your mouse by
dragging the right edge of the column header left or right.

Decimal Places
In the box labeled Decimal Places, enter the number of decimal places for the
variable. (This setting is available for numeric data only.) As you enter data for
this variable in the Editor, Quality Analyst will round it off to this many decimal
places before placing it in the cell.

Note: This setting affects not just the display of the data but the data
themselves. Only the number of decimal places you specify will be stored
in the Data file.

Axis Label
Quality Analyst will use the text you enter in the box labeled Axis Label to label
the X or Y axis of graphs when the selected variable is plotted along that axis.
Normally, Quality Analyst will use either the variable name or no label. This
setting lets you override that behavior and specify a label that is longer, shorter, or
perhaps more “readable” than the variable name.

Specification ID
This setting is used to assign specifications that are read from a database to the
appropriate Data Set column. Its use is explained under Assigning Specifications
to Variables on page 52.

Specifying Key Columns for the Data Set


Select the Key Columns tab to identify the columns in your Data Set that Quality
Analyst will use to synchronize certain SPC parameters of the Data Set with the
data in the Data Set. Choose one or more columns whose values, taken together,

CHAPTER 3: Creating and Editing Data Files • 57


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

uniquely identify each record in the Data Set. Usually, a date and a time field will
suffice, but you might need to include a lot or part number as well.

To select a key column:


In the Columns list, do one of the following:
Double-click the column name, OR
Click the column name to select it, then click the Select button.

The column name appears in the Key Columns list.

To remove a key column from the list:


In the Key Columns list, do one of the following:
Double-click the column name, OR
Click the column name to select it, then click the Remove button.

You must arrange the key columns in order of decreasing significance—that is,
most significant (coarse) first, and least significant (fine) last.

To re-order the key columns:


1 Select the key column you want to move by clicking it.
2 Click the up or down button (see left) next to the list.

58 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

The values of the key columns are used to associate the data in the Data Set with:
Graphics comments assigned to charted data points (see Annotating Charts
on page 203)
Assignable causes and corrective actions assigned to charted data points (see
Assigning Causes and Corrective Actions to Data Points on page 217)
Limit regions—regions of data identified for the calculation or application of
control limits (see Defining Regions on page 304)
Tagged data

We strongly recommend that you identify key columns for your Data Sets in all
cases, but if you are certain you will never use any of the features listed above,
you can forego selecting any key columns.

Note: If you are defining a Connectivity Data Set, you should always select key
columns for your Data Set. You can do so either as explained above, or
in the Database Connectivity Definition dialog box as explained under
Specifying Key Columns on page 570.

Specifying Lists of Assignable Causes and Corrective


Actions
If you will want to assign causes and corrective actions to charted data points that
violate rules or specifications, you must associate a list of appropriate causes and
corrective actions with each variable that you might want to flag. To do this, select
the Assignable Cause Corrective Action tab.

Note: Before you can assign lists of causes and corrective actions to a variable
on this tab, you must have already created those lists. See Assignable
Cause Corrective Action on page 275 for instructions.
In that section, you may also find Overview of Assignable Causes and
Corrective Actions helpful.

CHAPTER 3: Creating and Editing Data Files • 59


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To associate lists of assignable causes and corrective actions with a variable:


1 In the Variables column, select the variable.
2 In the Assignable Cause Category list, select the name of the list of assignable
causes that applies to this variable.
3 In the Corrective Action Category list, select the name of the list of corrective
actions that applies to this variable.

Note: Assigning causes and corrective actions to individual data points on a


chart is explained under Assigning Causes and Corrective Actions to
Data Points on page 217.

Printing and Saving the Data Definition


After you have specified all variables, click Print if you want to print the variable
definitions and specifications. (Click Printer, if necessary, to make sure your
printer is configured properly.)
To save the data definition, click OK. The Editor will display a data grid much like
a spreadsheet. The labels in the column headings will reflect the data structure you
just defined.

60 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Specifying Column Definition and Calculations


After you have specified the basic structure of your Data Set in the Variable
Definition and Specifications dialog box, Quality Analyst lets you structure your
data in two additional ways.
You can define any variable to be the result of a calculation based on the
values of other variables.
You can rearrange the display order of your data columns. This is a cosmetic
change, and only affects the display of the data in the Editor.

If you are satisfied with the display order of the data columns and do not need to
define any calculated variables, the settings in this form are optional and you may
ignore this section.
To perform either of these operations, open the Edit menu and select Column
Definition and Calculations. The Column Definition and Calculations dialog box will
appear.

Each row of this grid corresponds to a column of data as displayed in the Editor.
The first column of the form is unlabeled and simply numbers each row of the grid
(or column of data). The remaining columns are labeled Name, Type, =, and
Calculation Definition.

CHAPTER 3: Creating and Editing Data Files • 61


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Note: Detailed explanations of the editing functions and features of this form
are presented under Data Structure Editing Functions on page 31.

Variable Name and Data Type


The first two columns, labeled Name and Type, are the same as the corresponding
columns in the Variable Definition and Specifications dialog box except that the
data types of the elements of subgrouped measurements are the ordinal number of
each element, rather than the total number of elements. Though Quality Analyst
will let you rename and re-type data columns in this form we highly recommend
against doing so for subgroup variables; use the Variable Definition and
Specifications dialog box instead.
Remember that changing the data type of existing data may affect the types of
analyses Quality Analyst can perform on your data.

Defining Calculated Variables


Quality Analyst lets you define a variable as a “live” formula based on other
variables in the Data Set. You can define formulas for calculated variables that
include most common mathematical operations and any combination of Quality
Analyst numeric variables. Quality Analyst displays calculated data using blue
numbers in the Editor.

Note: The variables created by this procedure contain live data. That is, if the
values of any variables in the formula change while you are editing the
file, the value of the calculated variable will also change (as in a
spreadsheet). If instead, you want to calculate values based on other
variables and insert them as fixed values into a new data column, see
Saving New Calculated Variables to a Data File on page 541.

Define calculated variables in the Column Definition and Calculations dialog box
which you can display by opening the Edit menu and selecting Column Definition
and Calculations. Calculations are defined using the columns labeled = and
Calculation Definition.

62 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To begin entering a formula:


Select the cell in the Calculation Definition column and start typing a
formula,
OR
Select the cell in the Calculation Definition column and press <INSERT>,
OR
Click the “=” button in the column labeled “=”.

In all cases, the cell in the Calculation Definition column will become a large gray
text box in which you compose your formula. You can type the formula from the
keyboard or use the Calculation Parameters area that will appear in the lower half
of the dialog box. See Composing a Formula below.

Column Definition and Calculations dialog box with formula composition box
awaiting a formula

When you have composed your formula, click OK in the Definition Parameters
area. Quality Analyst will check the formula for errors. See Correcting Errors in
Formulas below.

Calculation Parameters
You can use the Calculation Parameters area of the dialog box to compose a
formula by pointing and clicking variable names and operators.

CHAPTER 3: Creating and Editing Data Files • 63


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To add a variable (column) name to the formula area:


Double-click the column name in the list of Columns, OR
Select the column name, then click Select below the Columns list.

To add an operator, function, or punctuation to the formula area:


Double-click the operator in the list of Operations, OR
Select the operator, then click Select below the Operations list.

To complete the formula definition, click OK in the Definition Parameters area.


Quality Analyst will check the formula for errors. See Correcting Errors in
Formulas below.

Composing a Formula
Formulas for calculating variables follow common algebraic rules for notation and
order of evaluation. They may include any variable name in the input file and any
of several common mathematical functions or operations.

Variable Names
To base the calculation on an existing variable, include its name and data type,
separated by a colon, in the formula. For example:
PITTED:I + BUBBLES:I + MARKS:I + EDGE:I
If the variable comprises subgrouped measurements (type 1, 2, 3, and so on),
replace the data type with the subgroup element number. For example:
(DIAM:1 + DIAM:2 + DIAM:3) / 3

Operators
The following table lists the operators and functions available for composing
formulas for calculated variables. Enclose arguments to functions and operators in
parentheses. For example:
LN(SIZE:I)

Available Operators for Calculated Variables

Operator Type Operator Description


Arithmetic + addition
- subtraction
* multiplication

64 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Operator Type Operator Description


/ division
\ integer division (divide, discard remainder)
^ exponentiation (raises to a power)
Multi-Argument AVG mean of arguments
MAX largest of arguments
MIN smallest of arguments
RANGE difference between largest and smallest argument
STDDEV standard deviation of arguments
SUM sum of arguments
Trigonometric ATN arctangent
COS cosine
DEG convert argument from degrees to radians
GRD convert argument from grads to radians
SIN sine
TAN tangent
Other ABS absolute value
DATEONLY date portion of a DateTime field
EXP raise e to the power
INT integer portion
LN natural log
LOGn log (specified base)
MOD modulo (remainder of division)
ROW number of the current row in the Data file
SQR square root

Multi-argument Functions
The multi-argument functions operate on two or more arguments. These
arguments may be passed as individual arguments or a range of columns.
Separate individual arguments with commas:
MIN(LENGTH:I,WIDTH:I,HEIGHT:I)

CHAPTER 3: Creating and Editing Data Files • 65


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

MAX(WEIGHT:I,550)
To pass a range of columns as an argument, separate the first column from the last
column with a tilde (~):
RANGE(WEIGHT:1~WEIGHT:5)

Order of Evaluation
The elements of a formula are calculated in the following order:
1 functions
2 expressions within parentheses
3 exponentiation
4 multiplication and division
5 addition and subtraction

For example:
SIN(SIZE:I)^2 [the square of the sine of SIZE]
SIN(SIZE:I^2) [the sine of the square of SIZE]
Use parentheses to override normal evaluation order:
2*(EDGE:I+CENTER:I) [add first, then multiply]

Using Spaces For Readability


You can include spaces in formulas to improve readability. For example, the
following two lines are equivalent:
FLOW:I + CONC:I^2 / 22.9
FLOW:I+CONC:I^2/22.9

Function Modifiers
For logarithms other than natural logarithms (base e), include two arguments in
parentheses—the number to take the log of and the base of the logarithm function.
For example:
LOGn(WEIGHT:I,10) [base-10 logarithm of WEIGHT]
Trigonometric functions are performed in radians. Convert values in degrees or
grads to radians before passing them to trigonometric functions using one of the
unit-conversion functions—DEG or GRD. For example:
SIN(DEG(LENGTH:I)) + COS(DEG(DIAM:I))

66 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

SIN(GRD(LENGTH:I)) + COS(GRD(DIAM:I))

Examples of Legal Formulas


Mean of the 5-element subgrouped variable WEIGHT:
AVG(WEIGHT:1~WEIGHT:5)
Difference between the highest and lowest of three values, one of which is the
mean of a subgroup variable:
RANGE(AVG(WEIGHT:1~WEIGHT:5),CHECK1:I,CHECK2:I)
Lower of two values (this formula can be used to “cap” a variable):
MIN(DIAM:I,1.625)
Largest value in all columns in a file whose columns (left to right) are DIAM:1,
DIAM:2, DIAM:3, WEIGHT:I, THICK:1, THICK:2, and THICK:3:
MAX(DIAM:1~THICK:3)
Three standard deviation above the mean of a subgrouped variable, HG:
AVG(HG:1~HG:5)+3*STDDEV(HG:1~HG:5)
Square root of size:
SQR(SIZE:I) or
SIZE:I^0.5
Natural logarithm of WEIGHT:
LN(WEIGHT:I)
Base-10 logarithm of DIAM
LOGn(DIAM:I,10)
Sine of the square of FLOW (in radians) divided by the difference between SIZE
and 1.0:
SIN(FLOW:I^2) / (SIZE:I-1)
Sine of the square of SIZE (in degrees) divided by the difference between SIZE
and 1.0:
SIN(DEG(SIZE:I^2)) / (SIZE:I-1)
Quotient of 420 and the absolute value of the integer portion of PRESS:
420 / ABS(INT(PRESS:I))

CHAPTER 3: Creating and Editing Data Files • 67


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Polynomial DIAM cubed plus 3.2 times DIAM squared minus 1.32 times DIAM
minus 1.0:
DIAM:I^3 + 3.2*DIAM:I^2 - 1.32*DIAM:I - 1.0
Function 6.3 plus 1.25 times LENGTH minus 0.89 times WIDTH plus 22.5 times
HEIGHT:
6.3 + 1.25*LENGTH:I - 0.89*WIDTH:I + 22.5*HEIGHT:I
Natural log of LENGTH plus the sine of WIDTH (in radians) minus the reciprocal
of the difference between HEIGHT and 1.0:
LN(LENGTH:I) + SIN(WIDTH:I) - 1/(HEIGHT:I-1)
The square of DIAM plus e raised to the power THICK:
DIAM:I^2 + EXP(THICK:I)
The date portion of the DateTime variable TIMESTAMP:
DATEONLY(TIMESTAMP:D)

Correcting Errors in Formulas


When you click OK after defining a formula for the variable you are defining,
Quality Analyst checks the formula for errors. If it finds an error, a message box
appears and displays an error message and a pointer (“^”) to the location of the
error. Here are a few examples:
The error message box displays:
LN(DIAM:I) / (DIAM:I-4
^
")" expected.
The closing parenthesis is missing. The “^” indicates where it was expected.
The error message box displays:
LOG(LENGTH:I)
^
":" expected.
Because the logarithm function is spelled “LN,” the formula evaluator thinks
“LOG” is a variable name and expected the required colon. The “^” indicates
where the colon was expected.

68 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Rearranging Data Columns


Notice, on the Column Definition and Calculations form below, that each column
of data for the variable GAP (which is a subgroup of five measurements) has its
own row in the grid—unlike in the Variable Definition and Specifications dialog
box where the entire subgroup is represented by a single row.

You can change the order in which data columns are displayed in the Editor by
rearranging the rows in this grid. The section Inserting, Deleting, and Moving
Variables on page 35 describes how to rearrange rows in the grid.

Printing and Saving the Data Definition


After you have specified all column definitions and calculations, click Print if you
want to print them. (Click Printer, if necessary, to make sure your printer is
configured properly.)
To apply the column definitions and calculations, click the OK button. The Editor
will display a data grid much like a spreadsheet. The labels in the column
headings will reflect the data structure you just defined.

CHAPTER 3: Creating and Editing Data Files • 69


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Modifying the Data Structure and Display


Once you have defined your data structure, and perhaps entered data, you can
modify the data structure of the file at any time. There are two ways to do this—by
opening the Edit menu and selecting either Variable Definition and Specifications or
Column Definition and Calculations. (If these menu items are disabled, see File
Paths and Permissions on page 269 or contact your system administrator.) The
attributes of the data structure that you can change with each are summarized in
the following table and described in detail below.
With either method, you should exercise caution when restructuring a Data file,
since doing so can alter your data in ways that may be unintended. For example, if
you change the Name of one of the columns in a variable with subgroups, that
column (including the corresponding data) will be removed from the subgroup and
will become a separate variable.

70 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Where to Restructure Your Data

Variable Definition Column Definition


Attribute of Data Structure
and Specifications and Calculations
Variable name
Data type of variable (1)
Variable description
Target specification
Upper and lower specification limits
Input mask
Column width for display
Decimal places
Axis label
Specification ID
Key columns
Assignable Cause/Corrective Actions
(2)
Display order of data columns
Calculation definition
(1) including the size of subgroups
(2) including rearranging and even separating subgroup elements

Another word of caution: Deleting a column using either method deletes the
corresponding data from your Data Set. If you do this inadvertently, recover the
data by exiting the Editor without saving the changes, then start the Editor again
and reopen the Data file. If you try to delete a column that is used to calculate
another column, Quality Analyst will warn you that the formula for the calculated
column will be deleted, and ask you to confirm your intention to do this. If you
confirm, the values in the calculated column will be converted to fixed values and
inserted into the column before the formula is deleted.

Variable Definition and Specifications


When you open the Edit menu and select Variable Definition and Specifications,
Quality Analyst displays a form identical to that displayed when you originally
structured your Data file. To modify the structure of your Data Set, simply edit the
contents of this form according to the instructions in the section Specifying
Variable Definition and Specifications on page 35.

CHAPTER 3: Creating and Editing Data Files • 71


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Column Definition and Calculations


When you open the Edit menu and select Column Definition and Calculations,
Quality Analyst displays a form identical to one you might have used to structure
your Data file when you created it. To modify the structure of your Data Set,
simply edit the contents of this form according to the instructions in the section
Specifying Column Definition and Calculations starting on page 61.

72 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Editing Functions
This section describes the data-editing functions and features available in the
Quality Analyst Editor. (If items on the Edit menu are disabled, see File Paths and
Permissions on page 269 or contact your system administrator.)

Selecting a Font for the Editor


Before you begin using the Editor, you may want to specify a typeface for the data
cells, column headers, and row labels that suits your needs.

To select a font for the Editor:


1 Open the View menu, point to Font, then select Choose.
2 In the Font dialog box, specify the typeface you want.

CHAPTER 3: Creating and Editing Data Files • 73


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

3 Click OK.

To reset the Editor font to the installation default:


Open the View menu, point to Font, then select Reset.

Configuring the Toolbar


You can configure the Quality Analyst toolbar to meet your needs. You can
change the size of the toolbar buttons and add or remove buttons.

To change the size of the toolbar buttons:


Open the View menu, point to Toolbar, then select Large Buttons , Medium
Buttons, or Small Buttons. (A checkmark ( ) indicates the current button
size.)

74 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To select the buttons that appear on the toolbar:


1 Open the View menu, point to Toolbar, then select Customize. The Customize
Toolbar dialog box will appear.

2 Select or clear the check box next to each button or separator to include or
exclude it from the toolbar.
3 Click OK.

Note: The functions of all toolbar buttons are available from Quality Analyst’s
menus, so you will not lose functionality by removing a button from the
toolbar.

Moving Around in the Data Grid


When a data grid is first displayed, the upper left-hand cell in the grid is selected.
The thick black border around the cell indicates this.

CHAPTER 3: Creating and Editing Data Files • 75


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Quality Analyst provides several ways of moving from cell to cell. These are
summarized in the table below.

Selecting Cells in the Data Set Grid

User Action or
Result
Keystroke
<RIGHT> Selects the cell to the right of the currently selected cell.
<LEFT> Selects the cell to the left of the currently selected cell.
<UP> Selects the cell above the current cell.
<DOWN> Selects the cell below the current cell.
<ENTER> Moves to the next cell. In Row Mode, skips from the end of
a row to the first column in the next row, if possible.
<TAB> Same as <ENTER>.
<SHIFT+TAB> Moves to the previous cell. In Row Mode, skips from the
beginning of a row to the last column in the previous row, if
possible.
<HOME> Selects the cell in the first column of the current row.
<END> Selects the cell in the last column of the current row.
<CTRL+HOME> Selects the cell in the first column of the first row.
<CTRL+END> Selects the cell in the last column of the last row.
<PGDN> Selects the cell one screenful of rows below the current cell.
<PGUP> Selects the cell one screenful of rows above the current cell.
Click Selects the cell at the mouse pointer.

Choosing Cursor Mode


Notice in the table that certain keystrokes select the “next” or the “previous” cell.
The precise meaning of next and previous depends on which cursor mode you are

76 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

in—row or column. The current cursor mode is shown in the lower right-hand
corner of the Editor where either Mode: ROW (the default) or Mode: COLUMN will
be displayed. 3 (Both the Variable Definition and Specifications and Column
Definition and Calculations dialog boxes are always in Row Mode, so the mode is
not displayed.)
In Row Mode, the “next” cell is the first cell to the right of the current cell. If the
current cell is the last in the row, the next cell is the first cell in the row just below
the current row. The previous cell, in Row Mode, is the cell to the left of the
current cell. If the current cell is the first in a row, the previous cell is the last cell
in the row just above the current row.
In Column Mode, the “next” cell is the cell below the current cell, and the
previous cell is the cell above the current cell, if any. If the current cell is in the
last row of data, the next cell is not the top cell in the column to the right. This lets
you add new rows of data using keystrokes that move to the next cell.

Note: Quality Analyst will never let the “next” cell be in a calculated column.

To switch cursor modes in the Editor:


1 Open the View menu, and point to Cursor Mode. There will be a check mark
(“ ”) to the left of the current mode.
2 Select either Row or Column to enter the corresponding mode.

Moving to a Specific Data Cell


To move to a specific data cell:
1 Do one of the following:
Press <CTRL+G>.
Open the Edit menu and select Go To.

2 In the Go To a Data Cell dialog box, enter the row number and column number
of the cell you want to select.

3
Both the Variable Definition and Specifications and Column Definition and Calculations dialog
boxes are always in Row Mode, so the mode is not displayed.

CHAPTER 3: Creating and Editing Data Files • 77


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

3 Click OK.

Modifying Data
To modify the contents of the selected cell, use the following keystrokes or mouse
actions.

Keystrokes and Mouse Actions for Editing Cell Contents

User Action or
Result
Keystroke
<INSERT> Enters edit mode and places insertion point at end of entry.
Input mask, if any, is not enforced.
<ESC> Same as <INSERT>.
Double-Click Same as <INSERT>.
Text Enters edit mode and replaces current cell contents with
“Text”. Input mask, if any, is displayed and enforced.
<DELETE> Deletes cell contents and enters edit mode. Input mask, if
any, is displayed and enforced.
<CTRL+O> Same as <DELETE> except Input mask is ignored.

These actions place and leave you in edit mode. While in edit mode, the cell will
turn gray and will have a thin black border and the Windows text-insertion cursor
(normally a vertical blinking bar) will appear. While you are in edit mode the
following keystrokes apply.

78 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Edit-Mode Keystrokes

User Action or
Result
Keystroke
<LEFT> Moves insertion point one character to the left.
<RIGHT> Moves insertion point one character to the right.
<HOME> Moves insertion point to the left of all text.
<END> Moves insertion point to the right of all text.
<UP> Accepts current cell contents and selects the cell above.
<DOWN> Accepts current cell contents and selects the cell below.
<ENTER> Accepts current cell contents and selects the next cell.
<ESC> Restores original value and exits edit mode.
<TAB> Accepts current cell contents and exits edit mode.
<CTRL+RIGHT> Same as <END>.
<CTRL+LEFT> Same as <HOME>.
<SHIFT+TAB> Same as <TAB>.
<DELETE> If any text is selected, deletes selected text. Otherwise,
deletes character to the right of the insertion point.
<BACKSPACE> If any text is selected, deletes selected text. Otherwise,
deletes character to the left of the insertion point.
<SHIFT+> When used with <LEFT>, <RIGHT>, <HOME>, or <END>,
selects text in the direction of the move.
Click In same cell, moves insertion point to under the mouse
pointer (I-beam mouse cursor).
Otherwise, accepts current contents of the cell and selects
the cell under the mouse pointer (fat “+” cursor).
Text Enters “Text” into the cell.

Copying and Pasting Data


In Quality Analyst, you can copy data between the Editor and most Clipboard-
capable applications via the Windows Clipboard. These operations are explained
under Pasting Data into the Editor on page 522 and Copying Data Out of the
Editor on page 526.

CHAPTER 3: Creating and Editing Data Files • 79


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Entering Missing Data


As you enter data into your Data file, if you move off of a row that contains empty
cells, Quality Analyst will convert those empty cells to “missing” data
automatically. The missing-data symbol—normally an asterisk (“*”)—will appear
in the cell to indicate that it is missing. You can also enter the missing-data
symbol directly into the cell from the keyboard to indicate a missing datum. How
Quality Analyst treats missing data is discussed in the section Missing Data
Handling on page 287. You can specify a custom missing-data symbol as
explained under Missing Data Symbol on page 272.

Inserting and Deleting Rows


To insert a row in a Data file with the Editor, first select any cell in the row above
which you want to insert a row. Then open the Edit menu and select Insert Row(s).
The Insert Rows dialog box will appear.

In the box labeled Insert Row(s), enter the number of rows you want to insert.
The Insert Row(s) box will display the number of rows you selected before
invoking the dialog box. Change this value if you want to insert a different
number of rows. The Beginning at Row box will display the number of the
row you selected before invoking the dialog box. Change this value if you want to
insert the row(s) above a different row. Click OK. An empty row (or rows) will be
inserted.
If you select more than one entire row before opening the Edit menu and selecting
Insert rows, the number of rows and beginning row number will be displayed in
the Insert Rows dialog box. Clicking OK will insert the specified number of blank
rows above the specified beginning row. Select multiple rows in either of two
ways:
Click and drag the mouse pointer over the row numbers of the rows you want
to insert. OR
Select a single row (by clicking on its row number) and then click another
row number while holding down the <SHIFT> key. That row and all
intervening rows will be selected.

80 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

You can also delete one or more rows in the Editor. Select one or more rows, as
described above, then open the Edit menu and select Delete rows. The Delete Rows
dialog box will appear, asking you to confirm the deletion. In the Delete from Row
box, enter the number of the first row to delete. In the To Row box, enter the
number of the last row you want to delete. Or you can select To End of File to
delete all remaining rows. Click OK to delete the row(s), or Cancel to cancel the
deletion.

Tagging Data
Quality Analyst lets you tag numeric data for “special” treatment. You can tag a
single value or an entire row, or you can tag all values of a variable that meet
criteria you specify.

Note: Configuring how Quality Analyst treats tagged data globally is explained
under Missing and Tagged Data on page 271. You can override the
global setting at the variable level as explained under Tagged Data
Handling on page 287.
Quality Analyst uses the values of the key columns specified for your
Data Set to keep track of which data are tagged. So if you intend to tag
data, be sure to specify key columns for your Data Set. See Specifying
Key Columns for the Data Set on page 57 for instructions.

Tagging Individual Values


To tag a single value:
1 Select the cell containing the data you want to tag using the arrow keys or by
clicking the cell.
2 Do one of the following:
Press <CTRL+T>.
Open the Edit menu and select Tag Data.

CHAPTER 3: Creating and Editing Data Files • 81


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Tagged data is displayed with an asterisk (“*”) next to the data in the cell.

Use the same procedure to untag a tagged value (this function is a toggle). Also,
see Removing Tags on page 85.

Tagging Rows of Data


To tag one or more rows of data:
1 [Optional] Select data in one or more rows by doing one of the following:
Select data cells in one or more rows (left below).
OR
Select one or more rows by dragging the mouse pointer over the row
labels to the left of the data grid (right below).

2 Open the Edit menu and select Tag Rows. The Tag Rows dialog box will
appear.

82 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

3 Select the Tag option.


4 In the Range area, specify which rows you want to tag. (If you did step 1, the
rows you selected will appear in the From Row and To Row boxes.)
In the From Row box, enter the number of the first row you want to tag.
To specify the last row you want to tag, do one of the following:
To specify a particular row, select To Row and enter the number of the
row in the adjacent box.
OR

To tag all rows below the beginning row, select To End of File. (If you
select this option, new rows that you add to the data file will not be
tagged.)

5 Click OK.

Tagged rows appear gray on your screen, and asterisks appear next to the row
numbers and the numeric data in each row.

You cannot make any changes to data in a tagged row. If you want to do so, you
must untag the row first.

CHAPTER 3: Creating and Editing Data Files • 83


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To untag one or more rows of data:


Use the procedure for tagging rows above, but select Untag in the Tag Rows
dialog box.

Also, see Removing Tags on page 85.

Tagging Specific Data Using Autotag


To tag all data that meet specific criteria, open the Edit menu and select Autotag.
The Autotag dialog box will appear.

Select the variable you want to tag from the drop-down list labeled Variable. The
description of the variable will appear in the adjacent text box.
Just below the variable, specify the criteria by which you want to tag data.
To tag all values of the selected variable that are above a certain value, enter that
value in the text box labeled Above. This is usually used to tag high outliers. To
include instances of that exact value, select “=” from the drop-down list. To tag
only values greater than that, select “>” from the drop-down list.
To tag all values of the selected variable that are below a certain value, enter that
value in the text box labeled Below. This is usually used to tag low outliers. To
include instances of that exact value, select “=” from the drop-down list. To tag
only values less than that, select “<” from the drop-down list.

84 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

If you enter both an Above criterion and a Below criterion, Quality Analyst will tag
values thus:

If: Quality Analyst will tag:


Above value > Below value values greater than Above OR less than Below
(that is, values outside the specified range)
Above value < Below value values between Above and Below
(that is, values inside the specified range)

Normally, Variable is selected in the List by area. This causes the Variable drop-
down list to display variables rather than columns. That is, subgrouped
measurements are listed as a single item. With this setting, any value in any
subgroup of the selected variable that meets your criteria will be tagged. If you
select Column instead, the drop-down list will list individual measurements in
subgrouped variables individually, allowing you to tag individual measurements
separately.

Removing Tags
To remove all tags (on values and rows) in a Data file, open the Edit menu and
select Clear Tags.

Finding and Replacing Data


To find a cell based on its contents:
1 Do one of the following:
Press <CTRL+F>.
Open the Edit menu and select Find.

The Find dialog box will appear.

CHAPTER 3: Creating and Editing Data Files • 85


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

2 In the Find box, enter the text you want to search for.
3 In the Search box, select By Rows to search each cell in a row before moving
to the next row. Select Current Column to search the column containing the
selected cell.
4 In the Search Direction area, specify whether to search Up from the current
cell toward the top of the file or Down from the current cell toward the bottom
of the file.
5 In the Matching area, select Case Sensitive to find only those cells where the
text and the case of the text matches your Find text. Select Entire Cell if you
want to find only entire cells, not partial cells, that match your find text. For
example, if you select this option and your find text is “BIN1,” Quality
Analyst will find only cells whose entire content is “BIN1” but not cells
whose entire content is “BIN14” or “PARTBIN1.”
6 Click Find Next to select the next cell that meets the criteria specified in the
dialog box.

To find and replace text in a Data Set:


1 Do one of the following:
Press <CTRL+H>.
Open the Edit menu and select Find & Replace.

The Find and Replace dialog box will appear.

2 Specify the Find text and Search parameters as explained in the previous
procedure.
3 In the Replace With box, enter the text that should replace the found text in the
Data Set.
4 Click Find Next to find the Find text in the Data Set.
5 If the Find text is found, do one of the following:

86 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Click Find Next to retain this occurrence of the found text and find the
next occurrence.
Click Replace to replace this occurrence of the found text with the
Replace With text. Repeat until you have made all desired changes in the
Data Set.
Click Replace All to replace all remaining occurrences of the Find text
with the Replace With text.

6 Click Close to stop finding and replacing.

Overriding an Input Mask


Though the input mask (described on page 56) is intended to make entering data
easier and quicker, you may occasionally want to override or ignore it.

To override the input mask:


1 Select the cell in which you want to enter the data.
2 Do one of the following:
Press <CTRL+O>.
Open the Edit menu and select Override Input Mask.

The existing content of the cell, if any, will be deleted and you will be in edit
mode with no input mask displayed. You are free to enter anything you want
(keeping the variable type in mind).
Note that overriding the input mask is an editing function, not an editing mode—it
lasts for the current cell only. The next time you try to enter or edit a cell with an
input mask, it will be enforced. If you find yourself overriding frequently, you
may want to modify or delete the input mask. Changing an input mask has no
effect on existing data; they will not be checked for compliance with the mask, nor
will they be converted to a form that does comply.

Freezing Columns
If your Data file has many columns—enough that some columns extend beyond
the right edge of the Editor window—the first few columns of data may scroll off
the left side of the window as you enter data in the rightmost columns. If those
leftmost columns contain data that help orient you in the Data file—such as date,
time, shift, etc.—it is easy to lose your place when they disappear from view. For

CHAPTER 3: Creating and Editing Data Files • 87


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

example, the figure below shows a 12-column file with a cell in the last column
selected. Notice that columns 1–4 are not visible.

Many-column Data file with a cell in the last column selected

Quality Analyst lets you “freeze” any number of leftmost columns so that they can
not scroll off the left edge of the window as you move to the rightmost columns in
your file.

To freeze columns:
1 Open the View menu and select Freeze Columns. The Freeze Columns dialog
box will appear.

2 In the box labeled Last Frozen Column Number, enter the number of columns
you want to freeze.
3 Click OK.

In the Editor, a vertical red line will appear along the right edge of the last frozen
column, indicating that all columns to the left of that line are frozen.
In the figure below, the first two columns are frozen, leaving DATE and TIME
displayed for reference. A vertical red line separates the frozen columns from the

88 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

remaining columns. Columns 3–7 are not visible, having scrolled “underneath” the
frozen columns as the cursor was moved into the last column.

Many-column Data file with two frozen columns and a cell in the last column
selected

To “unfreeze” columns, open the View menu and select Freeze Columns, select the
No Columns Frozen option, and click OK. All columns will now scroll as you move
around the data grid.

Automating Data Entry Using Autocopy


As you add data rows to a file, you may find the Autocopy feature of Quality
Analyst convenient. When Autocopy mode is in effect, certain types of data will
automatically be copied from the cell above into a cell in a new row.

To enter Autocopy mode:


Open the View menu and select Autocopy. (When Autocopy is in effect, the
View menu will display Autocopy—with the check mark.)

Autocopy will apply when you have selected a cell in a new, empty row, either at
the bottom of the file or after inserting a row. If the selected cell is in a column of
a variable of type D (DateTime), T (time), A (alphanumeric), or N (numeric text),
and you press <ENTER> or <TAB>, the value from the cell immediately above the
selected cell will be copied into the selected cell before the keystroke selects the
next cell. If the column is any other data type, a missing-data symbol (an asterisk,
by default) will be placed in the cell.
Autocopy is a toggle; to turn it off, open the Edit menu and select Autocopy.

CHAPTER 3: Creating and Editing Data Files • 89


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

The Data Menu


From the Data menu in the Editor you can apply a filter to analyze a subset of
your data, recalculate any calculated fields, sort your data, verify that your data
conform to the requirements for variable types, generate random numbers for a
data column, and configure DDE data entry.

Note: Two items on the Data menu—Query Database and Copy SQL to
Clipboard—are available if you are connected to an external database. For
details, see pages 580 (Query Database) and 572 and 579 (copy SQL).

Filtering Data
As you work with data in the Editor, you may find it convenient to display,
analyze, and chart a filtered subset of your data—that is, only those rows with data
that meet certain criteria. In Quality Analyst, you can do this by opening the Data
menu and selecting Filter. The Data Filter dialog box will appear.

In this dialog box, you can specify up to three sets of filter criteria with which to
filter your data. Each filter is displayed and specified in its own input area labeled
Filter 1, Filter 2, and Filter 3. When you specify filters and click OK, only those

90 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

rows that meet all three sets of criteria will remain displayed in the data grid, and
will be used in calculations.
Data filters affect only the display and analysis of data. The data rows excluded by
the filter are not deleted from the file. They are, however, excluded from analysis
and charting.
By default, data rows that do not meet your filter criteria will be displayed in light
gray text. This corresponds to the Gray selection in the area labeled Rows Not
Meeting Filter Criteria. If you want to hide the rows, select Exclusive instead.

Specifying a Filter
To specify a filter, you select the data column whose values will be used to filter
your data, and then specify either a single value or a range of values for that
column.
To select the data column, click the drop-down list labeled Column, which will
contain the name of every column in the file. When you select a column, its
description will appear in the adjacent recessed box.
To specify a single value for your filter criterion, select the Match option. The
adjacent recessed box will become active. In it, enter the value to use as a filter
criterion. For example, if you select the column FOREIGN, enter 3 in the Match
box, and click OK, all rows in which FOREIGN equals 3 will be displayed; all
other rows will be hidden.
To specify a range of values to display, select the From and To option. The
corresponding edit boxes will become active. In the From box, enter the lower
“end point” of the range. In the To box, enter the upper end point of the range. All
rows with values (in this column) between these two values will be displayed
(unless excluded by another criterion).
The drop-down lists next to each input box allow you to specify whether to
include or exclude the end points in the filter criterion. To include the lower end
point, select “=” from the list next to From; to exclude it, select “>.” To include the
upper end point, select “=” from the list next to To; to exclude it, select “<.”
To specify a range of values bounded at one end only, simply leave the edit box
for the other end point blank. For example, if you want to display all rows in
which the values in a column are greater than 2.5, enter “> 2.5” for From, and
leave the To box blank. Similarly, if you want to display all rows in which the
values in a column are less than 2.5, leave the From box blank and enter “< 2.5”
in the To box.

CHAPTER 3: Creating and Editing Data Files • 91


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Filtering on a DateTime Variable


If you filter your Data Set on a DateTime variable (type D) that includes a time
element, you should be aware of how Quality Analyst treats the time element of
that variable when filtering. The following examples assume your Data Set
contains a DateTime variable with the following values:
1/26/2006 0:00
1/26/06
1/25/06
1/25/06 0:00
1/25/06 15:00
1/25/06 9:00
1/25/06 23:59:59
1/25/06 23:59
1/25/06 23:59:01
1/25/06 23:59:00
1/26/2006 00:00:00

Match Filters
The following rules apply to Match filters based on a DateTime variable:
If you specify a date without a time element as the match criterion, all records
with that date, regardless of time, will be retrieved.
If you specify the date with a time element, only records with that date and
that exact time will be retrieved.
If you omit the seconds element from the time element, Quality Analyst
uses 00.

For example, a Match filter criterion of 1/25/06 would return:


1/25/06
1/25/06 0:00
1/25/06 15:00
1/25/06 9:00
1/25/06 23:59:59
1/25/06 23:59
1/25/06 23:59:01
1/25/06 23:59:00

A Match filter criterion of 1/26/2006 00:00:00 would return:


1/26/2006 0:00
1/26/06
1/26/2006 00:00:00

92 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

A Match filter criterion of 1/25/06 23:59 would return:


1/25/06 23:59
1/25/06 23:59:00

From/To Filters
The following rules apply to From/To filters based on a DateTime variable:
If you specify a date without a time element as the From = criterion, Quality
Analyst uses a time of 00:00:00.
If you specify a date without a time element as the From > criterion, Quality
Analyst uses a time of 23:59:59.
If you specify a date without a time element as the To = criterion, Quality
Analyst uses a time of 23:59:59.
If you specify a date without a time element as the To < criterion, Quality
Analyst uses a time of 00:00:00.
If you omit the seconds element from the time element, Quality Analyst
uses 00.

For example, a From = filter criteria of 1/25/06 would return:


1/26/2006 0:00
1/26/06
1/25/06
1/25/06 0:00
1/25/06 15:00
1/25/06 9:00
1/25/06 23:59:59
1/25/06 23:59
1/25/06 23:59:01
1/25/06 23:59:00
1/26/2006 00:00:00

A filter with a From = criterion of 1/25/06 and a To = criterion of 1/25/06 would


return:
1/25/06
1/25/06 0:00
1/25/06 15:00
1/25/06 9:00
1/25/06 23:59:59
1/25/06 23:59
1/25/06 23:59:01
1/25/06 23:59:00
(A Match filter criterion of 1/25/06 would have the same result.)

CHAPTER 3: Creating and Editing Data Files • 93


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

A From > filter criterion of 1/25/06 would return:


1/26/2006 0:00
1/26/06
1/26/2006 00:00:00

A To = filter criterion of 1/25/06 would return:


1/25/06
1/25/06 0:00
1/25/06 15:00
1/25/06 9:00
1/25/06 23:59:59
1/25/06 23:59
1/25/06 23:59:01
1/25/06 23:59:00
A To < filter criterion of 1/25/06 would not return any data.

A From = filter criterion of 1/25/06 23:59 would return:


1/26/2006 0:00
1/26/06
1/25/06 23:59:59
1/25/06 23:59
1/25/06 23:59:01
1/25/06 23:59:00
1/26/2006 00:00:00

A From > filter criterion of 1/25/06 23:59 would return:


1/26/2006 0:00
1/26/06
1/25/06 23:59:59
1/25/06 23:59:01
1/26/2006 00:00:00

A From > filter criterion of 1/25/06 23:59:59 would return:


1/26/2006 0:00
1/26/06
1/26/2006 00:00:00
Compared to the previous example, adding the “:59” seconds to the criterion
excludes 1/25/06 23:59:59 and 1/25/06 23:59:01 from the results.

94 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Multiple Filters
You can specify up to three filters to apply to your data. Only rows that meet all
three criteria will be displayed. For example, before the filters specified in the
previous figure are applied, DEFECTS.DAT looks like this in the Editor:

Editor with DEFECTS.DAT open and unfiltered

After the filters are applied, it looks like this:

CHAPTER 3: Creating and Editing Data Files • 95


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

DEFECTS.DAT after applying the filter (rows in gray text do not meet filter
criteria)

Notice that the status line at the bottom of the window contains the message Filter
Applied. This message is particularly useful if you chose to hide the filtered rows
as in the next figure. Notice, in this figure, that the original row numbers are
retained; Quality Analyst does not renumber the surviving rows.

96 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Filtered Data Set with filtered rows hidden (using the Exclusive setting)

Removing a Filter
To remove a filter, open the Data menu and select Filter, then click the Clear
button. All three column designations will revert to (None). Click OK and all rows
will be displayed in the Editor data grid.

Using Data Filters


Because data filters influence which data rows are used in the analysis that
produces charts, you should be wary of creating conflicts between filtered ranges
and the File Range (specified on the File Parameters dialog box) and the Data
Ranges (the Analysis and Display Range and the Control Limit Recalculation
Range) specified in the Variable Parameters dialog box. Be aware that the data
filters are applied before any calculations take place.
So, for example, if you have instructed Quality Analyst to recalculate control
limits from data, and your filter has excluded some of the rows from that range of
data, the resulting calculated control limits may not be what you intended. A good
example of this might be a case where you want to chart data for the second of
three work shifts, but you want to compute the control limits from data for all
three work shifts. To accomplish this, you could:

CHAPTER 3: Creating and Editing Data Files • 97


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Specify appropriate rows for Control Limit Recalculation Range on the Data
Ranges tab of the Variable Parameters dialog box (for the variable you will be
charting).
On the Center Line and Limits tab of the Control Chart Parameters dialog box,
create a limit region (for the variable and chart type you want) that
corresponds to the Control Limit Recalculation Range.
Select that region and click the Calculate from Data button. Control limits from
all work shifts will be calculated and entered.
Specify a data filter in which the variable SHIFT matches 2.
Create the chart.

Saving Filtered Data


To save the filtered data to a new file, open the File menu and select Save As while
a filter is in effect. In the resulting Quality Analyst File Save dialog box, enter a
name and location for the new filtered Data Set and click OK. The Active Data
Filter dialog box will appear, reminding you that a data filter is active.

Click Save Only Filtered Data to do just that. Click Save All Data to ignore the filter
and save all data to a file.

Recalculating Data
If your Data Set contains one or more calculated variables, you may want to
recalculate the formulas to make sure your data is current before performing a
charting or analysis function. This should only be necessary if another user or
some other computerized process appends to your Data file while you are working
on it.
To recalculate a Data Set, open the Data menu and select Recalculate.

Sorting Data
Quality Analyst lets you sort the current Data Set based on one or more columns
of alphabetic, numeric, time, or DateTime data. You can, for example, sort data

98 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

into historical order by sorting on DATE and TIME (or on DATE, if the values in
that variable include a time element). You can sort the data “in place” (under some
circumstances) or send the sorted data to a new file. To sort the current Data Set,
open the Data menu then select Sort. (If this menu item is disabled, see File Paths
and Permissions on page 269 or contact your system administrator.) The Multi-
Key Sort dialog box will appear.

Select the data columns on which you want to base your sort. (See Selecting
Multiple Variables on page 123.) If you have specified key columns for your Data
Set, those variables will be preselected by default. Be sure to select them in the
proper order: the first data column will be the primary sort key, the second will be
the secondary sort key, and so on.
Click OK. The Multi-Key Sort options dialog box will appear.

Under Output Selection, select Sort current file in place to replace the current data
with the sorted data. (If you have defined key columns for this Data Set, and are
sorting by any other variables, this option is not available.) Select Sort into new file

CHAPTER 3: Creating and Editing Data Files • 99


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

to keep the current Data file as-is and create a new file with the sorted data. If you
select this option, click Select File to specify a name and location for the new file.
In the area labeled Sort Order, select either Ascending (A–Z, 0–9) or Descending
(Z–A, 9–0).

Note: To specify whether sorting on text (descriptive) columns is case-


sensitive, see Text Settings on page 249.

If your Data Set includes a DateTime variable (type D) that includes a time
element, Quality Analyst will properly sort data within each day based on time. If
the time element is absent from any DateTime value, Quality Analyst assumes it is
00:00:00 (midnight at the beginning of the day).

Verifying Data
As you enter data, Quality Analyst does not make sure that your entries conform
to the requirements of the data types you are entering. So before you save your
data to a file, you should verify that the data is properly formatted.
To verify your data, open the Data menu and select Verify. Quality Analyst will
start at the selected cell and proceed first to the right by column, then down by
row, checking the contents of each cell for conformance to the format
requirements for the applicable data type. If it finds an error, Quality Analyst will
select the offending cell and display a message box that describes the error. Click
OK to remove the message box, then edit the cell contents as needed to fix the
problem.

Note: Verification of data begins with the selected cell and proceeds to the right
and then down by row. If you want to verify all data in your Data Set, be
sure to select the first cell in the Editor before opening the Data menu and
selecting Verify. Press <CTRL+HOME> to select the first cell in the
Editor.

Quality Analyst finds only one error at a time, so you should repeat this process
until Quality Analyst finds no more errors. If you open the Data menu and select
Verify with the first cell in the Data Set selected and Quality Analyst selects the
last cell in the Data Set without displaying the error message, then your entire
Data Set should be free of format errors. Note, however, that although Quality
Analyst is reasonably thorough in identifying invalid data formats, it is not
infallible. You may need to visually inspect your data or charts for anomalies.

100 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Generating Random Numbers


Quality Analyst can fill all or part of a data column with random numbers for you.
You can request random integers or real numbers, and a uniform or normal
distribution for the generated numbers. You can generate random integers with or
without replacement (allowing or prohibiting duplicate values).
To fill a column with random numbers, first create a data column to receive the
numbers, if you haven’t already done so. (See Variable Definition and
Specifications on page 71.) Then open the Data menu and select Generate Random
Numbers. (If this menu item is disabled, see File Paths and Permissions on
page 269 or contact your system administrator.) The Generate Random Numbers
dialog box will appear.

In the list labeled Column, select the data column you want to fill with random
numbers.
Normally, Column is selected in the List by area. This causes the Column list to
display columns rather than variables. That is, subgrouped measurements are
listed as individual measurements. With this setting, only the individual
measurement columns you select will be filled with random numbers. If you select
Variable instead, the list will display subgrouped variables as a single item,
allowing you to fill the entire subgroup with random numbers at one time.
In the box labeled Number of Values, enter the number of random numbers you
want Quality Analyst to generate. Each random number will be inserted into a row
for the data column you selected. If the Data file contains more rows than the
number you enter here, the remaining rows will retain their current values. If the
Data file has fewer rows than the number you enter here, Quality Analyst will

CHAPTER 3: Creating and Editing Data Files • 101


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

create new rows for the additional random numbers and fill the other columns
with the missing data symbol.
In the area labeled Data Type, specify whether you want the random numbers to be
Integers or Real numbers.
In the area labeled Distribution Type, select Uniform to have Quality Analyst
distribute the random numbers uniformly, or evenly, between the Minimum and
Maximum values you enter in the adjacent boxes. Check the Without replacement
box to generate all unique random numbers with no duplications. (This is
available for integers only.) If you uncheck this, the generated random numbers
may not be unique. Select Normal to have Quality Analyst generate the random
numbers on a normal distribution curve. If you select this option, enter the desired
Mean and Standard Deviation for the distribution.

Entering Data Using DDE


Data may be automatically transmitted to the Quality Analyst Editor from other
applications via DDE (Dynamic Data Exchange). Developed by Microsoft, DDE
is a standardized method of transmitting and receiving commands and data, and is
supported by most Windows-based products.
If you use a computer-based measurement or instrumentation system that uses
Windows’ Dynamic Data Exchange (DDE) to transmit data, you can configure
Quality Analyst to receive those data and insert them into the Editor. This section
explains how. First, we provide some background information on DDE. Next, we
take detailed look at Quality Analyst’s DDE features. Then, we look at a
hypothetical but typical example situation.
Because DDE is a “general-purpose” data-exchange protocol, different
measurement and instrumentation systems implement DDE differently. Therefore,
some of the steps described here are, by necessity, general. We have tried to use
standard Microsoft DDE terminology wherever possible (even though it is
sometimes confusing) so that you can relate Quality Analyst’s DDE settings to the
DDE settings of your measurement and instrumentation system which, we hope,
uses the same terminology.

Dynamic Data Exchange—The Basics


Though a thorough discussion of Dynamic Data Exchange is beyond the scope of
this manual, here is an “introductory course” in DDE that we hope will give you
an understanding of DDE sufficient to use Quality Analyst’s DDE feature
effectively.

102 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

DDE is a “standard” data-exchange protocol that is implemented by Windows.


Here’s a simplified explanation of what happens when two DDE-capable
applications exchange information via DDE:

1 The “server” application—the one with the original data—sets up a DDE


“account” with Windows that identifies a specific datum in the application
using three increasingly specific identifiers: Service, Topic, and Item. 4
2 The “client” application—the one to receive the data (in this case, Quality
Analyst)—is given (or obtains) the names of the three identifiers, and
monitors the corresponding DDE “account” in Windows.
3 Under the DDE protocol, whenever the linked datum in the server application
changes, the DDE “account” in Windows is updated, and the client
application grabs the updated datum.

Quality Analyst accepts data via DDE through the following mechanisms:
DDE Link: DDE communications are established between a DDE “Server”
application such as Excel or most “wedges” and a DDE “Client” (Quality
Analyst). Data are placed on the Clipboard by the DDE Server for the DDE
Client to read. Only commands (not data) are sent via DDE. (This mechanism
is also known as a “hot link” or “paste-link.”)
“Direct”: Both commands and data are sent via DDE. The sending
application (the “Server”) and the receiving application (the “Client”) must
agree on the format of the DDE “string” at least to the extent that the DDE
Client can locate and read the data.

How Quality Analyst Handles DDE Data


When Quality Analyst receives a single datum from the DDE server, it places the
data into the “current” cell in the Editor (the cell with the cursor). Quality Analyst
then moves the cursor to the next cell (one position to the right if in “Row Mode”
or one position down if in “Column Mode”). The datum must be received in the
order necessary to match the structure of the Quality Analyst Data Set. If
necessary, you should move the cursor or manually enter information that is not
sent via DDE (such as a date, operator’s initials, lot number, and so on).

4
Choosing names for the three identifiers in the DDE “account” is left to the server application.
In general, Service is the name of the application; Topic is a region or zone within the
application, or an arbitrary topic name; and Item is the name or location of an individual
datum.

CHAPTER 3: Creating and Editing Data Files • 103


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

If the string of information from the DDE server contains more information than
you need, or if it contains multiple values (to be placed in more than one cell), you
can define a DDE Filter to apply to the incoming string. The data will be extracted
and distributed according to the filter definition. See DDE Filter Definition
below.

Configuring a DDE Connection


To configure a DDE connection, open the Data menu and select DDE Control. The
DDE Control dialog box will appear.

In this dialog box, you define Quality Analyst as the DDE client and your data
source as the DDE server. You can also define DDE Filters when necessary.

DDE Client Control


In the area labeled DDE Client Control, configure how you want Quality Analyst to
handle DDE messages sent by the DDE server. Select Accept to let Quality
Analyst accept commands and data from the server. If you select Ignore, Quality
Analyst will ignore DDE commands and the server will not be notified. If you
select Reject, Quality Analyst will ignore commands from the DDE server and the
server will receive an error message.
In the area labeled Receive As, the Service will always be “QAEDIT,” the
application name of the Quality Analyst Editor. Set Topic to match what the server
uses. (The string “System” is reserved and must not be used.)

104 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

DDE Server Control


The area labeled DDE Server Control identifies the DDE server (the application
sending commands and data) to Quality Analyst. Check or uncheck the box
labeled Server Enabled to enable or disable DDE communication when desired.
The boxes labeled Service, Topic, and Item identify the DDE Server. You can fill
these out if you know you know their values. But you can also get them
automatically from the server by initiating DDE communications in the DDE
server application. When a “paste link” has already been set up in the server
application, the Paste Link button will be active. Click Paste Link to obtain the
settings from the server and insert them in the appropriate boxes.

DDE Filter Definition


In the area labeled DDE filter Definition, you can specify filters that let Quality
Analyst parse a string of “too much” data. If the DDE “string” received from the
server contains extraneous information or multiple pieces of usable data, you must
define one or more filters that will enable Quality Analyst to identify and “extract”
the desired data.
In the following example, a measurement device sends a DDE string made up of a
date-and-time field, a status message, the datum, and a terminating delimiter. The
datum—the number you are interested in—is 6.54.
10121996084533 SD 6.54 E
You must define a filter that will let Quality Analyst extract the “6.54” from the
string and discard the rest.
In this example, the DDE string includes a date (in a usable format) and two
measurements. Each datum is separated by the “fence” character (“|”) and the
string is terminated with a “#”:
10/12/96|0.0344|12.25#
In this case, you must define three filters to extract all three pieces of information.
To define a DDE filter, click Filter on the DDE Control dialog box. The DDE Filter
Definition dialog box will appear.

CHAPTER 3: Creating and Editing Data Files • 105


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

The box labeled Filters lists all defined filters. When the dialog box first appears,
no filters are defined so the Filters list is empty and most of the rest of the dialog
box is grayed out.
Click New to create a new filter. The number of the filter (1, 2, 3, and so on) will
appear in the Filters list. Each filter includes a Start and a Stop definition, which
tell Quality Analyst where to start and stop reading the desired information.
In the area labeled Start, specify the starting position of the usable value in the
DDE string.
If you select At position, enter the number of the character column to begin
reading the value. This option is useful for “fixed field” strings where the
value always starts at the same position in the string.
Select On occurrence of to tell Quality Analyst to begin reading the
value at a particular occurrence of a particular character or string. For
example, if the value starts after the second fence character, enter “2” and “|”
in the two boxes. If you want Quality Analyst to treat the character or string
as part of the value that follows, check the Included box.

In the area labeled Stop, specify the ending position of the value in the DDE
string.
If you select At End Of Data, Quality Analyst will include the entire remainder
of the DDE string in the data.
Select Take next characters to include a specific number of characters in
the value, and enter that number in the box. This is useful if the character
positions of the data elements of a DDE string remain constant.
Select On occurrence of to tell Quality Analyst to stop reading the
value at a particular occurrence of a particular character or string after the
Start of the value. If you want Quality Analyst to treat the character or string
as part of the value, check the Included box.

106 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

The delimiting characters or strings you enter in filter definitions need not be
standard ASCII printing characters. You can enter non-printing characters such as
TAB. To represent non-printing characters, use the following table:

Non-printing Character Codes

Code Description
\E Escape (ASCII 27)
\N New Line (line feed, ASCII 10)
\T Tab (ASCII 9)
\B Backspace (ASCII 8)
\R Carriage return (ASCII 13)
\F Form feed (ASCII 12)
\\ Backslash
\^ Caret
\### Decimal ASCII character ###, for example \032 for space
\O### Octal ASCII character ###
\X## Hexadecimal ASCII character ##
^X <CTRL+X>, where X is any character between @ and underscore,
inclusive. Case is ignored.

The following two filters would successfully extract the “6.45” from our first
example above. The filter on the left would work generally if this positioning is
consistent. The filter on the right is preferable if the positioning might vary
because it extracts everything between “SD” and “E.”

The following filters would successfully extract the date and two measurements
from the DDE string in the second example above.

CHAPTER 3: Creating and Editing Data Files • 107


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Note in Filter 2 that the Start and Stop settings are identical—the first occurrence
of “|.” This does not retrieve an empty string, as you might first think, because the
“counter” for the position of the Stop character starts after the position of the Start
character.

Customizing a DDE Connection


One of the things that DDE lets you do is control DDE-aware applications by
sending DDE commands to the Windows DDE driver. The commands that you
can send are determined by the programmers of the controlled application. If you
are interested in controlling Quality Analyst this way, you will need to know the
DDE commands available for Quality Analyst. They are listed in the table below.

Quality Analyst DDE Commands

DDE Command Description


About() Displays the Editor’s “Help About” message box.
Save() Causes the Editor to save the current Data file.
Exit(Save) Causes the Editor to close after saving the current
Data file.
Exit(NoSave) Causes the Editor to close without saving the current
Data file.
Mode(Row) Places the Editor in Row mode.
Mode(Column) Places the Editor in Column mode.
Row(n) Selects the cell in row n in the current column; for
example Row(83).
Column(n) Selects the cell in column n in the current row; for
example, Column(4).
Append() Selects the cell in the first column in the first empty row
after the end of the file; places the Editor in Row mode.

108 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

When you send these commands, the case of the string is insignificant but all other
aspects of the command must match these specifications—spelling must be exact
and spaces may not be included.
If Quality Analyst receives a string that it recognizes as a “bad” DDE command—
such as “Mode(”—it ignores the command. If it receives a string that it does not
recognize as a command, it treats the string as data. For example, the string
“Mode” would be treated as data and entered into a text cell as data and into a
numeric cell as missing data.

Closing a DDE Connection


When you are done entering data via DDE, close either Quality Analyst or the
server application. Quality Analyst will display a message telling you that the
connection has closed.

A DDE Example
This section describes a hypothetical example of data entry using DDE. This
example situation is intended to be common enough that these instructions will be
useful as-is, and explicit enough so that you can extrapolate the ideas to your own
different situation. In this example, we assume:
You have an electronic measurement device, such as a digital scale or caliper,
connected to your PC.
You have software on your PC that can read data from your electronic
measurement device and transmit it, using DDE, to other DDE-enabled
software (such as Quality Analyst). This software is often called “wedge
software,” or just a “wedge,” probably because it is “wedged” between the
measurement device and the destination software, in this case, Quality
Analyst.

CHAPTER 3: Creating and Editing Data Files • 109


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Briefly, the procedure for using DDE with Quality Analyst is:
1 Set up DDE transmission in your “wedge” software.
2 Set up DDE reception in Quality Analyst.
3 Transfer data from the instrument to Quality Analyst via DDE using the
“wedge.”
4 Terminate DDE connection.

Establishing the DDE Connection


Here is an example of the steps you might take to establish a DDE connection in a
typical situation:

1 Launch your server application, or “wedge.”


2 Determine or configure the names of the DDE Service, Topic, and Item you
want to link to.
Tip: Usually, copying the datum to the Windows Clipboard will store these
three identifiers “behind the scenes” so that a client application can read them.
3 Run the Quality Analyst Editor.
4 Select the cell in the data grid into which you want to place the first datum
from the DDE connection.
5 Open the Data menu and select DDE Control. The DDE Control dialog box will
appear.

110 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

6 In the area labeled DDE Server Control enter the Service, Topic, and Item
identifiers for the DDE “account” (from step 2) under Link To.
Tip: If you copied the datum to the Clipboard in step 2, the Paste Link button
will be available. Click it and the three identifiers will appear in their
respective boxes.
7 Check the Server Enabled box to allow Quality Analyst to retrieve data from
the server application.
8 Click OK to insert the first datum from the DDE connection.

Entering Data
Once you have established the DDE connection, you can use the measurement or
instrumentation device and the “wedge” to enter data into the Quality Analyst
Editor. Here are some typical steps.

1 In Quality Analyst, select the cell into which you want to read a linked datum.
2 Switch back to the server application (the “wedge”). Depending on the
measurement device and “wedge” software, “read out” new measurements.
To do this you may press a button on a digital caliper, press a button on a
digital scale, press a key on the keyboard, or click a button on the screen with
your mouse.
3 In Quality Analyst, the datum will be inserted into the cell, and the “next” cell
in the data grid will be selected. (What the “next” cell is depends on whether
you are in Row mode or Column mode and whether your Data Set has any
calculated variables. See Moving Around in the Data Grid on page 75.)
4 While entering data via DDE, when the cursor selects a cell that should not
accept a linked datum (like a DATE or TIME field), switch to Quality Analyst
and manually move to the next data-entry cell.

Closing the Connection


When you are done entering data via DDE, close either Quality Analyst or the
“wedge” software. Quality Analyst will display a message telling you that the
connection has closed.

CHAPTER 3: Creating and Editing Data Files • 111


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Inserting Data from Another Data Set


Quality Analyst lets you add rows of data from one Data Set to another Data Set.
The two files must have the same number of columns. Though Quality Analyst
will let you merge two files whose corresponding columns contain different data
types, you will probably end up with a useless file. You should make sure that the
file to be inserted has the same column structure as the destination file. (See
Specifying Variable Definition and Specifications on page 35.)
To insert the data from one file into another, open the destination Data file with
the Editor, open the Edit menu and then select Insert File. (If this menu item is
disabled, see File Paths and Permissions on page 269 or contact your system
administrator.) The resulting dialog box will display a list of Quality Analyst Data
files. Select the file you want to insert.
If the file you selected has a different number of columns than the destination file,
a message box will tell you so, and the operation will be canceled.
If all goes well, the new data will appear at the end of your Data file. You should
immediately verify that the data conforms to the structure of the Data file by
opening the Data menu and selecting Verify. (See Verifying Data on page 100 for
detailed instructions.)

Saving a Data File


After you have entered data into a new file or modified an existing file, you need
to save it to a file. If you are editing an existing file and you simply want to save
the modified data under the same file name, click the File Save button or open the
File menu and select Save. The file will be updated to contain the current contents
of the Editor.
If you are editing a new file, or want to save an existing file under a new file
name, open the File menu and select Save As. (In the case of a new file, clicking
the File Save button or opening the File menu and selecting Save will have the
same effect as selecting Save As.) (If these menu items are disabled, see File
Paths and Permissions on page 269 or contact your system administrator.) The
Save As dialog box will appear.

112 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Navigate to the folder where you want to save the Data Set. In the File Name box,
enter a name for the Data Set. You do not need to type in “.DAT” for the file-
name extension; Quality Analyst adds that for you. Click OK to save the Data Set.
Starting with version 6, Quality Analyst Header files are stored in XML
(eXtensible Markup Language) format with the file-name extension .NWH. If you
need to save the Data Set for use on a system that uses an earlier version of
Quality Analyst, open the File menu and select Save As Quality Analyst 5.2 HED
File. The Header file (with the extension .HED) will be saved in the same folder as
the original Data Set.

Printing Data
With Quality Analyst, you can print your data either as a quick and simple data
listing or as a formatted report of selected variables with optional summary
statistics.

Printing a Data Listing


To print all or some of your data, click the Print button on the toolbar or open the
File menu and select Print. The Print Data dialog box will appear.

CHAPTER 3: Creating and Editing Data Files • 113


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

In the Rows to Print area of this dialog box, specify the rows of data that you want
to print. Select the File Default option to select the rows specified at the file level
(on the File Parameters dialog box), shown in the adjacent recessed box. Select All
Rows to print all rows in the file. Select Last Rows to specify the number of
rows at the end of the file to print. Enter the number of rows in the box. Select
From Row: To Row: to specify the starting and ending row to print. This
lets you select any contiguous set of rows in the file. In the box labeled Number of
Rows per Page, enter the maximum number of data rows to print on a page.
Quality Analyst will start a new page after this many rows, even if more would fit.
If you request more rows than would normally fit on the page, this setting is
ignored.
In the Columns to Print area of the dialog box, specify the columns of data that you
want to print. Select All Columns to print all columns in the file. Select From
Column: To Column: to specify the starting and ending columns to print.
In the Data Set Information area of the dialog box, specify whether you want to
Print Variable Definitions, Print Column Definitions, or Print File Parameters on the
report.
In the Print Title area of the dialog box, specify the text and alignment of a title to
print at the top of each page of output. Enter the text in the edit box labeled Title.
The default title is the File Title specified under File Parameters. Below the title,
next to the label Alignment, specify whether to Left Justify, Center, or Right Justify
the title on the page.
The check boxes on the right side of the dialog box toggle several formatting
options on or off. Select Show Row Number to print the number of each data row
at the left of each row, as displayed in the Editor. Select Show Column Name to

114 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

print a header for each column as displayed in the Editor. Select Gray Rows &
Columns to print the row numbers and columns names, if selected, on a gray
background. Select Show Border to print a thin line around the outside of the
entire table of data. Select Show Grid to print thin lines between each cell in the
Data file.
If you want to print only part of your Data file, you can specify rows and columns
in the Print Data dialog box as just described, or you can select a portion of your
file before invoking the Print Data dialog box. Any time you invoke the Print Data
dialog box with anything more than a single cell selected, the Rows to Print and
Columns to Print settings in the Print Data dialog box will reflect that selection.

Printing a Formatted Report


Quality Analyst lets you print a formatted report of the contents of your Data Set.
You can format the report to:
print the data columns in any order
include summary statistics—mean, standard deviation, sum, and number of
observations
insert a “section break” whenever the value of a specific variable changes
(such as DATE or SHIFT).

To begin printing a formatted statistics report, open the Report menu and select
Formatted Data. The Report dialog box will appear.

Selecting a Report Format


In Quality Analyst, report formats may be stored in Report Format (RPT) files for
reuse. In the area labeled Report Format, the name of the Report Format file that
will be used is shown in the recessed box. The default file name is the name of the
Data file plus the extension “RPT.” If this file does not yet exist, the Edit button

CHAPTER 3: Creating and Editing Data Files • 115


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

will be unavailable and the file will be created using default format settings—a
simple row-by-row print-out of all records with a column for each data column.
Click Select to select a Report Format file other than the default using Windows’
file-selection dialog box. (If you do you can skip the next section.) Click Edit to
change the settings contained in the selected Report Format file. Click Create to
create a new Report Format file. (Creating and editing a Report Format is
explained in the next section.)
In the area labeled Assumed Printer Characteristics, enter the number of
Characters per line that the print function should assume. Since most Windows
fonts are variable pitch, this number is only approximate. You may have to
experiment with this value before finalizing your report format.

Specifying a Report Format


Selecting Report Variables
If you choose to edit or create a report format, you must specify the variables to
include in the report in the Report Variables dialog box. Select one or more
variables as explained under Selecting Multiple Variables on page 123.

Formatting Report Columns


Click OK to proceed to the Report Variables options dialog box.

116 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

In the area labeled Selected Columns and Formats, specify how you want to
display each data column you have included in the report:

1 Select a variable in the list on the left.


2 Specify settings for that variable on the right.
3 Repeat for each variable.

Two rows of the report are used to label each data column. In the box labeled
Label Line 1, enter the label to place on the first of the two rows. In the box labeled
Label Line 2, enter the label to place on the second of the two rows. By default, the
first line is blank and the second line contains the variable name.
In the box labeled Column Width, enter the width, in characters, of the column for
this data column. Since most Windows fonts are variable pitch, this number is
only approximate. You may have to experiment with this value before finalizing
your report format.
In the area labeled Numeric Format, check Use Default to display values in this data
column using the default number format for the data type. If you uncheck this box,
enter a format string in the adjacent box. (See Specifying Numeric Formats
below.)
Check Break on data change in this column to start a new report section any time
the value in this data column changes. This is particularly useful for variables like
SHIFT or DATE. In each section of the report, summary statistics ( if selected)
will be computed and displayed for the data in that section.

CHAPTER 3: Creating and Editing Data Files • 117


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Formatting the Rest of the Report


The remaining settings apply to the whole report, not each individual data column.
In the area labeled Include in Report, select other elements to include in the report.
Check ROW Number to include the row number in the report. Check Data to
include the actual data in the report. (Leave this unchecked if, for example, you
only want to report the totals or summary statistics.) Check Totals to include the
sum of all rows for each data column in the report. Check Summary Statistics to
include summary statistics of each column in the report. These include the mean,
standard deviation, number of observations, minimum, maximum, and range.
In the box labeled Display Missing Data As, enter the text you want to use to
represent missing data in the report.
In the area labeled Save Report Format As, the name of the file in which the report
format settings will be saved is shown. Click Select to save the settings in a
different file.

Specifying Numeric Formats


Number format strings consist of characters that represent either a component of
the data (listed in the following table) or a literal character.

Numeric Formatting Characters

This character: Represents this:


# (pound sign) digit, before or after the decimal point. (Leftmost # is reserved
for the sign of the number.)
. (period) decimal point
^ (caret) exponential notation (always use four, always at far right)
- (minus) sign of the number; displayed only if negative; use only to
specify a trailing minus sign

Any other character included in the format string will be printed “as is” at its point
of inclusion. However, several characters may not be used in format strings
because they are used for other purposes in Quality Analyst. Those characters are:
& (ampersand)
* (asterisk)
\ (backslash)
, (comma)

118 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

$ (dollar sign)
! (exclamation point)
+ (plus)
If a number is too large to be represented by the format string, it will be preceded
by a percent sign (%) on the report. For example, 91.35 printed using the format
#.## would appear as %91.35.
Normally, negative numbers are printed with a leading minus sign which occupies
the first character space. Specify a trailing minus sign by placing a “-” at the end
of the format string.

Examples of Numeric Format Strings

Number Data Format Output


234.6 ####.## 234.60
-234.6 ####.## -234.60
234.6 +###.## +234.60
234.6 -###.## 234.60
-234.6 +###.## -234.60
-234.6 -###.## -234.60
234.6 ### 235
234.6 ######.## 234.60
234.6 ##.###^^^^ 2.346E+02
234.6 ##.## %234.60
-234.6 ###.##- 234.60-

CHAPTER 3: Creating and Editing Data Files • 119


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Example formatted data report

120 • CHAPTER 3: Creating and Editing Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

CHAPTER 4

Selecting Variables
One task common to many of Quality Analyst’s procedures is selecting variables.
Whether you are creating charts or performing statistical analyses, Quality Analyst
will frequently ask you to specify a single variable or a set of two or more
variables. Sometimes you will need to specify combinations of single and multiple
variables, depending on what you are asking Quality Analyst to do for you.

For example, you might be asked to select:


a single variable
two single variables
a set of two or more variables
a combination

This chapter describes how to select variables. The methods described here will
apply to any similar variable-selection dialog boxes in Quality Analyst. When
procedures described in this manual call for you to select variables, they will refer
you to this section.

Selecting a Single Variable


For some Quality Analyst routines you will need to select a single variable. In the
single-variable-selection dialog box, the list on the left shows the available
variables. The gray list in the middle shows the descriptions of each variable. The
box to the right of the descriptions shows which variable has been selected.

CHAPTER 4: Selecting Variables • 121


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Selecting a single variable

Selecting two single variables

To select a variable:
Click the variable name in the list on the left, OR
Enter the name of the variable in the edit box above the list on the left, then
press <ENTER>.

The variable name will appear in the box above the list.

122 • CHAPTER 4: Selecting Variables


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

If the entire dialog box requests only one variable, you can double-click the
variable name in the list on the left to select the variable and launch the next step
(as if you also clicked OK.)

Selecting Multiple Variables


For some Quality Analyst routines you will need to select a set of two or more
variables.
In the multiple-variable-selection dialog box, the list on the left shows the
available variables. The gray list in the middle shows the descriptions of each
variable. The box on the right shows which variables have been selected.

Selecting a set of two or more variables

CHAPTER 4: Selecting Variables • 123


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Selecting a single variable and a set of one or more variables

To select one variable at a time:


Click the variable name in the list on the left, then click Select, OR
Double-click the variable name in the list on the left, OR
Enter the name of the variable in the edit box above the list on the left, then
press <ENTER>.

To select several variables at once:


1 Click the first variable name in the list on the left.
2 Click additional variable names in the list while holding down the <CTRL>
key.
3 Click Select.

To remove a variable name from the Selected list:


Click the variable name in the Selected list (the one on the right), then click
Remove, OR
Double-click the variable name in the Selected list.

In some Quality Analyst routines (Sorting Data, for example), the order of the
variables in the Selected list will affect the results of the procedure. To make sure
the variables end up in the proper order, add them to the Selected list in the proper

124 • CHAPTER 4: Selecting Variables


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

position. Newly added variables are always inserted into the Selected list just
above the variable (or blank row) that is highlighted in the Selected list.

To add a variable to the Selected list in a specific position:


1 Highlight the variable in the Selected list above which you want to add a new
variable. (If the list is empty or if you want to add a variable to the end of the
list, select the blank row below the last variable, if any.)
2 Select one or more variables as explained above.

Some Quality Analyst routines can accept a single variable when multiple
variables are allowed, but some require two or more. If you select a single
variables and the routine requires more, a message box will tell you that at least
two variables are required.

Changing the Display Order


As you select variables, you may find it helpful to change the order of the lists of
available and selected variables. You can do so either for single variables or for
multiple variables.

List By
In the box labeled List By, select Variable to display the variables in variable order.
Select Column to display each column in your Data Set.
If any of the variables in the file are in rowwise subgroups, each element of the
subgroup will be displayed individually; the variable name will be followed by a
colon and the measurement number (for example, GAP:2). And if you have
rearranged your columns (as described under Specifying Column Definition and
Calculations on page 61) the columns will be displayed in that rearranged order.

Sort By Name
Check Sort By Name to sort the lists of variable or column names alphabetically.
Leave this unchecked to display the variable or column names in the same order as
they appear in the Data file.

CHAPTER 4: Selecting Variables • 125


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

CHAPTER 5

SQC Charting and Analysis


In Quality Analyst, control charts are divided into two categories—variable and
attribute. Variable control charts are created from Data files containing either
measurements or the mean, range, or standard deviation of measurements.
Attribute control charts are created from Data files containing either the number of
defects or the number of defectives. In addition to these control charts, Quality
Analyst can create several other charts that allow you to visually inspect and
present your data. Creating charts in each of these three groups is explained
below.
In the Editor, you can create variable control charts, attribute control charts,
process capability histograms, and normal probability charts in either of two ways:
Select a variable to chart, then select the chart type, OR
Select a chart type, then select the variable to chart.

When you create run charts, scatter diagrams, quantile plots, and Pareto diagrams,
you must select the chart type first, and then specify the variable or variables to
chart.

Selecting a Variable First


To select a variable before selecting a chart type, click the header cell at the top of
the column containing the variable you want to chart. The column for that variable
will be selected—the cells in the column will be displayed as white text on a black
background. If the variable you selected is structured in subgroups, with a column
for each measurement in the subgroup, all columns in the subgroup will be
selected.

126 • CHAPTER 5: SQC Charting and Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Editor with the file BOARDS.DAT loaded and the variable NUM_BDS selected

Selecting a Chart Type First


If you attempt to create a variable control chart, attribute control chart, process
capability histogram, or normal probability chart without first selecting a variable,
a dialog box like the one shown below will appear, allowing you to select a
variable from a list of allowable variables in the file. The title bar of the dialog
box will display the name of the chart type you selected.
Selecting variables is discussed in CHAPTER 4: Selecting Variables on
page 121.

CHAPTER 5: SQC Charting and Analysis • 127


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Variable Control Charts


With Quality Analyst, you can display several types of variable-control charts.
These charts can be created individually or in predefined pairs.
X-bar
Range
Standard Deviation
Individuals
Median
Cumulative Sum
EWMA (Exponentially Weighted Moving Average)

Creating Variable Control Charts


For all chart types except Cumulative Sum (see below), creating a chart is a two-
step process in which you select a variable and a chart type (in either order).

You can select a variable chart type in either of two ways:


Click the button for the chart type you want, OR
Open the Variable menu and select the chart type.

128 • CHAPTER 5: SQC Charting and Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Not all variable chart types are represented by a button on the toolbar. The
following table lists the single and paired chart types available in Quality Analyst
and shows the corresponding button and menu selection for each.

List of Variable Chart Types and Corresponding Buttons and Menu Selections

Chart Type/Pair Button Menu Selection


X-bar X-bar

X-bar and Range X-bar & Range

X-bar and X-bar & Std Dev


Standard Deviation
Range none Range
Standard Deviation none Standard Deviation
Individuals Individuals

Individuals and Range Individuals & Range

Median and Individuals Median & Individual

Median and Range Median & Range

Cumulative Sum Cumulative Sum

Exponentially Weighted none EWMA


Moving Average

Specifying Sample Size


If you are creating a chart of a variable that requires a sample size and you have
not yet declared a sample size for the variable, the Subgroup Size and Type dialog
box will appear.

CHAPTER 5: SQC Charting and Analysis • 129


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Specify the sample size as explained under Subgroup Size and Type–Variable
Data on page 288. The sample size you enter will be assigned to the variable as if
you had assigned it as a Variable Parameter.

Creating Cumulative Sum Charts


When you create Cumulative Sum charts, there is one extra step—specifying the
position of the V-mask. Before it creates a Cumulative Sum chart, Quality Analyst
will display the Cumulative Sum V-mask dialog box.

Select a subgroup or individual data point for locating the Cumulative Sum V-
mask.
Select Last Subgroup to place the V-mask on the last subgroup or individual data
point in the file.
Select Subgroup to place the V-mask on the subgroup (or individual data
point) that you specify. In the adjacent box, enter the number of the subgroup or
individual data point for placing the V-mask. For files containing rowwise
subgroups, this will be the row number in the file. For files containing fixed-size
columnwise subgroups, this will be approximately equal to the row number in the
Data file divided by the subgroup size. If your file contains individual
measurements in variable-sized subgroups, you may want to select Last Subgroup,
view the chart once to determine the number of the desired subgroup, then come
back and enter that number here.
Select No V-mask to suppress the V-mask display.

130 • CHAPTER 5: SQC Charting and Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Gallery of Variable Control Charts


The following figures show examples of each type of variable control chart and
their combinations.

Example X-bar chart

CHAPTER 5: SQC Charting and Analysis • 131


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Example X-bar and Range chart

Example X-bar and Standard Deviation chart

132 • CHAPTER 5: SQC Charting and Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Example Range chart

Example Standard Deviation chart

CHAPTER 5: SQC Charting and Analysis • 133


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Example Individuals chart

Example Individuals and Range chart

134 • CHAPTER 5: SQC Charting and Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Example Median and Individuals chart

Example Median and Range chart

CHAPTER 5: SQC Charting and Analysis • 135


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Example Cumulative Sum chart

Example Exponentially Weighted Moving Average chart

136 • CHAPTER 5: SQC Charting and Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Process Capability Charting and Analysis


With Quality Analyst, you can create a process capability histogram and report.

Process Capability Histogram


You can create a process capability histogram by clicking the Histogram button on
the toolbar or by opening the Variable menu and selecting Process Capability
(Histogram). (You can select the variable you want to chart either before or after
selecting the chart type.)

Example process capability histogram

Process Capability Report


To create a process capability report, open the Data Set that contains the
variable(s) you want to analyze, then open the Report menu and select Process
Capability. The Capability Report variable-selection dialog box will appear.

CHAPTER 5: SQC Charting and Analysis • 137


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Select one or more variables to analyze, as explained under Selecting Multiple


Variables on page 123.
Click Options to display the Capability Report options dialog box. (This dialog box
will also appear if you click OK before clicking Options.) Use this dialog box to
specify the content and format of the report.

138 • CHAPTER 5: SQC Charting and Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Selecting Statistics and Display Codes


In the area labeled Statistics, select the statistics you want to include in the report
and the layout codes Quality Analyst should use to format the report. Only the
statistics and codes in the Selected list on the right will be used on the report.

Note: The Selected list on the right displays a default set of statistics which you
can specify, as explained under Capability Report Statistics on page 273.

To select additional statistics and codes, highlight them in the Available list and
click Select, or double-click them in the Available list.
To place a new item in a specific place in the Selected list, first highlight the
existing item in the Selected list above which you want to insert a new item from
the Available list. Then select the new item. It will be inserted into a new row; no
items will be overwritten.
In general, variables will be listed down the report page in rows and statistics will
be listed across the page in columns. The <Page Break> code lets you control how
many columns appear on the report. Any statistic just above a <Page Break> code
in the Selected list will be the last column on that page of the report. Because the
display widths of the statistics and other display parameters vary, you may want to
experiment before finalizing the layout of a report.

Breakdown
In the area labeled Breakdown, select Breakdown by Variable Only to break down
the report (down the page) by variable only. Select Breakdown by to group values
of the selected variable according to the value of another variable, and create a
separate section of the report for each grouping. This can be useful if the second
“breakdown” variable is DATE or SHIFT or MACHINE. If you select this option,
select the breakdown variable from the adjacent drop-down list.
If you select a DateTime variable for the breakdown variable, the area labeled
Date Breakdown Options will become available. Here you can specify whether to
group by Day, by Week, or by Month. If you select by Week, specify (using the
adjacent drop-down list) whether you want the week to start on Sunday or
Monday.
If you select a breakdown variable that is not a date variable, check Sort by
categories to sort the grouped sections by the breakdown variable. If you leave
this box unchecked, the sections will be displayed in the order in which they are
found in the file. (DateTime variables are always sorted chronologically.)

CHAPTER 5: SQC Charting and Analysis • 139


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Output Type
Quality Analyst can display process capability reports as text in the Graphics
Viewer and it can create a Data Set that contains the process capability data. You
can choose to create either or both types of output.
In the area labeled Output Selection, select the Text Display check box to display
the capability report as text in the Graphics Viewer.
Select the Data File check box to create a Data Set that contains the process
capability data. Click the adjacent Select File button to specify the name and
location of the Data Set.

Example Capability Report: Text Display Output

Example Capability Report: Data File Output

140 • CHAPTER 5: SQC Charting and Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Note: Configuring default parameters for capability reports is explained under


Process Capability (Histogram) Parameters on page 318.

Attribute Control Charts


With Quality Analyst, you can create and display four types of attribute control
charts:
p-chart (percent defective)
np-chart (number defective)
u-chart (nonconformities per unit)
c-chart (nonconformities)

You can select an attribute chart type in either of two ways:


Click the button for the chart type you want, OR
Open the Attribute menu and select the chart type.

The following table lists the attribute chart types available in Quality Analyst and
shows the corresponding button and menu selection for each.

List Of Attribute Chart Types and Corresponding Buttons


and Menu Selections.

Chart Type Button Menu Selection

percent defective p-chart

number defective np-chart

nonconformities per unit u-chart

nonconformities c-chart

If you try to create an attribute chart of a variable for which you have not declared
a sample size, the Sample Size dialog box will appear.

CHAPTER 5: SQC Charting and Analysis • 141


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Specify a sample size as explained under Sample Size–Attribute Data on


page 290. The sample size you enter will be associated with that variable for all
subsequent charts of that variable.
The following figures show examples of each type of attribute control chart.

Example p-chart (percent defective)

142 • CHAPTER 5: SQC Charting and Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Example np-chart (number defective)

Example c-chart (nonconformities)

CHAPTER 5: SQC Charting and Analysis • 143


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Example u-chart (nonconformities per unit)

Pareto Diagrams
Quality Analyst lets you create both single-variable and multiple-variable Pareto
diagrams, or frequency diagrams.
Multiple-variable Pareto diagrams are appropriate for Data Sets in which each row
is a subgroup or sample and each column contains the number of occurrences of
each type of defect.

Example multiple-variable defect file

144 • CHAPTER 5: SQC Charting and Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Single-variable Pareto diagrams are appropriate if your defect data is structured as


a single variable—with either a single-column variable of defect descriptors or
identifiers (probably data types A, N, or O) or a two-column variable of type CM
(category and multiplier) or GM (group and multiplier).

Example single-variable defect file

A single-variable Pareto diagram is also appropriate for measurement variables


when you want to count and chart the number of occurrences of unique
measurements.

Multiple Variables
To create a multiple-variable Pareto diagram, either click the Pareto diagram
button on the toolbar, open the Attribute menu, point to Pareto, then select Multiple
Variables. The Pareto Diagram multiple-variable-selection dialog box will appear.

Select one or more variables as explained under Selecting Multiple Variables on


page 123. (Some variables may already be selected as discussed in the section

CHAPTER 5: SQC Charting and Analysis • 145


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Pareto Parameters under Multiple Variable Pareto on page 335.) Click OK to


create the chart.

Example multiple-variable Pareto diagram

Single Variable
To create a single-variable Pareto diagram, open the Attribute menu, point to
Pareto, then select Single Variable. The Pareto Diagram single-variable-selection
dialog box will appear.

146 • CHAPTER 5: SQC Charting and Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Select one variable as explained under Selecting a Single Variable on page 121.
Click OK to create the chart.

Example single-variable Pareto diagram

Note that you can create a Pareto diagram from all types of data, not just defect or
attribute data. If your data is one of the other data types, the bars of the Pareto
diagram will represent the number of occurrences of unique values of the selected
variables. For example, if you select a measurement variable, the Pareto diagram
will include a bar for each unique value of that variable in the analysis range. The

CHAPTER 5: SQC Charting and Analysis • 147


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

size of each bar will represent the number of times that value of the measurement
was recorded.

Example single-variable Pareto diagram of a single defect variable

Analyzing Assignable Causes and Corrective


Actions
If you have assigned descriptions of causes or corrective actions to data points that
violate rules or do not meet specifications, Quality Analyst offers several way to
view and analyze that information. You can:
Create a text report that itemizes the assignable causes and corrective actions.
Create a Pareto chart of assignable causes and corrective actions to see which
are most common.
Save the information in a data file—either a Quality Analyst Data File or a
comma-separated-value (CSV) file.

Note: See Overview of Assignable Causes and Corrective Actions on page 275
for additional information.

148 • CHAPTER 5: SQC Charting and Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Creating a Report of Assignable Causes and


Corrective Actions
To create a report of assignable causes and corrective actions:
1 Open the Report menu, point to Assignable Cause Corrective Action, then
select Report. The Assignable Causes and Corrective Action Report dialog box
will appear.

2 Select one or more variables, as explained under Selecting Multiple Variables


on page 123, to include in the report.
3 Click OK. The Assignable Causes Corrective Action Report options dialog box
will appear.

CHAPTER 5: SQC Charting and Analysis • 149


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

4 In the Include area, select the information to include on the report. (Note that
the Comment option refers to comments you may have entered as you entered
cause or action, not the comments that appear on the chart itself.)
5 In the Format area, select a format for your report. The options are illustrated
below.
6 In the Report AC/CA for area, select Current Data Only to report the causes and
actions only for the data currently in the Data Set. Select Entire Data Set to
report all historical causes and actions, even if the corresponding data are not
all currently in the Data Set.

Note: If you are using a connectivity Data Set, your database query
probably does not retrieve all data into your Data Set. Some causes
and actions in your Data Set may be assigned to unretrieved data in
the database. Selecting Entire Data Set in this step will report those
causes and actions, even though the associated data were not
retrieved. Selecting Current Data Only will report causes and actions
only for retrieved data.
If you are using a standard Data Set, you may have archived old data
and deleted them from the Data Set. Removing old records does not
remove causes and actions associated with those records. Selecting
Entire Data Set in this step will report those causes and actions, even
though the associated data are absent. Selecting Current Data Only
will report causes and actions only for data that remain in the Data
Set.

7 Click OK. The report will appear in the Graphics Viewer in the selected
format.

150 • CHAPTER 5: SQC Charting and Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Report format: Tabular

Report format: Grouped by Variable

CHAPTER 5: SQC Charting and Analysis • 151


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Report format: Grouped by Event

Charting Assignable Causes and Corrective


Actions
To create a Pareto diagram of assignable causes and corrective actions:
1 Open the Report menu, point to Assignable Cause Corrective Action, then
select Pareto. The Assignable Causes and Corrective Action – Pareto Diagram
dialog box will appear.

2 Select the variable whose assignable causes or corrective actions you want to
chart, as explained under Selecting a Single Variable on page 121.

152 • CHAPTER 5: SQC Charting and Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

3 Click OK. The Assignable Causes Corrective Action Pareto options dialog box
will appear.

4 In the Report On area, specify whether you want to diagram Assignable


Causes or Corrective Actions.
5 In the Bars to Display area, specify which Pareto bars you want to display.
To display all bars. select All Bars.
To specify the number of bars, select Largest Bars and enter the
number of bars in the box.
To specify a percentage of all causes and actions, select Top Percent,
and enter the percentage in the box. Quality Analyst will display just
enough bars to represent at least that percentage of causes or actions.
To include a single additional bar that includes all other causes or
actions, select the Remaining bars as 'Other' check box.

6 In the Report AC/CA for area, select Current Data Only to report the causes and
actions only for the data currently in the Data Set. Select Entire Data Set to
report all historical causes and actions, even if the corresponding data are not
all currently in the Data Set. (See Note on page 150.)
7 Click OK.

CHAPTER 5: SQC Charting and Analysis • 153


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Pareto diagram of assignable causes

154 • CHAPTER 5: SQC Charting and Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Saving Assignable Causes and Corrective Actions


to a Data File
To save assignable causes and corrective actions to a data file:
1 Open the Report menu, point to Assignable Cause Corrective Action, then
select Data File. The Assignable Causes and Corrective Action Report dialog
box will appear.

2 Select one or more variables, as explained under Selecting Multiple Variables


on page 123, to include in the data file.
3 Click OK. The Assignable Causes Corrective Action Data File options dialog
box will appear.

CHAPTER 5: SQC Charting and Analysis • 155


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

4 In the Include area, select the information to include in the Data file. (Note
that the Comment option refers to comments you may have entered as you
entered cause or action, not the comments that appear on the chart itself.)
5 In the Report AC/CA for area, select Current Data Only to include the causes
and actions only for the data currently in the Data Set. Select Entire Data Set
to include all historical causes and actions, even if the corresponding data are
not all currently in the Data Set. (See Note on page 150.)
6 In the Format area, specify the format of the data file.
Select CSV to create a comma-separated-value file.
Select DAT to create a Quality Analyst Data File.
Click the corresponding Select File button to specify the name and
location of the output file.

7 Click OK.

CSV file of assignable causes and corrective actions in Notepad

156 • CHAPTER 5: SQC Charting and Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

DAT file of assignable causes and corrective actions in Quality Analyst

Exception Reporting
Quality Analyst lets you generate “exception reports” which list information about
data that produces one or more of the following types of exceptions:
Control Limit violations
Pattern Rule and Run Rule violations
Specification violations

Each exception report includes a separate section for each combination of variable
and chart type you specify. In each section, each exception is listed and described
separately, including any descriptive information specified in the Data Set
definition (see Description Variables on page 279).

CHAPTER 5: SQC Charting and Analysis • 157


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Generating an Exception Report requires two separate actions:


1 Creating an Exception Definition file (with a .QXP extension) that contains
information about which exceptions, data, variables, and chart types to report.
2 Generating the Exception Report from the Exception Definition file.

After you have created an Exception Definition file, you can generate reports from
it any number of times; you need not create one every time you want to generate a
report. An Exception Definition file is associated with a single Data Set and
cannot be used with any other Data Set.

Creating an Exception Definition File


To create an Exception Definition file:
1 Open the Report menu and select Exception. The Exception Report dialog box
will appear.

2 Click the Create button. The Exception Report Settings dialog box will appear.

158 • CHAPTER 5: SQC Charting and Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Note: If instead of creating a new Exception Definition file from scratch, you
want to use an existing one as a starting point, click Select, then use the Open
dialog box to select the existing Exception Definition file.
3 In the Report Title box, enter a descriptive title for this Exception Definition
file. This title will appear in the File Open dialog box when you later open an
Exception Definition file. It will also appear at the top of printed reports. (If
you leave this blank, the file name will be used instead.)
4 The Save QXP File As box shows the name of the file where the settings you
enter will be saved. By default, this is the name of the Data Set with a .qxp
extension. To change this file name, click the adjacent Select button, then use
the Save As dialog box to select or enter a new file name.
5 In the Exceptions area, select the exceptions—Specifications, Control Limits,
or Pattern Rules—you want to include in the report.
6 In the Report Exceptions for area, specify the time period for the data to be
included in the report.
Select All Data to include all data in the file.
To use only the most recent data, select Last. In the adjacent box, enter
the number of time units to include, and in the adjacent drop-down list
select the time unit—Minutes, Hours, Days, Weeks, or Months. Use the
next two drop-down lists to specify which Date and Time variables to use
when filtering the data.

CHAPTER 5: SQC Charting and Analysis • 159


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Note: The Last option is available only if you have specified date and/or
time description variables for this Data Set, as explained under
Description Variables on page 279.
7 The large table in the dialog box lists the combinations of variables and chart
types for which exceptions will be reported.
To add a new combination, click New to display the Exception Report
Chart Properties dialog box.

Select the Chart Type from the drop-down list. Click the Variables button
to select the variables, as explained in CHAPTER 4: Selecting Variables
on page 121. Click OK.
To remove a combination from the list, select it, then click Remove.
To edit an existing combination, select it, then click Properties.

8 If you want to apply more advanced data filtering than the Report Exceptions
for settings allow, click the Define button, then use the Data Filter dialog box
as explained under Filtering Data on page 90.
9 When you are done configuring the Exception Definition file, click OK to
save the definition to the file name you specified. Clicking Cancel will
abandon the settings and not save the file. You will return to the Exception
Report dialog box.

Generating an Exception Report


After you have created an Exception Definition file, as explained in the previous
section, you can generate an exception report.

To generate an exception report:


1 If you are not already in the Exception Report dialog box, display it by
opening the Report menu and selecting Exception.
2 To select an Exception Definition file other than the one displayed, click
Select and select the file you want.

160 • CHAPTER 5: SQC Charting and Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

3 To generate the exception report, click OK.

Note: You can also generate exception reports from within Run files. See
EXCEPT on page 437 for details.

Using an Exception Report


After you have generated an exception report, you can:
view details about each exception,
display a chart of the corresponding data,
save the report to a file, and
print the report.

Viewing Exception Details


An exception report includes a separate section for each combination of variable
and chart type you selected when you created the Exception Definition file. The
heading for each section includes either the Data file name or the title of the Data
Set, if present (see page 278), and either the variable name or the description of
the variable, if present (see page 46).
Below the heading, the exceptions are displayed in a table with columns for chart
type, exception type, and any description variables specified for the Data Set. (If
no description variables are specified, the row number is shown.) You can resize
any column by dragging the right edge of its column header. If any columns are
not visible on the right, use the horizontal scroll bar at the bottom of the table to

CHAPTER 5: SQC Charting and Analysis • 161


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

view them. If there are more rows of exceptions than will fit in the table, use the
vertical scroll bar on the right of the table to view hidden rows.

Charting Exception Data


On the right of the heading of each section of an exception report is a Chart
button. Click this button to launch the Graphics Viewer and display a chart of the
data used for that section of the report. Any data that match the Report Exceptions
for and Filter settings in the Exception Definition file will be included in the chart.

162 • CHAPTER 5: SQC Charting and Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Saving an Exception Report to a File


To save an exception report to a file:
1 Click the File button. The Output File dialog box will appear.

2 In the File Name box, enter a name for the file. We recommend not specifying
a file-name extension so that the program can apply an appropriate one based
on the file format. But if you specify an extension, it will be used regardless
of what format you choose.
3 In the Output File Format area, select the format for the file.
Select TXT to produce a text file formatted in the same basic layout as the
on-screen report.
Select DAT to produce a Quality Analyst Data file which is space-
delimited.
Select CSV to produce a comma-separated-value file in which strings are
enclosed in quotes and all strings and values are separated by commas.
Select XML to produce an XML (eXtensible Markup Language) file.

Note: When you select a format, the Files box displays a list of existing files
of that type.

CHAPTER 5: SQC Charting and Analysis • 163


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Example of a TXT output file

Example of a DAT output file

164 • CHAPTER 5: SQC Charting and Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Example of a CSV output file

Example of an XML output file

Printing an Exception Report


To print an exception report:
1 [Optional] Click the Printer button to select or configure your printer.
2 Click the Print button. Printed output will be formatted much like the “TXT”
file output, but the actual appearance will depend on your printer.

CHAPTER 5: SQC Charting and Analysis • 165


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Other Charts
In addition to control charts, you can produce several other types of charts by
opening the Other menu in the Editor. Those chart types are:
Run Chart
Scatter Diagram
Normal Probability Plot
Quantile Plot
Weibull Analysis
Box Plots

List of Other Chart Types and Corresponding Buttons and Menu Selections

Chart Type Button Menu Selection

Run Chart Run Chart

Scatter Diagram Scatter Diagram

Normal Probability Normal Probability

Quantile Plot none Quantile


Weibull Analysis none Weibull Analysis
Box Plot none Box Plot

Run Chart
A run chart is a simple plot of individual measurements with row number along
the X axis. The control limits and center line are not displayed. The values of the
measurements are scaled on the Y axis. Quality Analyst lets you select up to eight
measurement variables to chart. If you choose a single Y-axis variable, Quality
Analyst will display a single chart with the values of the measurement variable
automatically scaled on the Y axis.
If you choose to display more than one variable, you have two options. You can
display a single chart of all variables scaled to the same Y axis, or you can display

166 • CHAPTER 5: SQC Charting and Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

multiple charts with one variable each, scaled individually. In the latter case, the
individual charts will be stacked vertically.
To create a Run Chart, click the Run chart button, or open the Other menu and
select Run Chart. The Run Chart dialog box will appear.
Normally, the X axis of a run chart is simply the number of the data row in your
Data file. This will happen if you check the box labeled Automatic (it is checked
by default). If you would rather scale and label the X axis with the values of one
of the variables in your file, uncheck the Automatic box and select a variable from
the list of X-axis Variables, as explained under Selecting a Single Variable on
page 121.

Select up to eight Y-axis Variables to display in the run chart, as explained under
Selecting Multiple Variables on page 123.
If you selected more than one Y-axis variable, click Options to display the Run
Chart Style dialog box. (This dialog box will also appear if you click OK before
clicking Options.)

CHAPTER 5: SQC Charting and Analysis • 167


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Use this dialog box to specify how Quality Analyst should display run charts of
more than one Y-axis variable. Select Single Graph to display all Y-axis variables
in a single graph, scaled to the same Y axis.

Example single-graph Run Chart

Select Multiple Graphs to display separate graphs of each Y-axis variable scaled to
their own Y axis.

168 • CHAPTER 5: SQC Charting and Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Example multiple-graph Run Chart

Scatter Diagram
Quality Analyst can create a scatter diagram of up to eight Y-axis variables and a
single X-axis variable, scaling both axes automatically.
To create a scatter diagram, click the Scatter button, or open the Other menu and
select Scatter. The Scatter Diagram variable-selection dialog box will appear.

CHAPTER 5: SQC Charting and Analysis • 169


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Under X-Axis Variable, select the single variable whose values you want to scale
along the X axis, as explained under Selecting a Single Variable on page 121.
Under Y-axis Variables (1 to 8), select up to eight variable variables to scale along
the Y axis. Click OK to create the scatter diagram.

Example Scatter diagram

170 • CHAPTER 5: SQC Charting and Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Normal Probability Plot


A normal probability plot is a special type of scatter diagram used to determine
whether data is normally distributed. Quality Analyst can produce a normal
probability chart from a Data file containing subgroup measurements (data type
1,2,3...n), individual measurements (type I), grouped data (types G and M), defect
data (type P), sample size data (type Z), or other numeric data (type O).
To create a normal probability plot, click the Normal Probability button, or open
the Other menu and select Normal Probability. You can select the variable to chart
either before or after doing so. If you do not select the variable first, the Normal
Probability variable-selection dialog box will appear.

Select a variable to chart, as explained under Selecting a Single Variable on


page 121.

CHAPTER 5: SQC Charting and Analysis • 171


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Example Normal Probability plot

Quantile Plot
A quantile plot is a special type of scatter diagram used to compare two sets of
data. It is constructed by plotting the quantiles (largest value, second largest value,
third largest value, etc.) of one set of data against the quantiles of the other. The
two sets of data can be variables of subgroup measurements (data type 1,2,3...n),
individual measurements (type I), defect data (type P), sample size data (type Z),
or other numeric data (type O).
To create a quantile plot, open the Other menu and select Quantile. The Quantile
Plot variable-selection dialog box will appear.

172 • CHAPTER 5: SQC Charting and Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Select a single X-Axis Variable and a single Y-Axis Variable as explained under
Selecting a Single Variable on page 121. Click OK the create the chart.

Example Quantile plot

CHAPTER 5: SQC Charting and Analysis • 173


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Weibull Analysis
Background
Quality Analyst lets you fit the Weibull or the exponential probability distribution
to data and produce a probability plot. When the distribution is appropriate, the
data on the probability plot will follow the distribution line. You may use
multiply-time-censored (suspended) or failure-censored data.
This Quality Analyst function estimates the two-parameter (shape and scale)
Weibull distribution. For the three-parameter Weibull distribution, you can input
the third parameter (location), but Quality Analyst can not estimate it. The
Weibull distribution can be estimated using either maximum likelihood or median
rank regression. The exponential distribution requires only one parameter (failure
rate).
The Weibull distribution is often used to analyze life-test (reliability) data since
both increasing and decreasing failure rates can be represented. The exponential
distribution is used when the failure rate is constant.
Life test data consists of the number of cycles or period of time that the tested
units survive. When all of the units are tested to failure, the data is called complete
data. If the testing is stopped before all units fail, the data is called censored (or
suspended) data. With censored data, the unfailed units may share a common
survival time (single-censored), or the survival times may vary and be intermixed
with the failure times (multiply-censored).

Weibull Distribution
The Weibull distribution is popular in reliability analysis because it is so flexible;
it can assume a number of different shapes. The parameters of the distribution also
have physical meaning.
The shape parameter (beta) is a number that reveals whether older units are more
reliable or less reliable than younger units. If beta is one, the units have a constant
failure rate; this is the exponential distribution. If beta is less than one, the failure
rate decreases with age; if beta is greater than one, the failure rate increases with
age. When beta is 3.44, the Weibull distribution is a good approximation of the
normal distribution.
The scale parameter determines how far the distribution extends over the time
axis. The scale is in the same units as the data. The scale parameter is the point in
time by which 63.2% of the tested units are expected to fail (if the location
parameter is zero).

174 • CHAPTER 5: SQC Charting and Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

The location parameter determines the starting point of the distribution on the time
axis. If the location parameter is positive, units are intrinsically reliable until the
time indicated by the location parameter. If the location parameter is negative, the
units aged or suffered from wear before the test began. Usually, the location
parameter is assumed to be zero, and failures can occur as soon as the test begins.
The location parameter can be estimated by trying different values until the data
on the probability plot follows the distribution line.

Exponential Distribution
The exponential distribution is commonly used because it is so simple. The
distribution assumes a constant failure rate, and only one parameter—the average
failure rate—needs to be estimated. The mean time between failures (MTBF) is
also reported; for the exponential distribution, MTBF is simply the inverse of the
average failure rate.

Data Requirements
The Weibull Analysis requires that the data be in a particular form. The Weibull
analysis can operate on data of types I, O, and GM, and on subgroup data. (See
Data Type on page 37, for a discussion of data types.)
If you have recorded only the lifetimes of failed units, all you need is a single
column of the failure times (complete or singly-censored data).

When only the failure times have been recorded for censored data, Quality
Analyst assumes the unfailed units were all tested for the same length of time
(singly-censored data). When doing a Weibull analysis on this type of data, you
must either specify the lifetime of the unfailed units, or let Quality Analyst use the
lifetime of the longest running failed unit.
If the lifetime of the unfailed units is recorded as well (multiply-censored data), a
second column is used to indicate failed and unfailed units. To mark a unit as
failed, the second column should contain a “1” (one). To mark a unit as unfailed,
the second column should contain a “0” (zero).

CHAPTER 5: SQC Charting and Analysis • 175


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

You can also use grouped data (type GM). This is useful for large Data Sets. (See
Using Weibull with Large Data Sets below.)

Performing a Weibull Analysis


To perform a Weibull analysis, open a Data Set containing appropriate data, then
open the Other menu and select Weibull Analysis. The Weibull Analysis variable-
selection dialog box will appear.

Select the variable that contains the lifetimes of the tested units. Only the names of
appropriate data types will be listed. (Selecting variables is discussed under
Selecting a Single Variable on page 121.) Click OK to display the Weibull Options
dialog box.

176 • CHAPTER 5: SQC Charting and Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Surviving Units
In the area labeled Surviving Units, specify the nature of your data. Select None if
the data you are analyzing represents all failures and no survivors. Select Failure
Identification Variable if your data represents both failures and survivors and you
are using a second variable (containing zeros and ones) to indicate which is which.
Select that variable from the drop-down list. If there are any surviving units that
are not identified individually, select Number of Surviving Units and enter the
number in the adjacent box. If you select this option, also specify the Lifetime of
Surviving Units. Select Use Maximum Failure Lifetime to use the maximum lifetime
of any failure in the Data file.

Distribution
In the area labeled Distribution, select either the Exponential Distribution or the
Weibull Distribution for this analysis. If you select Weibull, also specify the
Estimation Method. Select either Maximum Likelihood or Rank Regression. If you
select Weibull, you must also specify the Location Parameter. Select None to
perform a two-parameter Weibull distribution, or select the edit box and enter a
value for location parameter to perform a three-parameter distribution.

CHAPTER 5: SQC Charting and Analysis • 177


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Plot Scale
For both the X Axis and Y Axis, you can impose a scale on the distribution chart.
For each axis, select Default to let Quality Analyst determine the scale, or enter
custom values for Minimum and Maximum.

Confidence Limits
In the area labeled Confidence Limits, specify the confidence interval to use. Select
either None, 95 Percent or enter a custom Percent.

Example Weibull plot

Using Weibull with Large Data Sets


When the Data file contains a large number of units, using grouped data (data type
GM—a group value and a multiplier) makes sense. For example, in tracking repair
or warranty data, there will often be a few failures from a large population.
Grouped data may be used to enter both the few failed units and the many
surviving units.
As an example, consider a population of bearing cages. Six bearing cages failed
after being in use for 230, 334, 423, 990, 990, and 1510 hours respectively. There
were 1,697 bearing cages that survived the following hours.

178 • CHAPTER 5: SQC Charting and Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Survival Hours Surviving


Bearing
From To Midpoint Cages
1 500 250 777
501 1000 750 569
1001 1500 1250 330
1501 2000 1750 21

Using grouped data and a separate variable to identify the failed bearing cages,
you can create this Data file.

File with grouped data for Weibull Analysis

The first column (LIFE(G)) is the lifetime of both failed and surviving bearing
cages. The second column (LIFE(M)) is the number of units corresponding to
each lifetime. The third column (FAILED) distinguishes between failed units (1)
and surviving units (0). Note that each failed unit with a unique lifetime has a
single entry in the file. The two units that failed after 990 hours have a single entry
with a multiplier of 2. The surviving units are represented by an average lifetime
and the number of units that survived within the range represented by that
average.
In this example, using grouped data lets you represent 1,703 units in a Data file
that has only 9 lines.

Box Plots
A box plot is a plot that gives you a general idea of the distribution of the values
of a variable along a scaled axis. Variables are listed along the Y axis and the
X axis is scaled. In Quality Analyst, the scaled axis can be in measurement units
or can be standardized to the specifications for the variables. The boxes can be

CHAPTER 5: SQC Charting and Analysis • 179


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

either in quartiles (with the median shown) or standard deviations (with the mean
shown). You can also select statistics to compute and display.

Example Box plot, box-and-whiskers type

Selecting Variables
To create a box plot, open the Other menu and select Box Plots. The Box Plots
variable-selection dialog box will appear.

180 • CHAPTER 5: SQC Charting and Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Select one or more variables as explained under Selecting Multiple Variables on


page 123.
Click Options to display the Box Plots options dialog box. (This dialog box will
also appear if you click OK before clicking Options.)

Selecting Statistics
In the area labeled Statistics, select the statistics you want to display to the right of
the box plot. Only the variables in the Selected list on the right will be displayed
on the plot.
To select additional statistics, highlight them in the Available list and click Select,
or double-click them in the Available list.
To place a new item in a specific place in the Selected list, first highlight the
existing item in the Selected list above which you want to insert a new item from
the Available list. Then select the new item. It will be inserted into a new row; no
items will be overwritten.

Note: The Selected list on the right displays a default set of statistics which you
can specify, as explained under Box Plot Statistics on page 274.

CHAPTER 5: SQC Charting and Analysis • 181


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Breakdown
In the area labeled Breakdown, select Breakdown by Variable Only to display all
values of a variable in a single box plot. Select Breakdown by to group values of
the selected variable according to the value of another variable, and display a
separate box plot for each grouping. This can be useful if the second “breakdown”
variable is DATE or SHIFT or MACHINE. If you select this option, select the
breakdown variable from the adjacent drop-down list.
If you select a date variable for the breakdown variable, the area labeled Date
Breakdown Options will become available. Here you can specify whether to group
by Day, by Week, or by Month. If you select by Week, specify (using the adjacent
drop-down list) whether you want the week to start on Sunday or Monday.
If you select a breakdown variable that is not a DateTime variable, check Sort
Categories to sort the grouped box plots by the breakdown variable. If you leave
this box unchecked, the boxes will be displayed in the order in which they are
found in the file.

Note: You can specify default breakdown parameters for individual columns in
a file. This is explained under Box Plot Parameters on page 332.

Box Type
In the area labeled Box Type, you have three choices. Select Box & Whiskers to
create a plot in which the two middle quartiles of data are displayed as boxes
adjacent to the median value, and “whiskers” extend out to encompass the upper
and lower quartiles. Outliers are displayed beyond the whiskers as asterisks. Select
Mean and +/- 3 Std Dev to create a plot in which three standard deviations of data
above and below the mean are displayed as boxes adjacent to the mean value.
Select Process Capability to create a plot that distributes your data according to the
current process capability parameters. The configuration of those parameters is
described under Process Capability (Histogram) Parameters on page 318.

Units
In the box labeled Units, select Standardized by Specifications to scale and label
the X axis of the box plot with the specification limits for the variables you are
plotting. Select Measurement Units to scale and label the X axis with the actual
values of the measurement units for the variables you are plotting. If you select
this option, check Show Specifications if you want to display the specifications for
the variables as vertical lines on the plot.

182 • CHAPTER 5: SQC Charting and Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Creating Short Run Charts


Quality Analyst lets you create the Short Run form of any Quality Analyst control
chart if you provide the correct information.
Short Run techniques let you create control charts of products with different
specifications or targets that result from the same process. In this way, you
measure the process itself, not the products of the process. Short Run charts are
valuable when individual products are not produced or sampled in sufficient
quantity to allow the timely creation of standard control charts.
The simplest Short Run technique subtracts the nominal value (process target) of
the product from each measurement. The difference from the nominal value is
then plotted. Since measured values are usually close to their nominal values,
measurements from different products have the same variation. (If products do not
have similar variation, the measurements should also be divided by a variation
factor.) The effect is that all measurements are transformed into the same units:
“standard deviation from the nominal.” The measurements all end up having the
same basis, and can therefore appear on the same control chart.
Data files for Short Run charts should only include measurements resulting from
the same operation or process step. Each measurement must be identified in the
Data file by an identification code—a part number or product code—so that the
nominal or target value (and variation, if necessary) is known.
Quality Analyst lets you create and maintain a list of each identification code and
its corresponding nominal value (and variation factor). With the click of a button,
you can read an existing file and create a list of unique identification codes,
leaving you to enter only the nominal values (and variation factors, if needed).
Once you have configured Short Run parameters for a file, as explained under
Short Run Parameters on page 336, any control chart created from that file will
be a short run chart. The label “Short Run” will appear near the upper left corner
of the charts to remind you that short run parameters are in effect.

Saving Charts
As you create charts, Quality Analyst temporarily saves their Graphics files using
a naming scheme that allows it to keep track of them internally. The Graphics files
will have names like 1000001.NWG or 2.NWG (depending on your license type).
These Graphics files are retained for the duration of the current Quality Analyst
work session, even if you close the plot in the Graphics Viewer.

CHAPTER 5: SQC Charting and Analysis • 183


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Assigning Permanent File Names


To save the Graphics files “permanently,” you must give them permanent file
names. To do this, open the File menu and select Save Graphics Files in the Editor.
The Save Graphics Files dialog box will appear.

First, make sure the Drive and the Directory areas at the bottom of the dialog box
display the location to which you want to save the Graphics file.
The upper portion of the dialog box lists, in three recessed boxes, all Graphics
files that have been created during the current Quality Analyst session. The
recessed box in the middle, labeled Graphics Files, lists the temporary names of
the Graphics files (without their extension). The box on the right, labeled Data
File | Variable | Chart, shows which Data file, variable, and chart type are displayed
in the chart. These two boxes are not editable. The box on the left, labeled Save
As, shows the file name that will be used to store the plot when you click the OK
button. “<Don’t save>” indicates that the chart will not be saved—the default
condition.

To assign a permanent file name to each Graphics file for saving, follow these
steps:
Select the plot in the list by clicking its row in any of the three recessed
boxes.
Enter a legal file name (with no extension) in the edit box just below the
Save As label.
Press <ENTER>. (The file name of the chart, with its path and the extension
.NWG added, will appear in the Save As column.)

184 • CHAPTER 5: SQC Charting and Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Repeat for each plot you want to save permanently.

Viewing Graphics Files


As you decide which plots to save, you may find it convenient to view a particular
plot in the list that may not be visible, given the arrangement of windows on your
screen. To view a plot, select it in the list by clicking its row, then click the View
button. That plot will be displayed on top of all other windows for you to inspect.
You will probably find the View button especially convenient if you created many
versions of the same chart type of the same variable in the same file. Such plots
will have the same “description” in the column labeled Data File | Variable | Chart
and could be hard to distinguish. This could easily happen if you fine-tuned some
of the parameters that affect the appearance of the chart without closing each chart
along the way.

After viewing the plot, return to the Save Graphics Files dialog box in any of these
ways:
Click any visible portion of the Save Graphics Files dialog box.
Click the Editor button on the toolbar of the Graphics Viewer.
Double-click the Control-menu box in the upper left-hand corner of the
Graphics Viewer window to close it.

Changing Your Mind


After you have assigned a permanent file name to a plot, you may decide that you
do not want to save it after all. To “unassign” a file name, select the plot in the list
by clicking its row, then click the Don’t Save button. The file name in the left-hand
recessed box will revert to “<Don’t Save>.”

Saving the Files


When you are done assigning file names to the plots you want to save, as shown
below, click OK to save the charts to permanent Graphics files. When you do this,
any plot to which you did not assign a file name will be deleted, and any plots that
are still displayed in the Graphics Viewer will be closed.

CHAPTER 5: SQC Charting and Analysis • 185


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Save Graphics Files dialog box with permanent file names assigned

186 • CHAPTER 5: SQC Charting and Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

CHAPTER 6

Managing Charts with the


Graphics Viewer
When you display graphical or textual output from within the Editor, the Editor
runs the Quality Analyst Graphics Viewer to display the chart or report.

The Graphics Viewer can also be run as a separate program. This section
describes the capabilities of the Graphics Viewer and how to use them.
Quality Analyst uses the Graphics Viewer to display both graphical and some
textual output. Graphical output is any output that is displayed as a chart. This

CHAPTER 6: Managing Charts with the Graphics Viewer • 187


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

includes everything on the Variable, Attribute, or Other menus, and the Graphics
Output options of the Regression functions on the Statistics menu. Textual output
is any output that is displayed as a text report in a Graphics Viewer window. This
includes everything on the Statistics menu (but only the Text Output options of the
Regression functions), and (on the Report menu) the Formatted Data report, the
Assignable Cause Corrective Action Report, and the Process Capability report.

When both the Editor and the Graphics Viewer are running you can easily switch
between them:
To switch from the Graphics Viewer to the Editor, open the File menu and
select QA Editor, or click the Editor button (shown at left) on the toolbar.
To switch from the Editor to the Graphics Viewer, open the Run menu and
select Quality Analyst Graphics or click the Graphics Viewer button (shown at
left) on the toolbar.

Running the Graphics Viewer Alone


Though you will probably use the Graphics Viewer most often from within the
Editor, you can also run the Graphics Viewer by itself as a “standalone” program:
Click Start, select Run, click Browse, then navigate to the Quality Analyst
program folder and select NWAGraph.exe.

Tip: If you frequently run the Graphics Viewer by itself, you might want to
create your own desktop icon for the Graphics viewer. Refer to your
Windows documentation for instructions.

188 • CHAPTER 6: Managing Charts with the Graphics Viewer


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

The main difference between using the Graphics Viewer by itself and using it
from within the Editor is that you must “manually” open a previously saved
Graphics file. To open a graphics file, open the File menu and select Open, or click
the File Open button on the toolbar. The File Open dialog box will appear.

CHAPTER 6: Managing Charts with the Graphics Viewer • 189


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

The Files of type list shows NWG Graphics Files (*.nwg)—the file type that the
Graphics Viewer can open. Select the file you want to display.
Below, the Graphics Viewer is shown displaying HousingXR.nwg which contains
an X-bar and Range chart of the variable GAP in the Data Set HOUSING.DAT.

190 • CHAPTER 6: Managing Charts with the Graphics Viewer


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Graphics Viewer displaying the Graphics file HousingXR.nwg

To view additional charts, simply repeat the File Open process. You can open as
many chart windows as will fit on your screen. That number will depend on the
display resolution of your monitor.

Configuring the Graphics Viewer Interface


In the Graphics Viewer, you can toggle the display of the toolbar and status bar,
and you can change the size of the toolbar buttons.

To toggle the display of the toolbar:


Open the View menu, then select Toolbar. (The check mark ( )indicates the
current status of the toolbar.)

To toggle the display of the status bar:


Open the View menu, then select Status Bar. (The check mark ( )indicates the
current status of the status bar.)

CHAPTER 6: Managing Charts with the Graphics Viewer • 191


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To change the size of the toolbar buttons:


Open the View menu, point to Button Size, then select either Large Buttons,
Medium Buttons, or Small Buttons. (The check mark ( )indicates the current
button size.)

Individual Chart Windows


When the Graphics Viewer displays a Graphics file or a text report, it does so
within an individual chart window—a “child” window within the “parent”
application, the Graphics Viewer. Each time you switch back to the Editor and
create a new chart or report, the Graphics Viewer displays it in a new chart
window. Each new chart window is displayed “maximized” within the Graphics
Viewer application window. Previously created charts are not visible, but they are
open and accessible.

Note: For the sake of simplicity, the rest of this section refers to “chart
windows” even though a chart window can contain either graphical
output or textual output.

Switching Between Chart Windows


You can switch between open chart windows in any of three ways:
If you select Window on the menu bar, the Graphics files of all open charts are
listed at the bottom of the drop-down menu. They will probably have names
like 1000001.NWG, 2000001.NWG, 2.NWG, or 3.NWG depending on your
license type. The currently displayed chart will have a check mark (“ ”) next
to it. Click any file name to make its window active.
Clicking any visible portion of the window of the chart you want will make it
active.
Pressing <CTRL+F6> makes each open chart active in turn. Pressing
<SHIFT+CTRL+F6> cycles through the charts in the opposite direction.

Arranging Multiple Chart Windows


You can arrange the chart windows within the Graphics Viewer window in several
ways. Cascading the windows makes them all the same size and arranges them,
overlapped, starting in the upper left corner of the Graphics Viewer window and
cascading toward the lower right corner. Tiling the windows horizontally

192 • CHAPTER 6: Managing Charts with the Graphics Viewer


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

arranges all chart windows within the Graphics Viewer window in a way that
emphasizes horizontal orientation. Tiling the windows vertically arranges all
chart windows within the Graphics Viewer window in a way that emphasizes
vertical orientation. With certain numbers of chart windows, therefore, tiling
horizontally and vertically will have the same result.
To cascade chart windows, open the Windows menu and select Cascade or click
the Cascade button.
To tile chart windows horizontally, open the Windows menu and select Tile
Horizontal or click the Tile Horizontal button.
To tile chart windows vertically, open the Windows menu and select Tile Vertical or
click the Tile Vertical button.

Chart Windows shown Cascaded, Tiled Horizontally, and Tiled Vertically

You can also arrange chart windows “manually” by dragging the edges or corners
of the restored (that is, neither maximized nor minimized) chart.

Minimizing Chart Windows


Chart windows can also be minimized within the Graphics Viewer window. To
minimize a chart, click the Windows “minimize” button in the upper right corner
of the chart window (not the application window). The chart will be displayed as
an icon at the bottom of the Graphics Viewer window.
When charts are minimized, they are not subject to cascading or tiling as are
maximized or restored charts. When the Graphics Viewer contains both minimized
and nonminimized charts, cascading and tiling the chart windows leaves enough
room at the bottom of the Graphics Viewer window to reveal the minimized chart
icons. You may, however, cover the icons by dragging the edge of a chart window
over them.

CHAPTER 6: Managing Charts with the Graphics Viewer • 193


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

The following figure shows the Graphics Viewer window in which two charts
have been minimized and a third and fourth have been tiled vertically.

Graphics Viewer with tiled charts and minimized charts

Printing Charts and Text Reports


Charts and text output are printed from within the Graphics Viewer. You can
either print a single chart or report at a time or assemble several charts and reports
into a group for printing using the Group Layout feature of Quality Analyst.

194 • CHAPTER 6: Managing Charts with the Graphics Viewer


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Configuring the Layout of Printed Charts and


Reports
To configure the layout of printed charts and reports:
1 Open the File menu and select Page Setup. The Page Setup dialog box will
appear.

2 In the Paper area, select the Size of the paper you want to print on and the
Source of the paper. The available options vary from printer to printer.
3 In the Orientation area, chose Portrait (vertical) or Landscape (horizontal).
4 In the Margins (Inches) area, specify the size of the four margins between the
edge of the paper and the chart or report.
5 Click OK.

Single Charts or Text Reports


To print a single chart or a text report, first make its window the active window as
described under Switching Between Chart Windows above. Then either click the
print button on the toolbar, or open the File menu and select Print. In either case,
the Print dialog box will appear. (It may look different on your system.)

CHAPTER 6: Managing Charts with the Graphics Viewer • 195


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

This is a standard Windows dialog box that lets you specify such settings as the
print range, number of copies, page orientation, and so on. When you are ready to
print the chart, click Print.

Group Layout
To assemble several charts and perhaps a text report on a page for printing, first
assemble them into a Group Layout window in the Graphics Viewer.

Display the Charts


Start by opening a window within the Graphics Viewer for each chart or text
report you want to print. If you are using the Editor to create charts, any chart
displayed in the Graphics Viewer can be grouped. If you are working in the
Graphics Viewer, either with or without the Editor running, you can open any
existing Graphics file to group.
There is no harm, by the way, in opening more or fewer chart windows than you
need, at this point. You can open more charts or close open charts at any time
while assembling your group. And you are not obligated to use all open charts;
you may simply ignore them or close them.

196 • CHAPTER 6: Managing Charts with the Graphics Viewer


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Create a Group Layout Window


After you have displayed all the charts you want to assemble, open a Group
Layout window in the Graphics Viewer. To do this, either click the Group Layout
button on the toolbar, or open the File menu and select Group. The Group Layout
dialog box will appear.

This dialog box contains buttons for several alternative combinations of chart
placement and number of charts. The buttons and their names are as follows.

Group Layout Buttons and Names

Single over Three Four Stacked Five Stacked


Single Stacked

Side-By- Three Side- Four Quarter Three Three Four


Side by-Side Stacked, Stacked, Stacked,
Side-by-Side Three Wide Three-Wide

Side-By- Single Over Split Beside Single


Side Over Side-by-Side Single Beside Split
Single

The selected layout appears darkened. Select the layout you want by double-
clicking the corresponding layout button, or clicking the layout button and then
clicking OK. A Group Layout window will be created, and it and all the chart

CHAPTER 6: Managing Charts with the Graphics Viewer • 197


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

windows will be tiled within the Graphics Viewer window. The Group Layout
window has an empty panel for each chart you plan to assemble. Two charts, a
text report, and an empty Side-by-Side-Over-Single Group Layout window might
look like this.

Assemble the Layout


To assemble the displayed charts into a Group Layout for printing, you drag each
chart from its window and drop it onto the desired panel of the Group Layout
window.

1 Enable the Select cursor by clicking the Select toolbar button (shown at left)
or opening the View menu, pointing to Cursor Type, then clicking Select.
2 Click-and-hold the chart area (not the title bar) of any chart window, then
drag the mouse pointer (the appearance of which will change as shown at left)
to any chart panel of the Group Layout window and release the mouse button.
A copy of the chart will appear in the panel, scaled to size.
3 Fill the other panels in the Group Layout window with the other charts using
the same technique.

198 • CHAPTER 6: Managing Charts with the Graphics Viewer


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Dragging and dropping the charts into the Group Layout panels might look like
this.

Once you have placed charts in a Group Layout panel, you can rearrange them by
dragging a chart from one panel and dropping onto another. Notice, though, that
this creates a copy of the dragged chart in the destination panel, replacing the
existing chart, if any, in the destination panel. If you want to replace the
overwritten chart, drag a new copy of it from its individual chart window.
A Group Layout may contain only a single text report. If you include a text report
in a Group Layout, we suggest that you place it in a pane that extends the entire
width of the Group Layout, as shown in the example above. This can help avoid
potential problems that may result from scaling the text to fit the display area.

CHAPTER 6: Managing Charts with the Graphics Viewer • 199


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Formatting the Group Layout


At any time after you have created a Group Layout window, you can adjust the
relative sizes of the panels by dragging the borders between them with the mouse.
Here is an example of a Group Layout window before and after a resizing of the
panels.

200 • CHAPTER 6: Managing Charts with the Graphics Viewer


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Notice that when you move the mouse pointer over a border, it changes into a
two-way resizing pointer—a pair of parallel lines with opposed arrowheads. When
you click-and-hold this pointer, you can slide the border in the direction of either
arrow—either up and down or left and right. Release the mouse button to
complete the resizing.
If your Group Layout includes borders that intersect, and you move the mouse
pointer over the intersection of the borders, it will change into a four-way resizing
pointer—two crossing double-headed arrows. When you click-and-hold this
pointer, you can slide the intersection in any direction—up or down or left or
right. Release the mouse button to complete the resizing.

Printing the Group Layout


Print the Group Layout just as you would a single chart window:
1 Make the Group Layout window the active window.
2 Open the File menu and select Print.
3 Modify print settings if necessary.
4 Click OK.

Because the printed page may not have the same proportions as the Group Layout
window when you resize panels, the shapes and sizes of the printed panels may
differ from those of the on-screen panels. If precise sizing is important, you may
have to experiment with different arrangements in the Group Layout window.

Previewing Printed Output


You can preview the appearance of printed output of either a single chart or a
group layout. With the desired chart window active, open the File menu and select
Print Preview, or click the print preview button (shown at left). The Graphics
Viewer will display a facsimile of the printed page, as shown below.

Use the buttons at the top of the window to manipulate the preview:
Click Print to print the chart or report from preview mode.
Click Prev or Next to display other pages in a multi-page report.
Click Two Page to view two pages side-by-side. In two-page mode, the same
button will be labeled One Page. Click it to return to the single-page view.

CHAPTER 6: Managing Charts with the Graphics Viewer • 201


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Click Zoom In to enlarge the chart or report within the window. Or you can
click anywhere on the simulated page while the mouse pointer looks like a
magnifying glass.
Click Zoom Out to shrink the chart or report within the window.
Click Close to exit print preview and return to the normal screen display of
the chart or report.

Example preview of a printed page

202 • CHAPTER 6: Managing Charts with the Graphics Viewer


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Annotating Charts
Quality Analyst lets you annotate charts by:
modifying or adding chart titles,
attaching text comments to data points on the chart, and
modifying or adding chart footers.

Modifying Chart Titles


When a chart is displayed in the Graphics Viewer, you may find it convenient to
change the chart titles (overriding the titles that are specified elsewhere in Quality
Analyst) or add additional titles for greater clarity.

To edit chart titles:


1 Double click the title area of the chart (that is, any area above the actual
chart). The Edit Title dialog box will appear, listing all current titles as they
appear on the chart, top-to-bottom.

2 Select the title you want to edit using the <UP> or <DOWN> arrow keys.
3 To edit the selected cell, press the <INS> key.
Note: In place of the previous two steps, you can double-click a title.
4 Enter new text or edit the existing text.
5 Press <UP> or <DOWN > to accept the changes and move to another cell in
the list.
6 Repeat steps 2–5 to edit or create additional titles.

CHAPTER 6: Managing Charts with the Graphics Viewer • 203


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

7 Click OK.

Working with Graphics Comments


Quality Analyst lets you attach a textual comment to a data point on a control
chart. The comment will move with the data point as you resize the chart window
or subsequently add data to your file.

Note: Quality Analyst uses the values of the key columns specified for your
Data Set to keep track of which data point each Graphics Comment is
assigned to. So if you intend to use Graphics Comments, be sure to
specify key columns for your Data Set. See Specifying Key Columns for
the Data Set on page 57 for instructions.
To label a data point with its row number, the values of its description
variables, or an assigned cause or corrective action, use a callout instead.
See Working with Callouts on page 210 for instructions.

Adding Graphics Comments


To add a comment, first click the Comment button on the toolbar or open the View
menu, point to Cursor Type, then select Comment. Now when you move the mouse
pointer over the body of a chart (that is, the actual graph area—not the axis labels,
titles, etc.), the mouse cursor will change to the Comment cursor as shown at
left—an “I-beam” and the letters “ABC.” Move this pointer to the position on the
chart where you want the first character of your comment to be and double-click
the mouse. The Edit Comment dialog box will appear.

In the edit box, enter the comment you want to add to the chart, then click OK. The
comment will appear on your chart.
You can add comments this way to charts either in individual chart windows or in
panels of a Group Layout window.

204 • CHAPTER 6: Managing Charts with the Graphics Viewer


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Moving Comments
To move a comment that you have added to a chart, select the Comment mouse
pointer. With the I-beam of the Comment mouse pointer, click and drag the
comment to a new location on the chart. Quality Analyst will “attach” the
comment to whichever data point is nearest the leftmost character of the comment
when you release the mouse button.

Editing or Deleting Graphics Comments


To edit comments that you have added to a chart, first select the Comment mouse
pointer. With the I-beam of the Comment mouse pointer, double-click the
comment. The Edit Comment dialog box will appear with the text of the comment
in the edit box. You can either delete the comment entirely, by clicking the Delete
button, or you can edit the text in the box as desired and click OK.
After you have saved a chart with comments added, you can also edit and delete
these comments on the Graphics Comments tab of the Variable Parameters dialog
box in the Editor. This is described under Graphics Comments on page 292.

Modifying Chart Footers


Most Quality Analyst charts include footer lines at the bottom of the chart window
that display several useful statistics about the charted data. You can add
descriptive or explanatory footers, or modify the existing footers if you want. You
can also delete any footer line.

CHAPTER 6: Managing Charts with the Graphics Viewer • 205


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To modify the footers on a chart:


1 Double-click one of the footer lines on the chart. The Edit Footer dialog box
will appear, showing the contents of each column of each footer line.

2 To change any footer text, edit the appropriate cells in the grid.
3 To delete a single cell, select the cell than click Delete. The cell contents will
be deleted, but the contents of other cells will not shift up or left to fill the
space. (If you select a cell and press <DEL>, the contents will be deleted and
you will enter edit mode so you can enter new cell content.)
4 To delete an entire footer line, select the line by clicking its line label (for
example, Line 2), then click Delete. (The remaining lines will not shift up to
fill the space.)
5 When you are done editing footer lines, click OK.

Viewing Chart Details


To help you analyze your data visually, Quality Analyst lets you view the details
of any point on a chart. Specifically, you can have Quality Analyst display any of
several types of details:
The row number of the data point in the data Set.
The value(s) of the Description Variable(s) (X-axis labels) for any data point.
The name of the pattern rule or zone rule being violated (if any) by any data
point.
The causes or corrective actions, if any, you have assigned to any data point.

206 • CHAPTER 6: Managing Charts with the Graphics Viewer


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

The X and Y values of any point on the chart (not necessarily a data point).

Depending on which details you want to view, you can view them in either of two
ways:
In a single detail window that displays details for whichever data point you
point to with the mouse. (If you print a chart or save it as an image file, the
content of the detail window is not included in the output.)
In one or more callouts that you “attach” to a data point on the chart. (If you
print a chart or save it as an image file, callouts are included in the output.)

Methods Available for Viewing Chart Details

Detail Type Detail Window Callout


Row z z
Description Variables z z
Rule Violations z |
Cause and Action z z
X, Y Coordinates z |

Using the Detail Window


The detail window is a window that displays details about the data point (or chart
location) nearest your mouse pointer. As you move the mouse pointer around the
chart area, the contents of the detail window changes.

Specifying the Content of the Detail Window


Before displaying the detail window, you will probably want to specify which
information the detail window will include.

To specify the contents of the detail window:


1 Open the View menu and point to Detail Window,
OR
Right-click the data area of a chart and point to Detail Window.
2 On the resulting submenu:

CHAPTER 6: Managing Charts with the Graphics Viewer • 207


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Leave a check mark next to Description to include the values of all


Description variables in the detail window. (Selecting description
variables is explained under Description Variables on page 279.)
Leave a check mark next to Violations to include a description of the
applicable violation(s) when you point to a violating data point on the
chart.
Leave a check mark next to Cause and Action to include, in the detail
window, any causes or corrective actions you have attached to the data
point. (Attaching causes and corrective actions to data points is explained
under Assigning Causes and Corrective Actions to Data Points on
page 217.)
Leave a check mark next to X and Y to include the X and Y coordinates of
the mouse pointer on the chart.
Clear any check mark to remove that item from the detail window.

Note: You can specify the content of the detail window before or after
displaying the detail window. Any changes you make while the detail
window is displayed will appear instantly.

Displaying the Detail Window


To display the detail window:
Click the Detail Window button on the toolbar (shown at left).
The detail window will appear and the mouse pointer will change to the detail
cursor (shown at left)—a small square with “gunsight” lines in the middle of each
of the four sides.

208 • CHAPTER 6: Managing Charts with the Graphics Viewer


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Working with the Detail Window


You can move the detail window anywhere on your screen by dragging its title
bar. You can resize it to any size by dragging any of its edges.
As you move the mouse pointer over the body of a chart (that is, the actual graph
area—not the axis labels, titles, and so on), the detail window will display the
specified details of the nearest data point. A vertical black line appears on the
chart (or charts, if you chose a double chart type as shown above) indicating the
X-axis position of the nearest data point. This line “snaps” from one data point to
the next as you move the mouse pointer.
The first line in the detail window indicates the type of chart you are viewing (for
example, “X-bar”). If you are viewing a double chart type (like an X-bar-and-
Range chart), the first line indicates which of the two charts you are pointing to
with the mouse.
You can only view description detail if you have specified description variables
for the file you are viewing. You can specify description variables for an entire
file (as explained under Description Variables on page 279) or for charts of
individual variables (Description Variables on page 294).

CHAPTER 6: Managing Charts with the Graphics Viewer • 209


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

The figure above illustrates how you can display more description variables in the
detail window than appear along the X axis. The settings that produce such a
result are shown in the File Parameters figure on page 281.
If you choose to display X and Y coordinates in the detail window, you should be
aware that the X value shown will be the row number of the nearest data point, but
the Y value shown will be that of the place in the middle of the mouse cursor,
even if you are pointing to “white space” on the chart. To view the Y value of a
data point, you must center the mouse cursor on that data point. (Even then, the
Y value shown will be approximate.)

To close the detail window:


Click its close button in the upper right corner,
OR
Select one of the other cursor-type buttons on the toolbar,
OR
Open the View menu or right-click the chart, point to Cursor Type, then select
anything except Detail Window.

Working with Callouts


Quality Analyst lets you attach callouts to individual data points. Callouts appear
as “dialog balloons” next to the data point, something like a “sticky note.”

210 • CHAPTER 6: Managing Charts with the Graphics Viewer


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

You can select one or more of the following pieces of information to appear in
callouts:
the row number of the data points
the values of the description variables you have selected for the Data Set
the cause or corrective action you have assigned to the data point

Callouts are not saved with a Graphics File, but they do appear when you print a
chart or save it to an image file (e.g., JPG or BMP).

Note: To configure the background color for callouts, see Background Color
for Callouts on page 222.

Specifying the Content of Callouts


Before you attach a callout to a data point, you will want to specify which
information the callout will include.

CHAPTER 6: Managing Charts with the Graphics Viewer • 211


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To specify the contents of callouts:


1 Open the View menu and point to Callout,
OR
Right-click the data area of a chart and point to Callout.
2 On the resulting submenu:
Leave a check mark next to Row to include the row number of the data
point within the Data Set in the callout.
Leave a check mark next to Description to include the values of all
Description variables in the callout. (Selecting description variables is
explained under Description Variables on page 279.)
Leave a check mark next to Cause and Action to include, in the callout,
any causes or corrective actions you have attached to the data point.
(Attaching causes and corrective actions to data points is explained under
Assigning Causes and Corrective Actions to Data Points on page 217.)
Clear any check mark to remove that item from callouts.

Note: Specifying the content of callouts is not retroactive. If you have added
callouts to your chart, specifying different content will affect subsequent
callouts but not existing callouts.

Adding Callouts to Data Points


To add a callout to a data point:
Double-click the data point.
The callout is positioned with the middle of its left edge over the data point.

Note: If you have turned off all callout content (see previous section),
double-clicking a data point has no effect.

212 • CHAPTER 6: Managing Charts with the Graphics Viewer


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

If the default location of the callout is not satisfactory, you can move it.

To adjust the position of a callout:


Drag the balloon portion of the callout to a new position on the chart.
The stem of the callout will stretch and its attachment point will adjust as you
move the balloon around while dragging.

Removing Callouts from a Chart


When you no longer need callouts, you can remove them one at a time or all at
once.

To remove a single callout:


1 Double-click the callout.
2 Click Yes in the confirmation dialog box.

CHAPTER 6: Managing Charts with the Graphics Viewer • 213


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To remove all callouts at once, do one of the following:


Click the Clear All Callouts toolbar button (shown at left),
OR
Follow this procedure:
1 Open the View menu,
OR
Right-click the data area of the chart.
2 Select Clear All Callouts.

Zooming in on Charts
If a chart contains many, many records, data points may become crowded in the
X-axis direction, making it difficult to interpret the chart or to select individual
points for attaching comments or callouts, or for assigning causes or corrective
actions. In these cases, you may find it helpful to “zoom in” on the data and chart
only a subset of the records in the entire Data Set.

To zoom in on a chart:
1 Click the Zoom In button on the toolbar (shown at left).
2 Click and hold the mouse button down at a place on the chart above the
X-axis where you want the zoomed chart to begin (or end).
3 Drag the mouse right (or left) to the place on the chart above the X-axis
where you want the zoomed chart to end (or begin). As you drag the mouse, a
dotted rectangle will show the portion of the chart that will be included in the
zoomed chart.

214 • CHAPTER 6: Managing Charts with the Graphics Viewer


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

4 Release the mouse button. The X-axis of the chart will “stretch” to include
only those records you outlined.

CHAPTER 6: Managing Charts with the Graphics Viewer • 215


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

5 If you need to zoom in even more, repeat steps 2–4.

You can also zoom in or out precisely on the X or Y axis by specifying the limits
of either axis.

To scale the X or Y axis:


1 Select the Select cursor by clicking the Select toolbar button or opening the
View menu, pointing to Cursor Type, and selecting Select.
2 Double-click the X or Y axis of the chart. The X-Axis Scale (or Y-Axis Scale)
dialog box will appear.

216 • CHAPTER 6: Managing Charts with the Graphics Viewer


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

3 Enter values for X-axis or Y-axis settings as described in the table below.
4 Click OK.

Setting Description
Minimum The minimum data value that can be displayed on the chart.
Maximum The maximum data value that can be displayed on the chart.
Scale Start X axis: The value near or to the left of the left end of the chart at
which to start labeling tick marks.
Y axis: The value near or below the bottom of the chart at which to
start labeling tick marks.
Scale Increment The spacing of labeled tick marks.
Tick Start X axis: The value near or to the left of the left end of the chart at
which to start placing tick marks.
Y axis: The value near or below the bottom of the chart at which to
start placing tick marks.
Tick Increment The spacing of tick marks.

To undo the last zoom:


1 Click the Zoom Out button on the toolbar (shown at left).
2 Click anywhere on the data area of the chart.
3 If you zoomed in more than once in succession, click the chart again to undo
successive zooms.

Note: The zoom feature is visual only. None of the calculations of any SPC
parameters, such as control limits, are affected by zooming in.

Assigning Causes and Corrective Actions to


Data Points
When you configured your Data Set, if you associated lists of assignable causes
and corrective actions with any of the variables (as explained under Specifying
Lists of Assignable Causes and Corrective Actions on page 59), you can assign a

CHAPTER 6: Managing Charts with the Graphics Viewer • 217


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

cause or action to any charted data point of those variables in the Graphics
Viewer.

Note: Quality Analyst uses the values of the key columns specified for your
Data Set to keep track of which data point each cause or action is
assigned to. So if you intend to assign causes or actions, be sure to
specify key columns for your Data Set. See Specifying Key Columns for
the Data Set on page 57 for instructions.

To assign a cause or action to a charted data point:


1 Right-click the data point on the chart, then select Cause and Action from the
pop-up menu. The Assignable Cause / Corrective Action dialog box will
appear.

2 To assign a cause to the data point, select a cause from the Assignable Cause
list.

3 To assign an action to the data point, select an action from the Corrective
Action list.
4 If you want to add a clarifying or explanatory comment to the data point,
enter it in the Comment box.

218 • CHAPTER 6: Managing Charts with the Graphics Viewer


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

5 Click OK.

The plotting character of the data point will change to indicate that you have
assigned a cause or action to it.

To remove an assigned cause or corrective action from a data point:


1 Right-click a data point on a chart that has an assigned cause or action, then
select Cause and Action from the pop-up menu.
2 In the Assignable Cause list, select (None).
3 In the Corrective Action list, select (None).
4 Clear the Comment box.
5 Click OK.

See Specifying Plotting Characters on page 226 for instructions on selecting the
plotting character used for assignable causes and corrective actions.
See Analyzing Assignable Causes and Corrective Actions on page 148 for
instructions on configuring and generating a report of assignable causes and
corrective actions.

CHAPTER 6: Managing Charts with the Graphics Viewer • 219


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Configuring the Appearance of Graphics and


Text
Quality Analyst lets you specify many visual attributes of the graphical and textual
output produced by the Graphics Viewer. You can specify separate sets of
attributes for display on the screen, for output on the printer, and for storage on
the Clipboard (for pasting into other programs). When you change these settings,
they are applied immediately to charts and text reports already open, and to all
charts and reports created thereafter.

Specifying Colors and Line Thicknesses


To begin specifying colors and line thicknesses:
1 Open the Settings menu; point to Colors, then select Screen, Printer, or
Clipboard (depending on which output destination you want to configure).
2 Specify colors and line thicknesses as explained in the next few sections.

To reset colors and line thicknesses to their default settings:


Click the Reset button.

220 • CHAPTER 6: Managing Charts with the Graphics Viewer


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Configuring the General Appearance of Charts


Background Screen Color
In the Graphics Window area, under Background for Graphics, click Change to
select a color for the “canvas” on which your charts are displayed.
Quality Analyst always prints graphics with a white background, so this setting is
not available in the Colors for Printer dialog box.

Setting All Colors to Black


Normally, Quality Analyst displays distinct elements of graphics in different
colors. However, making all graphic elements black can improve the readability of
the graphics on some screens (particularly those of laptops), and on black-only
printers that may not translate colors into shades of gray satisfactorily.

To change the color of all graphic elements to black:


In the Graphics Window area, select the All Colors to Black checkbox.

CHAPTER 6: Managing Charts with the Graphics Viewer • 221


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Note: The previous two settings are particularly useful if you have a black-only
printer or a monochrome monitor (or any monitor on which colors are
hard to distinguish).

Bar Fill
By default, the bars in bar charts (like histograms and Pareto diagrams) are filled
with a solid color, but you can select a different fill pattern.

To select a fill pattern for bar charts:


In the Graphics Window area, select the pattern from the Bar Fill list. The
choices are illustrated below.

Solid Slanting Slanting Crosshatch Horizontal Vertical Grid


Up Down

Background Color for Callouts


Quality Analyst lets you attach callouts of individual data points on a chart. (See
Working with Callouts on page 210.) You can configure the background color for
these callouts here.

To specify the background color for callouts:


1 In the Graphics Window area, under Background for Callouts, click the Change
button.
2 Select a color using the Windows Color selector.

222 • CHAPTER 6: Managing Charts with the Graphics Viewer


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Configuring the Appearance of Control Charts


In the Control Chart Graphics area of the dialog box, you can specify six
combinations of color and line thickness, each of which is used for specific
elements of control charts.
Text and borders
Data lines and In-Control data points
Limits and Out-of-Control data points
Rule Violations (data points)
Probability Limits (lines)
Bar Fill

You can also specify the colors for each of three “Rainbow Zones”. 5
For each combination there is a square color sample, a Change button, and (except
for rainbow zones) a Line Thickness selector.

To change any of the six colors:


1 Click the corresponding Change button.
2 Select a color using the Windows Color selector.

5
See Rainbow Zones on page 252 for an explanation.

CHAPTER 6: Managing Charts with the Graphics Viewer • 223


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To change any of the six line thicknesses:


In the Line Thickness list, specify whether Quality Analyst should display the
corresponding chart element using a Fine, Medium, or Thick line.
Because the characteristics of different monitors and printers vary, you should
experiment to find a line thickness that meets your needs for the specific
devices you use. If you occasionally switch between printers that have
different characteristics, don’t forget to change these settings when you
switch printers.

To suppress the display of all rainbow zones:


Clear the check box labeled Show Rainbow Zones.

Configuring Colors for Other Charts


In the Other Graphics area of the dialog box, you can specify colors for each of the
data series in other types of charts available in Quality Analyst (that is, most of the
charts found on the Other and Statistics menus in the Editor). You can specify
separate colors for up to eight data series.

To specify a color for a data series:


1 Click the Change button for the data series.
2 Select a color using the Windows Color selector.

Configuring the Appearance of Text Reports


In the Text Window area, specify colors and line thicknesses for textual reports
generated by the Graphics Viewer. You can specify colors for the Text and the
Background of these reports, and you can specify the color and Line Thickness of
the Horizontal Lines that will separate sections of the report.

To specify a color:
1 Click the Change button for the color you want to specify.
2 Select a color using the Windows Color selector.

To specify the line thickness of horizontal lines:


In the Line Thickness list under Horizontal Line, select Fine, Medium, or Thick.

224 • CHAPTER 6: Managing Charts with the Graphics Viewer


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Specifying Fonts
Quality Analyst lets you specify the fonts used for several types of text on your
charts.

To begin specifying fonts for the different types of text:


Open the Settings menu, point to Fonts, the select Screen or Printer.

In the Font Category list, select the type of text for which you want to specify a
font. That category will appear in red in the applicable preview panes.
Below the preview panes, select a Font, Font Style, and Size for that font category.
You can see what your font looks like in the Sample area. (Note: The preview
panes do not reflect your font choice; they are intended only to show you where it
will be used on charts.)
When you select X-Axis Label for Font Category, the X-Axis Label Angle list
becomes available. If you want to rotate the labels on the X axis of your charts,

CHAPTER 6: Managing Charts with the Graphics Viewer • 225


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

select the angle (in degrees clockwise from horizontal) from the list, or enter a
specific angle in the box using the keyboard.

To reset the current font category to its default setting:


Click the Reset button.

To reset all font categories to their default settings:


Click the Reset All button.

About Font Size


One of the font attributes you can specify when selecting a font using the Font
dialog box is its point size. You should be aware that, in most cases, the point size
you pick will be “nominal” or “relative” and not precise, depending on how you
arrange or resize the screen display or printed page.
When you specify a font size for screen display, the font size Quality Analyst
actually uses will be based on the size you specified relative to the size of a typical
window. As you enlarge or shrink the window, or group several charts into a
single window, Quality Analyst will enlarge or shrink the fonts accordingly.
When you specify a font size for printed output, Quality Analyst will use that
precise font size if you print a standard single (X-Bar, for example) or
combination (X-Bar and Range, for example) chart. If you print a group of charts
(as explained under Group Layout starting on page 196), Quality Analyst will
shrink the fonts accordingly to maintain their size relative to the shrunken chart.
Quality Analyst does not adjust the size of fonts in textual windows (like it does
with windows that contain graphical output) as you resize the window or copy it
into a group layout. Therefore, the font size you specify is the font size you will
get when displaying and printing text output.
Even though Quality Analyst is designed to produce attractive readable output,
even as you resize on-screen or printed output, it is possible to specify font types,
font sizes, and resizing settings that will produce unacceptable output. For
example, titles that are too long to fit on the title line will be truncated on the left
and right. X-axis labels that are too large will overlap the next label.

Specifying Plotting Characters


Quality Analyst lets you specify the characters used to represent data points on
your charts.
To specify plotting characters for charts, open the Settings menu and select
Plotting Characters. The Plotting Characters dialog box will appear.

226 • CHAPTER 6: Managing Charts with the Graphics Viewer


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

In the Font list, select the font you want to use for all plotting characters. The grid
below displays the character set for the selected font.
The Control Charts area displays the characters that will be used for each type of
data point on control charts. The Other Graphics area of the dialog box displays
the plotting characters that will be used for data points on other types of charts
available in Quality Analyst (that is, most of the charts found on the Other and
Statistics menus in the Editor). You can specify plotting characters for up to eight
data series.

To select a plotting character:


1 Select the character you want to change in the Control Charts or Other
Graphics areas of the dialog box.
2 Click the new character in the character-set grid.

If you want to suppress the display of plotting characters, so that only the lines
(not the points) of data appear on charts, see Plotting Characters on page 250 for
global settings, or Plotting Characters on page 309 for variable-specific settings
for a Data Set.

CHAPTER 6: Managing Charts with the Graphics Viewer • 227


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Specifying Advanced Graphics Options


Specifying JPEG Quality
The Graphics Viewer lets you save a chart or chart group as a bitmap graphics file
(as explained in Saving Charts and Reports on page 230). One of the allowable
file formats is JPEG which lets you balance image quality with file size (which are
inversely related) by varying the degree of data compression. The Graphics
Viewer lets you specify the quality of saved JPEG files.

To specify JPEG output quality:


1 Open the Settings menu and select Advanced. The Advanced Graphics Options
dialog box will appear.

2 In the box labeled JPEG Output Quality (1-100), enter an integer between 1 and
100. Higher values produce higher-quality images but larger files. Lower
values produce lower-quality images but smaller files.
3 Click OK.

Specifying Decimal Symbol


By default, the Graphics Viewer uses a period for the decimal symbol when
displaying decimal numbers.

To change the decimal symbol used by the Graphics Viewer:


1 Open the Settings menu and select Advanced. The Advanced Graphics Options
dialog box will appear.
2 In the list labeled Decimal Symbol, select either a Period or a Comma.
3 Click OK.

228 • CHAPTER 6: Managing Charts with the Graphics Viewer


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Including the Variable Name in the Window Title


By default, the title bar of each chart window in the Graphics Viewer contains the
name of the temporary Graphics file containing the chart. Quality Analyst lets you
include the name of the charted variable.

To include the variable name in the title bar of a chart window:


1 Open the Settings menu and select Advanced. The Advanced Graphics Options
dialog box will appear.
2 Select the Include Variable Name in Window Title check box.
3 Click OK.

Wrapping Date and Time on the X Axis


If you include a DateTime variable (type D) as a description variable to label the
X axis, and the values of that variable include a time element, you can tell the
Graphics Viewer to wrap the DateTime value onto two lines to make the X-axis
labels more legible and to fit more labels on the X-axis.

To wrap DateTime values used as X-axis labels:


1 Open the Settings menu and select Advanced. The Advanced Graphics Options
dialog box will appear.
2 Select the Wrap Date_Time X-axis Label check box. If you clear this check box,
date and time values will appear next to each other on the X axis.
3 Click OK.

X axis with unwrapped (left) and wrapped (right) DateTime labels

CHAPTER 6: Managing Charts with the Graphics Viewer • 229


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Including a Border on Printed Charts


To include a rectangular border around printed charts:
1 Open the Settings menu and select Advanced. The Advanced Graphics Options
dialog box will appear.
2 Select the Print Border check box.
3 Click OK.

The printed border will surround all charts, titles, and labels on the printed page. If
you are printing a double chart type (like an X-bar-and-Range chart), a single
border will surround both charts.

Printed charts with (left) and without (right) a border

Saving Charts and Reports


There are two basic ways to save charts and text reports created by the Graphics
Viewer:
As a Quality Analyst Graphics file (.NWG)
As bitmapped graphics files (.BMP, .JPG, etc.)

230 • CHAPTER 6: Managing Charts with the Graphics Viewer


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Graphics files contain all information about the chart or report needed to
regenerate the chart when you reopen the file with the Graphics Viewer. This
option lets you—or anyone else with Quality Analyst—regenerate the chart and
then manipulate it using the Graphics Viewer (for example, change colors or
fonts, arrange it in a Group Layout, add comments, and so on). 6
Bitmap files contain a static picture of the chart or report as it appears in the
Graphics Viewer when you save it (that is, the colors, fonts, and plotting
characters on your system will be represented). You can open these files with most
graphics- or photo-editing programs, or insert or embed them, for example, in
word-processing or slide-presentation files.

Note: You can save Graphics files from within the Graphics Viewer (as
explained below), but you will probably prefer to do so from within the
Editor, since the Editor’s procedure is more flexible. That procedure is
described under Saving Charts on page 183.

To save a chart or report to a Graphics file from within the Graphics Viewer:
1 Make the window containing the chart or report you want to save active.
2 Click the File Save button on the toolbar, or open the File menu and select
Save As. The standard Windows Save As dialog box will appear. The current
file name will be the temporary file name assigned by Quality Analyst.

6
The settings that control the cosmetic appearance of charts and reports in the Graphics Viewer
(colors, fonts, plotting characters, and so on) are not stored in the Graphics files. Thus, if you
save a Graphics file and give it to other Quality Analyst users, the chart or report will be
displayed with their cosmetic settings, not yours.

CHAPTER 6: Managing Charts with the Graphics Viewer • 231


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

3 In the Save as type list, select NWG Graphics Files (*.nwg).


4 In the File name box, enter a file name of your choice, and specify a new
destination folder, if necessary.
5 Click Save.

You can open a saved Graphics file later with the Graphics Viewer to redisplay
the chart or report. This is explained under Running the Graphics Viewer Alone
on page 188.

To save a chart or report to a bitmap file from within the Graphics Viewer:
Use the procedure above, but in the Save as type list, select one of the bitmap
file formats.

Note: You can specify the image quality (and degree of compression) of saved
JPEG files. See Specifying JPEG Quality on page 228 for instructions.

Dragging and Dropping


After you have saved one or more Graphics files, you can load several charts or
reports into the Graphics Viewer at once by dragging them from Explorer onto the
Graphics Viewer window. Follow these steps:

232 • CHAPTER 6: Managing Charts with the Graphics Viewer


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

1 Start the Graphics Viewer, if it isn’t running already, by running the program
NWAGraph.exe. (See Running the Graphics Viewer Alone on page 188.)
2 Start Windows Explorer.
3 Size and position the application windows so that some portion of the
Graphics Viewer is visible on the desktop.
4 In Explorer, display the file list of the Quality Analyst folder (directory), or
any other folder in which you have saved Graphics files.
5 Select any number of Graphics files in the list by clicking the first one, then
clicking additional file names while holding down the <CTRL> key.
6 Click-and-hold the mouse on any selected file, drag the mouse pointer over
any visible portion of the Graphics Viewer, and release the mouse button.
7 Tile or Cascade the windows in the Graphics Viewer. You will see an
individual chart window for each file you dropped onto the icon from
Explorer.

Copying Charts and Text Reports to Other


Programs
You can copy the contents of any Graphics Viewer window to other programs via
the Clipboard. The window can contain a chart, a text report, or a Group Layout.
To do this, click anywhere in the desired Graphics Viewer window with the Select
mouse cursor. Then do one of the following:
Press <CTRL+C>
OR
Open the Edit menu and select Copy
OR
Click the copy button (shown at left)
OR
Right-click the chart area, then select Copy from the pop-up menu.

CHAPTER 6: Managing Charts with the Graphics Viewer • 233


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

In the target application, pasting the graphic usually involves positioning the
cursor where the graph is to be pasted and then opening the Edit menu and
selecting Paste. Doing this in the WordPad program supplied with Windows
might look like this:

234 • CHAPTER 6: Managing Charts with the Graphics Viewer


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

CHAPTER 6: Managing Charts with the Graphics Viewer • 235


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

CHAPTER 7

Customizing Charts
With Quality Analyst, you can configure virtually all aspects of the way it
analyzes data and creates control charts. You configure Quality Analyst by
specifying settings, or parameters, at several levels of detail:
System Parameters (page 242) constitute “default” settings and apply unless
they are overridden by file, variable, or control chart parameters.
File Parameters (page 278) apply to all charts created from data in a single
file and remain in force unless overridden by variable or chart parameters.
Variable Parameters (page 283) apply to charts of individual variables
within individual files and remain in force unless overridden by chart
parameters.
Control Chart Parameters (page 295) apply to chart types and sometimes to
specific combinations of variables and chart types within a Data file.
Process Capability Parameters (page 318),
Box Plot Parameters (page 332), and
Pareto Parameters, (page 333)
are detailed chart parameters for specific types of charts.
Short Run Parameters (page 336) apply to the short run form of control
charts of data in a file.

236 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Getting to Configuration Parameters

To specify: From this menu: Then select this:


System Parameters Start-up screen Settings
File Parameters Parameters File
Variable Parameters Parameters Variable
Control Chart Parameters Parameters Control Chart
Process Capability Parameters Parameters Process Capability
(Histogram)
Box Plot Parameters Box Plot
Pareto Parameters Parameters Pareto
Short run Parameters Parameters Short Run
Note: If any of these menu items are disabled, see File Paths and Permissions on page 269 or contact
your system administrator.

Many of the parameters that you can specify are entered using “tabbed” dialog
boxes similar to this one:

CHAPTER 7: Customizing Charts • 237


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Each category of parameters is presented on its own “tab” that looks much like a
divider in a 3×5-card box. To select a category of parameters, click anywhere on
the tab for that category and it will appear “on top” of the other tabs.
To help you find your way around the configuration and customization parameters
and the tabbed dialog boxes, the following table shows the inputs that are entered
on each. For example, you specify Control Limit Adjustments on the tab labeled
Subgroup/Sample Size and Type on the Variable Parameters dialog box, which you
invoke by opening the Parameters menu and selecting Variable. Pertinent sections
of this table are reproduced at the beginning of the sections on each parameter
type.

238 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Table of Configuration Parameters

Parameter Type Tab Inputs

System General Title for Graphics and Reports


Date and Time Format
Decimal Symbol
Run File Error Handling
Report Date
Plotting Characters
Text Settings
Limits & Specifications Warning limits by chart type
Inner limits by chart type
Show specifications on chart
Show target on chart
Rainbow Zone configuration
Chart Parameters Method of calculating control limits
Method of calculating standard deviation
Basis for control chart limits
Control limit adjustment for subgroup size
Pattern Rules Zone rules
Run rules
Histogram Statistics Statistics to Display
Number of Histogram Footer Lines
Capability Parameters Standard Deviation Calculation Method
Capability Index Calculation Assumptions
Sigma Factor
Confidence Limits
Calculated Bar Location
File Paths and Permissions Temporary File path
Graphics and Text File Path
User Permissions
Missing & Tagged Data Tagged Data Mode

CHAPTER 7: Customizing Charts • 239


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Parameter Type Tab Inputs

Missing Data Mode


Missing Data Symbol
Box Plot & Capability Report Capability Report Statistics
Box Plot Statistics
Box Plot Type
Box Plot Units
External Database Database Options
Data Retrieval
Database Debugging
ODBC Settings
MS Jet Database Engine
Assignable Cause Categories
Corrective Action Assignable Causes
Corrective Actions
File <not tabbed> File Title
File Range
X-Axis Description Variables
Variable Data Ranges Analysis and Display Range
Control Limit Recalculation Range
Missing and Tagged Data Missing Data Handling
Tagged Data Handling
Subgroup/Sample Size and Type Subgroup Size and Type–Variable Data
Subgroup Size and Type–Attribute Data
Control Limit Adjustments
Graphics Comments
Description Variables
Other Process Parameters
Control Chart Scale Y-axis Scale
Center Line and Limits Control, Warning, and Inner Limits
Limit Regions
Default Chart Limits Warning limits display by chart type

240 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Parameter Type Tab Inputs

Inner limits display by chart type


Plotting Characters Mean and Individual Chart variations
Individual Measurements Chart variations
Custom Plotting Character selection
Cumulative Sum Type of CUSUM
V-mask Design
Set Process Parameters
CUSUM Protractor
Other Pattern Rules use
Show Rainbow Zones on charts
p-chart Units
u-chart Units
Show Target on charts
Show Specifications on charts
EWMA parameters
Process Capability Histogram Statistics Statistics to display
Number of Footer Lines
Histogram Parameters Histogram Bars
Calculated Bar Location
Additional Limits
Features Displayed
Probability Distribution
Histogram Scale X-axis Scale
Y-axis Scale
Process Capability Calculation Standard Deviation Calculation Method
Capability Index Calculation Assumptions
Confidence Limits
Capability Report <not tabbed> Default Variables
Default Breakdown
Box Plot <not tabbed> Default Variables
Default Breakdown

CHAPTER 7: Customizing Charts • 241


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Parameter Type Tab Inputs

Pareto <not tabbed> Pareto Format


File Range (for Pareto only)
Multiple Variable Pareto
Short Run <not tabbed> Short Run Variable
Identification Variable
Nominal Values
Variation Factors

System Parameters
This section describes the system-level settings that you can specify in Quality
Analyst. To specify system parameters, click Settings on the main Quality Analyst
start-up screen. This will open the tabbed Quality Analyst Settings dialog box. (If
the Settings button is disabled, see File Paths and Permissions on page 269 or
contact your system administrator.)

242 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

The following table shows the input items you can specify on each tab.

CHAPTER 7: Customizing Charts • 243


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Quality Analyst Settings Tabs and Inputs

Tab Inputs

General Title for Graphics and Reports


Date Format and Time Delimiter
Decimal symbol
Run file Error Handling
Report Date
Plotting Characters
Text Settings
Limits & Specifications Warning limits by chart type
Inner limits by chart type
Show specifications on chart
Show target on chart
Rainbow Zone configuration
Chart Parameters Method of calculating control limits
Method of calculating standard deviation
Basis for control chart limits
Control limit adjustment for subgroup size
Pattern Rules Zone rules
Run rules
Histogram Statistics Statistics to Display
Number of Histogram Footer Lines
Capability Parameters Standard Deviation Calculation Method
Capability Index Calculation Assumptions
Sigma Factor
Confidence Limits
Calculated Bar Location
File Paths and Permissions Temporary File path
Graphics and Text File Path
User Permissions
Missing & Tagged Data Tagged Data Mode

244 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Tab Inputs

Missing Data Mode


Missing Data Symbol
Box Plot & Capability Report Capability Report Statistics
Box Plot Statistics
Box Plot Type
Box Plot Units
External Database Database Options
Data Retrieval
Database Debugging
ODBC Settings
MS Jet Database Engine
Assignable Cause Categories
Corrective Action Assignable Causes
Corrective Actions

The buttons on the right side of the Settings window are available from all tabs.
Click OK to accept all current settings for the current Quality Analyst session.
If you have changed any settings and later try to quit Quality Analyst, you
will be prompted to save or abandon those changes.
Click Cancel to abandon any changes you have made on any tab since the last
time you clicked Save or OK.
Click Save to save any changes you have made on any tab to the Quality
Analyst configuration file, which is named QA.NWC and is stored (by
default, on Windows XP systems) in the “Documents and Settings\All
Users\Application Data\NWA” folder. QA.NWC is an XML-structured file
which you should not modify except with the Settings program.
Click Save As QA.NWA if you want to save all settings in a configuration file
that is compatible with versions of Quality Analyst earlier than 6.1.
Click Print to print the current settings. The Print Quality Analyst Settings
dialog box will appear. Choose to print the settings on the current tab only, or
on all tabs. Click Printer to select and configure your printer. Click OK to print
the settings.

CHAPTER 7: Customizing Charts • 245


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Click Reset to restore all settings on all tabs to their default, as-installed
values.

General
On the General tab of the Quality Analyst Settings dialog box, you specify several
miscellaneous configuration settings.

Title for Graphics and Reports


In the area labeled Title for Graphics and Reports, enter a title to print at the top of
all reports and charts. This report title will be printed above the file title. You can
enter any text for the title. You can also include the current file name, date, or time

246 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

by including any of the Replaceable Parameters described in the table below. If


you use Replaceable Parameters, be sure to enter them in all uppercase letters.

Replaceable Parameters for Report Titles

Parameter Description
$DATE Current date (not file date).†
Example: 9/23/03
$FILE Drive, path, and name of the file being printed, labeled “File:”
Example: File: C:\PROGRA~1\QA\HOUSING.DAT
$FILEBASE Name of the file being printed, without the drive or path, labeled “File:”
Example: File: HOUSING.DAT
$TIME Current time in 24-hour “military” format.†
Example: 17:35
† The date and time will be displayed according to the settings for Date Format and Time Delimiter
which you can configure elsewhere on the General tab.
Note: You can also use these Replaceable Parameters in File Title, described on page 278.

For example, if you enter the title:


Mt. Tabor Chemical Company ($DATE $TIME)
the title on the printed report will be (depending on how you format the date and
time):
Mt. Tabor Chemical Company (23-Sep-03 11:35)
If you enter the title:
$FILEBASE - $DATE - $TIME
the title on the printed report will be something like:
File: HOUSING.DAT - 9/23/03 - 11:35
Check the box labeled Ask for Additional Graphics and Report Comment if you
want to be prompted, each time you create a chart or text report, for an additional
title line to display above the chart or report. With this setting in effect, each time
you create a chart or report, the Comment dialog box will appear. In the edit box,
enter text that you want to appear as an additional (last) title line.

CHAPTER 7: Customizing Charts • 247


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Date Format
In the area labeled Date Format, you specify the format in which Quality Analyst
prints, displays, and recognizes date data. In the area labeled Style, select the style
for date data.

Quality Analyst Date Formats

Style Format Example


Standard Month/Day/Year 10/2/2002
European Day/Month/Year 2/10/2002
Military Day/Month/Year 2/Oct/2002

You can also specify the punctuation symbol used to separate the elements of the
date. Select a period (“.”), slash (“/”), or hyphen (“-”) from the Delimiter list.
In the Two-Digit Years area, enter a two-digit year to specify the 100-year period
that may be represented with two-digit years in Quality Analyst Data Sets. Dates
within the range shown may have two-digit years. Dates outside this range must
have four-digit years or they will be misinterpreted. For example, if you enter 95,
Quality Analyst will interpret the date 9/23/95 as 9/23/1995 and the date
9/23/94 as 9/23/2094. This setting has no effect on dates that have full four-digit
years.
It is important to specify the date format here before importing a Data file that
contains date data. If the date data in the imported file is formatted differently than
specified here, Quality Analyst may not interpret it correctly.

Run File Error Handling


In the area labeled Run file Error Handling, you can specify how Quality Analyst
will respond to errors encountered during the execution of a Run file.

248 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Select Require acknowledgment of Run file Errors if you want Quality Analyst
to pause and request acknowledgment from the user each time a Run file error
occurs.
Select Halt on any Run file Error if you want Quality Analyst to halt the Run
File Interpreter whenever a Run file error is encountered.
Select Continue from nested Run file Errors if you want to cancel the execution
of a nested Run file that produces an error but continue the execution of the
“parent” Run file.

Text Settings
In the area labeled Text Settings, you can specify whether Quality Analyst will
regard the case (upper or lower) of text significant in sorting, extracting, grouping,
and filtering data based on text fields. Check the box labeled Text comparisons are
case sensitive if, for example, you want Quality Analyst to treat “RED” and “Red”
and “red” as different. Clear the check box if you want Quality Analyst to treat
them as identical. By default, this check box is cleared.
For example, if this box is checked, attribute data labeled “Pitted” and “PITTED”
would be grouped into separate bars on a Pareto diagram—probably not your
intent. If this box is cleared, that data would be grouped into the same bar on the
Pareto diagram.
Select the Allow Double-Byte Character Set Text check box if you want Quality
Analyst to allow the use of double-byte characters, as may be required, for
example, to accommodate Asian languages.

Report Date
If your Report Title includes a date code ($DATE), you can override that date by
entering one in the area labeled Report Date.

Decimal Symbol
In the Decimal Symbol area, specify whether Quality Analyst should use a period
or a comma as the decimal point when displaying numbers on the screen and on
printed reports. (In Quality Analyst Data Sets, numbers are always stored with a
period for the decimal point.)

Time Delimiter
Quality Analyst prints, displays, and recognizes time data in a 24-hour “military”
format—hours past noon are numbered 13, 14, 15, and so on. In the area labeled

CHAPTER 7: Customizing Charts • 249


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Time Delimiter, you can specify the punctuation symbol used to separate the hours,
minutes, and seconds. Choose either a period (“.”) or a colon (“:”).

Plotting Characters
In the area labeled Plotting Characters, specify whether Quality Analyst should
display characters for each type of data point on your charts.
Select the check boxes to enable the display of plotting characters for In-control,
Out-of-control, and Rule violation data points. Quality Analyst will always display
data lines, but if you clear any of these check boxes, the plotting character for the
corresponding data points will not appear on the chart lines.
These settings become “global” defaults, but you can override them for specific
variables in your Data Sets, as explained under Plotting Characters on page 309.

Note: To configure the actual plotting characters and colors that Quality
Analyst will use for enabled data points, see Specifying Colors and Line
Thicknesses on page 220 and Specifying Plotting Characters on
page 226.

Limits and Specifications


On the Limits & Specifications tab of the Quality Analyst Settings dialog box, you
specify whether warning limits and inner limits will be displayed on each of three
groups of charts, and you configure “rainbow zones” for different chart types.

250 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Limits and Specifications


The display of warning and inner limits is specified separately for charts of
process average (X-bar, Individuals, Median, and EWMA charts), charts of
process variation (Range and Standard Deviation charts), and attribute charts (p,
np, c, and u charts). The charts of process average and process variation are
grouped separately because a single chart from one group can be paired with a
single chart from the other to produce a chart pair in which one is displayed above
the other. Quality Analyst lets you specify limits for these individual charts
separately.

You have two options for displaying warning or inner limits or both in your
charts:
Select Yes to display them.
Select No to not display them.

In the Show Target on area of the Limits & Specifications tab, you can specify
whether you want Quality Analyst to display the target value for measurement
variables on control charts. To display the target values on each pair of chart types
shown, check the adjacent box.

CHAPTER 7: Customizing Charts • 251


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

In the Show Specifications on area of the Limits & Specifications tab, you can
specify whether you want Quality Analyst to display the upper and lower
specifications for measurement variables on control charts. To display the
specifications on each pair of chart types shown, check the adjacent box.
Specification limits and target values for measurement variables are specified
when you define or modify the structure of your Data file as described under
Lower, Upper, and Target Specifications on page 46.

Rainbow Zones
Quality Analyst lets you display and configure “rainbow zones” for your charts—
different colored areas at varying distances from the center line to the limits.

X-bar chart with “rainbow zones”

In the area labeled Show Rainbow Zone on, select the corresponding check boxes
to enable the display of rainbow zones on X-bar, I, Median, and EWMA Charts;
Range and Standard Deviation Charts, or P, NP, C, and U Charts. Clear the check
boxes to suppress the display of rainbow zones.

252 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

If you enable rainbow zones for X-bar, I, Median, and EWMA Charts; select either of
the two secondary check boxes if you want to Base I and Median Zones on
Specifications or Base X-bar and EWMA Zones on Specifications (instead of on
control limits). (You can override these settings for individual variables in a Data
Set, as explained under Show Rainbow Zones on Charts on page 317.)
In the area labeled Rainbow Chart Zones, you enable the individual rainbow zones
and specify the size of each. You can specify up to three zones. The inner (or
“green”) zone starts at the center line and extends up and down away from it. The
middle (or “yellow”) zone extends up and down from the upper and lower edges
of the inner zone, and the outer (or “red”) zone extends up and down from the
upper and lower edges of the middle zone.
To enable any of the three rainbow zones, select the corresponding check box. In
the edit box for each zone (labeled % distance to Limit), enter the distance from the
starting edge of the zone to the outer edge of that zone as a percent of the distance
to the control limit. 7

Notes: The “green,” “yellow,” and “red” labels for these zones are common
colors for rainbow zones, but you can choose any color for any zone, as
explained under Configuring the Appearance of Control Charts on
page 223.
Also, even if you enable one or more rainbow zones here, you can
suppress their display in the Graphics Viewer, as explained in the same
section.

Chart Parameters
On the Chart Parameters tab of the Quality Analyst Settings dialog box, you can
configure several aspects of the way Quality Analyst analyzes data for producing
control charts.

7
If you choose to base the zones for X bar, I, Median, or EWMA charts on specifications
instead of control limits (in the Show Rainbow Zones on area above), you should interpret
“% distance to Limit” as “% distance to Specification” in this area.

CHAPTER 7: Customizing Charts • 253


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Calculation Methods for Charts


Quality Analyst can calculate control limits for X-bar, Individual, Median, and
Cusum charts in one of two ways. It can base the calculation on individual
measurements or it can base the calculation either on a companion Range or
Standard-Deviation chart (if selected), or on the average standard deviation (if
only one chart is being produced).
To base the calculation on individual measurements, select Individual
Measurements on the Chart Parameters tab in the area labeled Calculate Control
Limits for X-bar, I, Cusum, and Median charts using. To base the calculation on a
companion chart or average standard deviation, select Companion chart or average
standard deviation.
Usually, control limits are based on the companion chart (if present) or on the
average standard deviation; Quality Analyst is initially configured this way. For
laboratory quality control using the EPA method, you should select Individual
measurements.
Normally, the calculation of standard deviation (in the REDUCE function and for
variable control charts) is based on the degrees of freedom in the sample (N–1).
This is reflected in the default setting (Sample, 'N-1') in the Calculate Standard
Deviation using area of the Chart Parameters tab. To base the calculation of

254 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

standard deviation on the degrees of freedom in the population, select


Population, 'N' instead.

Basis of Control Limit Calculations


In typical SPC applications, control limits are set at ±3.0 sigma from the mean and
warning limits are set at ±2.0 sigma from the mean. In Quality Analyst, control
limits can also be set at probability levels. The following table shows the
probability levels used by Quality Analyst. These are widely used in the United
Kingdom.

Quality Analyst Control Limit Probability Levels

Lower Upper
Control Limit 0.999 0.001
Warning Limit 0.975 0.025

To base control limit calculations on probability levels, select Probability Levels


under Base Control Chart Limits on on the Chart Parameters tab.
For X-bar, Individual measurement, and Median control charts, these probability
levels are equivalent to setting control limits at ±3.09 sigma from the mean and
warning limits at ±1.96 sigma from the mean. For the other Shewhart charts
(range, standard deviation, p, np, u, and c), probability limits are not centered
about the mean so the equivalent sigma factors are different for upper and lower
limits. Since attribute charts (p, np, u, and c) are based on discrete distributions,
control limits for these charts are also discrete.
To base control-limit calculations on sigma factors, select Sigma Factors under
Base Control Chart Limits on on the Chart Parameters tab. Then, under Sigma
Factors for, enter the sigma factors you want to use for Control Limits, Warning
Limits, and Inner Limits.

Control Limit Adjustment for Subgroup Size


In the area labeled Control Limit Adjustment for Subgroup Size, specify whether
you want Quality Analyst to adjust control limits for varying subgroup size. Note
that even if you choose not to adjust control limits for subgroup size, the limits for
any limit region set to “recalculate” (as explained under Center Line and Limits
beginning on page 298) will always be adjusted, regardless of this setting.

CHAPTER 7: Customizing Charts • 255


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Pattern Rules
Overview
Quality Analyst can apply “pattern rules” to data and highlight violations of those
rules on control charts. Several sets of pattern rules are built into Quality Analyst.
You can use these pattern rules “as is,” modify them to suit your needs, delete
rules you will never need, or even define new pattern rules. You can also tell
Quality Analyst not to apply any pattern rules. Pattern Rules are defined and
specified on the Pattern Rules tab of the Quality Analyst Settings dialog box.

Quality Analyst can apply two types of pattern rules—zone rules and run rules. To
enable the application of pattern rules, check the box labeled Use Pattern Rules.

Zone Rules
Zone rules signal an out-of-control point when N subgroups in a row are inside (or
outside) a zone defined relative to the center line and control limits of the chart.
The size of a single zone is one-third the distance between the center line and the
upper or lower control limit. The boundaries of successive zones lie at multiples of
that distance from the center line. Thus, when 3-sigma control limits are used, the
zone boundaries occur at multiples of one sigma.

256 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Quality Analyst can apply more than one pattern rule at a time. You can define up
to 20 zone rules, but you need not use all of them. The table below lists the 12
zone rules that are predefined in Quality Analyst.

Predefined Zone Rules

Pattern Rule Description


2 of 3 above ⅔ of UCL (•) 2 out of 3 subgroups are more than ⅔ of the way from
the center line to the upper control limit
2 of 3 below ⅔ of LCL (•) 2 out of 3 subgroups are more than ⅔ of the way from
the center line to the lower control limit
4 of 5 above ⅓ of UCL (•) 4 out of 5 subgroups are more than ⅓ of the way from
the center line to the upper control limit
4 of 5 below ⅓ of LCL (•) 4 out of 5 subgroups are more than ⅓ of the way from
the center line to the lower control limit
8 above CL (•) 8 subgroups in a row are above the center line
8 below CL (•) 8 subgroups in a row are below the center line
7 above CL 7 subgroups in a row are above the center line
7 below CL 7 subgroups in a row are below the center line
9 above CL 9 subgroups in a row are above the center line
9 below CL 9 subgroups in a row are below the center line
15 within ⅓ of CL 15 subgroups in a row are less than ⅓ of the way from
the center line to the upper or lower control limit
8 outside ⅓ of CL 8 subgroups in a row are more than ⅓ of the way from
the center line to the upper or lower control limit
(•) Western Electric rules for testing for instability.

Run Rules
Run rules signal an out-of-control point when a certain number of subgroups in a
row are increasing, decreasing, or alternating. You can define up to ten run rules
in Quality Analyst, but you may apply only three at a time—one each for
increasing, decreasing, or alternating subgroups. If you select more than one of
each type of run rule, only the shortest will be used. For example, if you select
both a “six subgroups increasing” rule and a “seven subgroups increasing” rule,
only the “six subgroups increasing” rule will be applied. The following table lists
the seven run rules that are predefined in Quality Analyst.

CHAPTER 7: Customizing Charts • 257


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Predefined Run Rules

6 increasing 8 increasing
6 decreasing 8 decreasing
7 increasing 14 alternating
7 decreasing

Pattern rules are only useful when applied to subgroups that are statistically
independent from on another. Control charts of subgroups that are inherently
correlated—such as moving-average (or range), CUSUM, and EWMA charts—
cannot use the pattern rules.
Caution: Be careful not to use too many rules at once. As the number of rules
increases, so does the number of false out-of-control signals. For example, on an
X-bar chart with upper and lower control limits set at 3.0 sigma, an in-control
process will have about three false out-of-control signals every 1,000 subgroups.
If the Western Electric Rules are also used, the in-control process will have about
eleven false out-of-control signals every 1,000 subgroups. Adding more rules will
further increase the probability of false out-of-control signals.

Specifying Pattern Rules


To apply pattern rules, check the box labeled Use Pattern Rules in the middle of
the Pattern Rules tab on the left. If you do not want to apply pattern rules, clear the
box.
If you chose to apply pattern rules, you must specify which pattern rules to apply.
The Pattern Rules tab is divided into an upper half and a lower half. The upper
half lists the pattern rules that are available for you to use; zone rules and run rules
are listed separately. The lower half lists the rules that will be applied. To specify
pattern rules to apply, you simply copy rules from the upper lists to the lower lists.

To apply a zone rule:


Select the rule in the list labeled Zone Rules Available. (Use the scroll bar to
the right of the list to find the rule, if necessary.)
Click the Select button below the list.

Or you can double-click the rule in the list. The name of the rule will appear in the
list labeled Zone Rules Used.

258 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

You can add several rules to the Zone Rules Used list by selecting several rules
before clicking Select. There are two ways to do this:
To select a set of adjacent rules in a list, click the first rule, then click the last
rule you want while holding down the <SHIFT> key. The first, last, and all
intervening rules will be selected.
To select several nonadjacent rules, click each one in turn while holding
down the <CTRL> key.

After you have selected all the zone rules you want to apply, click Select.
As a convenience, Quality Analyst lets you add all the Western Electric zone rules
at once. These rules are designated with an asterisk (“*”) in the on-screen list of
zone rules and with a bullet (“•”) in the table above. To add all Western Electric
rules to the list of Zone Rules Used, click the * Western Electric button. These rules
will be added to any rules already in the Zone Rules Used list.
To select run rules, copy rules from the Run Rules Available list to the Run Rules
Used list using the same techniques you used to apply zone rules.

Defining New Pattern Rules


In Quality Analyst, you can also define your own pattern rules to supplement or
replace those provided with the program.

Defining Zone Rules


To define a new zone rule, first go to the list of Zone Rules Available and select the
rule above which you want to insert the new rule. To insert the new rule at the end
of the list, select the blank line below the last rule in the list. (Scroll the list down,
if necessary, to display the blank line.) (Notice that you may not insert a new rule
into the group of Western Electric rules.) Then click the New button below the list.
An empty Zone Rule Definition dialog box will appear.

CHAPTER 7: Customizing Charts • 259


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To define a zone rule, you:


Give it a name,
Specify the set of subgroups to test for violation,
Specify the zone boundary relative to the center line, and
Specify where, relative to the zone boundary, violations occur.

In the box labeled Rule Description, enter the text that you want to appear on the
list of Zone Rules Available to identify this rule.
In the area labeled Trigger Zone Rule, specify the set of subgroups to test for
violation of the rule. For example, if you want to trigger a rule violation when
any 3 subgroups in a series of 4 meet the criteria defined in the rest of the dialog
box, enter 3 in the box labeled On: subgroups violating zone and 4 in the box
labeled of: total subgroups considered. If you want to trigger a rule violation
when an entire series of 7 subgroups meet the criteria defined in the rest of the
dialog box, enter 7 in both boxes.
In the area labeled Zone Limits, specify the zone boundary (or boundaries) relative
to the center line. You can specify an upper zone boundary, a lower zone
boundary, or both. To specify an upper zone boundary, check the box labeled
Upper Limit. When this is checked, the adjacent edit box labeled Sigma above
Center Line becomes active. In this box, enter a multiple of sigma to specify the
location of the zone boundary. Specify a lower zone boundary in the same way—
by checking the box labeled Lower Limit and entering a multiple of Sigma below
Center Line in the adjacent edit box.
To place a zone boundary, either upper or lower, above the center line, enter a
value greater than zero for sigma. To place a zone boundary below the center line,
enter a value less than zero for sigma.
Finally, in the area labeled Violation if Subgroups, specify whether violations
should occur inside the zone or outside the zone by selecting Inside Zone or
Outside Zone. If you have specified both an upper and a lower zone boundary,
“inside” and “outside” should be self-explanatory—“inside” means between the
two boundaries. If you specify a single boundary, however, the meanings of
“inside” and outside” are less obvious and are different for upper and lower limits.
The following table lists the effect of Inside Zone and Outside Zone when used
with a single zone limit.

Effect of “Inside Zone” and “Outside Zone” with a Single Zone Limit

If you specify only an: And select: Violations will occur:


Upper Limit Inside Zone Below the boundary

260 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Upper Limit Outside Zone Above the boundary


Lower Limit Inside Zone Above the boundary
Lower Limit Outside Zone Below the boundary

To complete the definition of the new zone rule, click the OK button.

Tip: For examples of how to define zone rule patterns, select an existing zone
rule and click the Change button (discussed in the next section) and look
at the settings for that rule.

Defining Run Rules


To define a new run rule, first go to the list of Run Rules Available and select the
rule above which you want to insert the new rule. To insert the new rule at the end
of the list, select the blank line below the last rule in the list. (Scroll the list down,
if necessary, to display the blank line.) Then click the New button below the list.
An empty Run Rule Definition dialog box will appear.

To define a run rule, you:


Give it a name,
Specify the set of subgroups to test for violation, and
Specify the pattern that indicates a rule violation.

In the box labeled Rule Description, enter the text that you want to appear on the
list of Run Rules Available to identify this rule.
In the area labeled Trigger Run Rule, specify the number of consecutive subgroups
to test for violation of the rule. For example, if you want to trigger a rule violation
when 7 consecutive subgroups follow a pattern, enter 7 in the box labeled On:
subgroups in a pattern.

CHAPTER 7: Customizing Charts • 261


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

In the area labeled Run Rule Pattern, select the pattern you want to define as a
violation:
Select Increasing if you want to flag cases where the plotted value of each
subgroup in the series is greater than the value of the previous subgroup.
Select Decreasing if you want to flag cases where the plotted value of each
subgroup in the series is less than the value of the previous subgroup.
Select Alternating if you want to flag cases where the difference between the
value of each successive subgroup in the series and the preceding subgroup is
alternately greater than zero and less than zero—that is, cases where the plot
has a sawtooth shape.

To complete the definition of the new run rule, click the OK button.

Changing Pattern Rules


You can also change the definition of an existing pattern rule (except for the
Western Electric zone rules). To change a rule definition, select the rule in the list
of Zone Rules Available or Run Rules Available, and click the corresponding
Change button below the list. The appropriate rule definition dialog box—zone or
rule—will appear, just as it did when you clicked the New button (described in the
previous section). With the Change button, however, the dialog box will be filled
with the settings that define the selected rule. Simply change the settings as
desired and click OK.
Remember to change the Description of a pattern rule when you change its other
specifications. Quality Analyst does not “compute” a new description from the
other settings.

Deleting Pattern Rules


If you no longer need or want one of the pattern rules, you can delete it from the
list. To delete a pattern rule—either a zone rule or a run rule—select its name in
the list and click the Delete button. (Quality Analyst will not let you delete a
Western Electric zone rule.)

Histogram Statistics
When you create a Process Capability Histogram using Quality Analyst, you can
select statistics to be computed from your data and displayed on “footer” lines
beneath the histogram in three columns—left, middle, and right. On the Histogram
Statistics tab of the Quality Analyst Settings dialog box, you can specify a set of
default statistics.

262 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

These will be displayed unless you override them on the Histogram Statistics tab
of the Process Capability dialog box, as described on page 320. When you
installed Quality Analyst, a starting set of default statistics were selected.

Default Process Capability statistics.

Left: Center: Right:


Number of Samples Cpk 3 sp Limits
Mean Cp Target
Standard Deviation Cpm Specification Limits
Skewness Est. % outside Specs

Number of Footer Lines


At the top of the Histogram Statistics tab, specify the Maximum Number of Footer
Lines to Display by typing a value in the box adjacent to that label. This is the
maximum number of lines that will be displayed on the chart, even if more lines of
statistics appear in the Selected lists at the bottom of the tab.

CHAPTER 7: Customizing Charts • 263


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Selecting Statistics
The three main areas of this tab allow you to select the statistics you want to
display in each of the three columns of footer lines below the histogram. In each
area, the upper list, labeled Available, lists all available statistics that can be
displayed in that column.

Available Statistics for Display on Process Capability Histograms

Left: Middle: Right:


Number of Samples Cpm Cpk aiag Capability Limits
Mean Cpk Cp aiag Target
Standard Deviation k Ppk Specification Limits
Skewness Cp Pp Est % Outside Limits
Kurtosis CR% Cpk > CL% Actual % Outside Limits
Geary’s CPL Cp > CL% Minimum, Maximum
Target CPU Cpm > CL% Skewness
Zmin Cpka > CL% Kurtosis
Zusl Pp > CL% Geary’s
Zlsl Ppk > CL% Geary’s Significance

264 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

The lower list, labeled Selected, lists the names of the current default statistics for
each column. You specify statistics to display by copying items from the Available
lists into the Selected lists.

Note: Some statistics are based on the specification limits and process target. If
you select those statistics (or specifications) and display a capability
histogram of data for which you have not specified specifications, those
statistics (or specifications) will not appear below the histogram.

Adding Statistics
To add a statistic to a footer line:
1 Select the statistic in one of the lists of Available statistics by clicking its
name. (Use the scroll bar to the right of the list to find the statistic, if
necessary.)
2 Click the Select button beneath that list of statistics.

Or you can double-click the name of the statistic. The name of the statistic will
appear in the corresponding Selected list.
You can add several statistics to the footer line at once by selecting several before
clicking Select. There are two ways to do this:
To select a set of adjacent statistics in a list, click the first statistic, then click
the last statistic while holding down the <SHIFT> key. The first, last, and all
intervening statistics will be selected.
To select multiple statistics from anywhere in one or more of the three lists,
click each one in turn while holding down the <CTRL> key.

If you select statistics from more than one list (left, middle, or right), be sure to
click Select for each list in which you have selected statistics.

Inserting Statistics
Normally, Quality Analyst adds selected statistics to the end of the Selected lists.
You can control the order of the statistics in the list of footer lines by inserting
statistics into a particular position in the list. For example, follow these steps if
you have already selected three statistics to display, and you want to insert a
fourth between the first and second.

CHAPTER 7: Customizing Charts • 265


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

In the Selected list, click the second statistic to select it.


In the corresponding (left, middle, or right) list of Available statistics, select
the statistic you want to insert.
Click the Select button for that list.

Quality Analyst inserts the new statistic above the selected statistic in the Selected
list. To enable you to add a statistic to the end of the list, Quality Analyst places a
blank row below the last statistic in the list. To add a statistic to the end of the list,
select this blank row before adding the statistic.

Removing Statistics
To remove a statistic from the Selected list, select it then click the Remove button
below the list. You can remove several statistics from the list at once by selecting
several, as described above, before clicking the corresponding Remove button(s).

Capability Parameters
On the Capability Parameters tab of the Quality Analyst Settings dialog box, you
specify several parameters affecting the calculation of process capability and the
appearance of the process-capability histogram.

266 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Standard Deviation Calculation Method


In the area labeled Standard Deviation Calculation Method, specify how you want
Quality Analyst to compute standard deviation by default. The method you specify
will be used unless you override it on the Process Capability Calculation tab of the
Process Capability dialog box, as discussed on page 329.
Specify whether to calculate standard deviation from Individual Measurements,
Average Subgroup Range, or Average Subgroup Standard Deviation. If you specify
Individual Measurements, specify whether you want to base these calculations on
Sample (N−1) or Population (N) statistics.

Capability Index Calculation Assumptions


In the area labeled Capability Index Calculation Assumptions, you specify four
assumptions for capability index calculations:
Ideal Centerpoint
Assumed Distribution
Distribution Midpoint
Folded/Truncated Distribution

For Ideal Centerpoint, specify whether to base the Cpk, k, and Cpm indices on the
process Target or the midpoint between the specifications (Specification Midpoint).
If the Cpk, k, and Cpm indices are based on the midpoint between the upper and
lower specification limits, the capability indices are penalized for shifting away
from the midpoint. The target is not considered in the calculations. If the indices
are based on the target, the indices are penalized when they stray from the target.
If the target is set at the specification midpoint, the results of these two options are
identical.
For Assumed Distribution, specify whether the indices should be based on the
Normal distribution or the Current (possibly non-normal) distribution. If the
indices are based on the normal distribution, sigma limits are placed equidistant
from the mean (or median) of the data, even if the probability distribution is not
symmetrical. When the indices are based on the current probability distribution,
the sigma factors are set at the same probability level on the current distribution
that the sigma factor would use in the normal distribution.
For example, sigma limits of 3 on the normal distribution occur at the 0.00135 and
0.99865 probability levels. So, to use sigma limits of 3 with a non-normal
distribution, the limits are set at the 0.00135 and 0.99865 probability levels of the
non-normal distribution.

CHAPTER 7: Customizing Charts • 267


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Which combination of these setting you use depends on the situation. Indices
based on the current probability distribution reflect the risk of actually producing
outside the specifications. Indices based on the normal distribution are more
common in process-control literature. Indices using the process target treat the
target as the desired process average and penalize for any deviation from it. Using
the process midpoint is probably more common.
For Distribution Midpoint, specify whether the distribution should be based on the
Mean or Median value of the data.
For Folded/Truncated Distribution, specify whether Quality Analyst should display
the entire Parent distribution or just the Child portion of the distribution.

Sigma Factor
The sigma factor is used to display the upper and lower process-capability sigma
(standard deviation) limits as vertical lines on a process capability chart. A sigma
factor of ±3 is common and makes a good default to enter here. This corresponds
to a natural tolerance of 6 standard deviations.
A sigma factor of 4 is often appropriate when only limited data (less than 30
measurements) or data from a short time period is available. The sigma factor you
enter here is interpreted as a “plus or minus.” Therefore, a sigma of 4 yields a
tolerance of 8 standard deviations.

Confidence Limits
In the area labeled Confidence Limits, specify the confidence limits, in percent, to
use for process-capability calculations. This value will apply unless you override it
on the Process Capability Calculation tab of the Process Capability dialog box, as
explained on page 330.

Calculated Bar Location


In the area labeled Calculated Bar Location, specify how you want Quality Analyst
to align histogram bars along the X axis.
Select Center Bars to center each bar on a round number on the X axis.
Select Start Bars to align the left edge of each bar with a round number on the
X axis.

This setting will apply unless you override it on the Histogram Parameter tab of the
Process Capability dialog box as explained on page 325.

268 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

File Paths and Permissions


On the File Paths and Permissions tab of the Quality Analyst Settings dialog box,
specify where Quality Analyst should store temporary and Graphics files, and how
it should handle user permissions.

In the area labeled Temporary File Path, specify the path where you want to store
temporary files that are used “behind the scenes” by Quality Analyst. If you leave
this box blank, these files are stored in the same location as your Data files. You
may be able to improve the performance of Quality Analyst by specifying a
location on your network server or workstation that has a quicker response than
the disk where you keep your Data files. (Conflicts may arise if you are using the
single-user version of Quality Analyst and you specify a folder on your network
that is used for the same purpose by another single-user Quality Analyst
installation. Multiple users of the LAN version of Quality Analyst, however, may
safely specify the same network folder.)
In the area labeled Graphics and Text (*.NWG) File Path, specify the path where you
want Quality Analyst to store Graphics files as it creates and displays them. If you
leave this box blank, these files are stored in the same location as your Data files.
Quality Analyst will store temporary files in the location you specify unless you
rename and save them to a different location as described under Saving Charts on
page 183.

CHAPTER 7: Customizing Charts • 269


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To specify a path:
Select the upper check box and leave the path blank to store files in the same
folder as your Data files.
Select the upper check box and enter a path to an existing folder to store files
there.
Select Use System Temporary File Path to use the folder specified by the
environment variable TEMP (in Windows XP) or the TEMP= statement in
your AUTOEXEC.BAT file (in earlier versions of Windows). The name of
that folder is shown in the adjacent gray box.

In the User Permissions area, specify what Quality Analyst should allow users to
do under certain circumstances. The first three settings here specify how Quality
Analyst should behave when a user accesses files (Data files, Header files, and
other configuration files) that are read-only. These three settings have an effect
only when read-only files are encountered.
When Quality Analyst encounters a read-only file while these three check boxes
are clear, it will display a warning message but will let users open and work with
the file. Users can make any allowed changes temporarily (to produce charts and
reports or to perform other tasks), but those changes will not be saved.
When Quality Analyst encounters a read-only file while these three check boxes
are selected, users will not be able to make any such changes.
Select the Prevent Settings Modification check box to disable the Settings
button on the main Quality Analyst start-up screen if QA.NWC (where these
settings are stored) is read-only.
Select the Prevent Data Modification check box to disable any program actions
that would let a user add, delete, or change data if the Data file of the Data Set
is read-only.
Select the Prevent Parameter Modification check box to disable any program
actions that would let a user change any file-specific configuration parameters
such as File Parameters or Variable Parameters if the Header file of the Data
Set is read-only.

Finally, select the Disable File Utilities check box to disable Quality Analyst’s file
utilities (on the File menu). (This setting applies regardless of the read-only status
of any file.)

Note: The User Permissions settings will not take effect until you exit and
restart Quality Analyst.

270 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Missing and Tagged Data


To specify how Quality Analyst treats missing and tagged data, select the Missing
& Tagged Data tab of the Quality Analyst Settings dialog box.

Tagged Data Mode


Quality Analyst lets you “tag” data for “special” treatment. In the Tagged Data
Mode area of the Missing & Tagged Data dialog box, specify how you want Quality
Analyst to treat tagged data. You have two choices:
Select Treat Tagged Data as Missing if you want Quality Analyst to treat
tagged data according to the current settings for handling missing data.
Select Use Tagged Data to treat tagged data normally—as if it were not
tagged.

You can override this global setting for each variable in a Data file, as explained
under Tagged Data Handling on page 287. How to tag data is explained under
Tagging Data on page 81.

CHAPTER 7: Customizing Charts • 271


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Missing Data Mode


Normally a Quality Analyst Data file is completely filled with data. That is, each
line of the Data file has the same number of entries and each entry represents a
measurement or description of some type. However, data may sometimes be
incomplete, with some entries “missing.” Since Quality Analyst Data files must
contain the same number of entries on each line, the missing entries are
represented by a missing-data symbol.
Specify how Quality Analyst should treat missing data in the Missing Data Mode
area of the Missing & Tagged Data dialog box. The missing-data modes and their
effect on analysis and charting are described in detail in the section titled Missing
Data Handling beginning on page 24 and in APPENDIX A starting on page 600.

Missing Data Symbol


In the area labeled Missing Data Symbol, enter the character or text string you want
Quality Analyst to use to represent (or recognize as) missing data. By default, this
is an asterisk (“*”). The missing data symbol may be any text string that does not
contain spaces or commas. For example, “-999999” and “MISSING” and
“NO_DATA” and “<NA>” are acceptable missing-data symbols but “NO DATA” is
not (it contains a space).
It is important to specify a correct missing data symbol here before importing a
Data file from another application that contains missing data. If the missing data in
the imported file is represented with a different character or string than is specified
here, Quality Analyst may not interpret it correctly.

Box Plot and Capability Report


On the Box Plot & Capability Report tab of the Quality Analyst Settings dialog box,
specify default statistics to display on box plots and capability reports as well as
other box plot parameters.

272 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Capability Report Statistics


In the area labeled Capability Report Statistics, select a default set of statistics to
appear on Capability Reports and the layout codes Quality Analyst should use to
format the reports. These statistics and layout codes will be used unless you
override them when creating a Capability Report, as explained in the section
Process Capability Report on page 137.
The Available list, lists all the statistics available for capability reports. Only the
statistics and codes in the Selected list on the right will be used on the report. To
select other statistics and codes, highlight them in the Available list and click
Select, or double-click them in the Available list.
To place a new item in a specific place in the Selected list, first highlight the
existing item in the Selected list above which you want to insert a new item from
the Available list. Then select the new item. It will be inserted into a new row; no
items will be overwritten.
To remove an item from the Selected list, highlight the item and click Remove.
In general, variables will be listed down the report page in rows and statistics will
be listed across the page in columns. The <Page Break> code lets you control how
many columns appear on the report. Any statistic just above a <Page Break> code
in the Selected list will be the last column in the report in any given row. Because

CHAPTER 7: Customizing Charts • 273


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

the display widths of the statistics and other display parameters vary, you may
want to experiment before finalizing the layout of a report.

Box Plot Statistics


In the area labeled Box Plot Statistics, select a default set of statistics to appear on
the right side of box plots. These statistics will be used unless you override them
when creating a Box Plot, as explained in the section Box Plots on page 179.
Select Box Plot statistics the same way you select Capability Report statistics, as
explained above. (Since a box plot is not a text report, the page-break code does
not appear on the Available list for Box Plot Statistics.)

Box Plot Type


In the area labeled Box Plot Type, select the default box plot type. This plot type
will be used unless you override it when creating a box plot, as explained under
Box Type on page 182.
Select Box & Whiskers to create a plot in which the two middle quartiles of data
are displayed as boxes adjacent to the median value, and “whiskers” extend out to
encompass the upper and lower quartiles. Outliers are displayed beyond the
whiskers as asterisks. Select Mean and +/- 3 Std Dev to create a plot in which three
standard deviations of data above and below the mean are displayed as boxes
adjacent to the mean value. Select Process Capability to create a plot that
distributes your data according to the current process capability limits. The
configuration of those limits is described under Process Capability (Histogram)
Parameters on page 318.

Box Plot Units


In the box labeled Box Plot Units, select the default units for box plots. These units
will be used unless you override them when creating a box plot as explained under
Units on page 182.
Select Standardized by Specifications to scale and label the X axis of the box plot
with the specification limits for the variables you are plotting. Select Measurement
Units to scale and label the X axis with the actual values of the measurement units
for the variables you are plotting. If you select this option, check Show
Specifications if you want to display the specifications for the variables as vertical
lines on the plot.

274 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

External Database
On the External Database tab of the Quality Analyst Settings dialog box, specify
database connectivity settings. Refer to Configuring Connectivity on page 587 for
explanations of these settings.

Assignable Cause Corrective Action


On the Assignable Cause Corrective Action tab of the Quality Analyst Settings
dialog box, configure lists of causes and corrective actions that you can assign to
individual charted data points.

Overview of Assignable Causes and Corrective


Actions
When your SPC charts contain any data points that violate any rules or
specifications, you may want to assign a description of the cause to the violating
data point. And when the data comes back under control, you may want to assign
a description of the corrective action that was taken to effect the improvement.

CHAPTER 7: Customizing Charts • 275


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

In Quality Analyst, setting up and using a system of assignable causes and


corrective actions (ACCAs) is a three-part process:
1 Create “global” lists of ACCAs that can be used with the data variables you
intend to flag.
See the next section for instructions.
2 When you configure a Data Set, assign a list of ACCAs to each variable you
will want to flag.
See Specifying Lists of Assignable Causes and Corrective Actions on
page 59 for instructions.
3 While viewing an SPC chart in the Graphics Viewer, assign the causes or
corrective actions to the individual data points.
See Assigning Causes and Corrective Actions to Data Points on page 217
for instructions.
You can specify the plotting character Quality Analyst will use to indicate, on the
chart, which points have an assignable cause or corrective action. See Specifying
Plotting Characters on page 226.
You can also configure and generate reports and charts of assignable causes and
corrective actions. See Analyzing Assignable Causes and Corrective Actions on
page 148 for instructions.

Defining Lists of Assignable Causes and Corrective


Actions
Because the causes of violations and their corrective actions are closely related,
you define your ACCAs as pairs of lists of items: one list for causes and one list
for corrective actions. You give each pair of lists a name, or “category,” that you
will use later to assign the list to a variable in a Data Set. 8
The Categories list contains all currently defined categories of ACCAs.

To work with an existing Category:


Select the Category from the list.

8
Though you create “matching” lists of causes and actions in each category, we do not force
you to associate causes and actions from the same category with the variables in your Data Set
(as explained under Specifying Lists of Assignable Causes and Corrective Actions on
page 59). This gives you flexibility in configuring lists that meet your specific needs.

276 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To create a new Category:


1 Click the upper Add button. The New Assignable Cause and Corrective Action
Category dialog box will appear.

2 Enter a category name in the upper box.


3 If you want to use an existing category as a starting point for this category,
select the existing category from the list labeled Copy Items From Category.
4 Click OK.

If you are working with an existing category, or if you copied an existing category
as a starting point for a new category, the current causes and actions will appear in
the Assignable Causes and Corrective Actions lists. If you are working with a new
category, the lists will be empty.

To add an item (cause or action) to either list:


1 Enter a description of the item in the box below the list.
2 Click the adjacent Add button.

To remove an existing item from either list:


1 Click the item in the list to select it.
2 Click the adjacent Remove button.

CHAPTER 7: Customizing Charts • 277


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

File Parameters
File parameters apply to all charts created from the current (open) Data file unless
overridden by variable parameters. To specify file parameters, open the
Parameters menu then select File. (If the Parameters menu is disabled, see File
Paths and Permissions on page 269 or contact your system administrator.) The
File Parameters dialog box will appear.

There are four sets of options to specify in this dialog box:


File Title
File Range
X-Axis Description Variables
Description Variables

File Title
In the File Title box, enter a description of the content of the file specific enough to
distinguish it from other similar files, if any. This text will be used to label charts
and reports and will appear next to the file name in the File Open dialog box. The
title may be up to 70 characters long, including spaces and punctuation. You can
also include the current file name, date, or time by including any of the
Replaceable Parameters described under Title for Graphics and Reports on

278 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

page 246. If you use Replaceable Parameters, be sure to enter them in all
uppercase letters.

File Range
In the area labeled File Range, specify the range of rows in the Data file for
Quality Analyst to analyze and chart.
Select All Rows if you want Quality Analyst to analyze and chart all data
rows.
Select Last Rows to specify the number of rows at the end of the file to
analyze and chart. Enter the number of rows in the box. This is useful if you
have a large file and only need to see the most recent data.
Select From Row: To Row: to specify the starting and ending row to
analyze and chart. This lets you select any contiguous set of rows in the file.
When the To Row box is selected, pressing the <DOWN> arrow will insert
“(Last)” into the box.

This setting becomes a “default” for the file that can be overridden for any or all
variables. This is discussed below under Variable Parameters on page 283.

Description Variables
With Quality Analyst, you can select “description variables” to appear along the
X axis of your chart. At certain intervals along the X axis, tick marks will be
labeled with the values of the variables you select. You can select any
combination of variables to display, including measurement data.
Description variables for particular data points on a control chart can also be
displayed using the detail-view feature of Quality Analyst, which is discussed in
the section Viewing Chart Details on page 206.
In the area labeled Description Variables, select the variables whose values will
label the X axis of control charts and will appear in detail view windows. The list
labeled In File lists all variables in the file. The list labeled Selected lists the
currently selected description variables. When you first display the File Parameters
dialog box while creating a new Data Set, the Selected list will contain the first
variable of data type D (DateTime) and the first variable of data type T (time) in
the Data Set. You can select additional variables in one of two ways:
Double-click the variable name in the In File list, OR
Click the variable name, then click the Select button.

CHAPTER 7: Customizing Charts • 279


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Similarly, you can remove a variable from the selected list in one of two ways:
Double-click the variable name in the Selected list, OR
Click the variable name, then click the Remove button.

Note: All variables in the Selected list will appear in the detail view windows of
the Graphics Viewer when you use the detail view feature of Quality
Analyst (see Viewing Chart Details on page 206.) Only the first few,
however, will appear as labels along the X axis. You can specify how
many will appear as X-axis labels; see Maximum Variables on X Axis
below.

Variables in the Selected list will appear in the same order on the chart as in the
list. You can control this order with the Select and Remove operations. Variables
are added to the Selected list above the currently highlighted variable in that list.
For example, the figure below shows two pictures of the Description Variables
area of the File Parameters dialog box. The left picture shows the variable
MACHINE highlighted in the Selected list and the variable TIME highlighted in
the In File list. The right picture shows what happens if you click the Select
button—the variable TIME is inserted into the Selected list above MACHINE.

Inserting a Description Variable in the Selected list

280 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

X-Axis Description Variables


Once you have selected the variables to display, you can specify the way Quality
Analyst displays these variables. These options are displayed in the area labeled
X-Axis Description Variables.

Maximum Variables on X Axis


In the box labeled Maximum Variables on X-Axis, specify how many lines of X-axis
labels you want to display. You can select more description variables than this, but
only the number of variables you specify here will appear along the X axis. All
description variables will appear in the detail window when you display it in the
Graphics Viewer, as explained under Using the Detail Window on page 207.)

Characters per Variable


In the Characters per Variable box, enter the number of characters of each X-axis
label to display. Quality Analyst uses this value to determine how many labels will
fit when it calculates the label display interval. Labels that have more than this
number of characters will be truncated. So if you select a date as a description
variable, and specify five characters per variable, the date labels, which usually
display in eight characters (like 09/23/89), would appear as 09/23.

CHAPTER 7: Customizing Charts • 281


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Show Minor Tick Marks


Check this box if you want to display minor tick marks between labeled tick
marks. If you will be charting many, many rows of data, you will probably want to
leave this option unchecked; the density of the minor tick marks will detract from
the appearance of your chart.

Display Interval
The display interval is the frequency at which description variables appear along
the X axis. You have three options for specifying display interval.
If you select All that fit, Quality Analyst will place as many variable descriptions
along the X axis as will fit, given the spacing specified under Characters per
Variable, which is explained above. Other tick marks along the axis will be left
unlabeled.
If you select Description Changes Only, Quality Analyst will place as many
variable labels along the X axis as will fit, but will omit labels that are identical to
the preceding label. Thus, labels will be displayed only when they change.
If you select Every Plotted Points, Quality Analyst will label ticks at the
interval specified. For example, if you select this option and specify “4” plotted
points, Quality Analyst will label every fourth tick mark. Be aware that if the
display width of the number of Characters per Variable is greater than the distance
between the specified number of tick marks, Quality Analyst will skip more tick
marks than you specify here.

282 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Variable Parameters
Variable parameters apply individually to each variable in the file. To specify
charting parameters for variables, open the Parameters menu then select Variable.
(If the Parameters menu is disabled, see File Paths and Permissions on page 269
or contact your system administrator.) The Variable Parameters tabbed dialog box
will appear. The table below shows the input items available on each tab.

CHAPTER 7: Customizing Charts • 283


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Variable-Parameter Tabs and Inputs

Tab Inputs
Data Ranges Analysis and Display Range
Control Limit Recalculation Range
Missing and Tagged Data Missing Data Handling
Tagged Data Handling
Subgroup/Sample Size and Type Subgroup Size and Type–Variable Data
Subgroup Size and Type–Attribute Data
Control Limit Adjustments
Graphics Comments
Description Variables
Other Process Parameters

Each category is presented on its own “tab” that looks much like a divider in a
3×5-card box. To select a category of parameters, click anywhere on the tab for
that category.

Variable
At the top of the Variable Parameters dialog box , above the tabs, is a drop-down
list labeled Variable in which you select the variable in your Data file for which
you want to specify parameters.

The description of the variable is shown in a recessed box to the right. Remember
that you can set these parameters independently for each variable in a file.
To select a variable, click the drop-down-list button, scroll up or down the list if
necessary, and click the variable name.

Data Ranges
Normally, Quality Analyst will analyze and chart all data in a Data file. However,
you can instruct Quality Analyst to analyze and display only some of your data.
To do so, select the Data Ranges tab in the Variable Parameters dialog box.

284 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

For each variable in your Data file, you can specify separately the portion of your
data to analyze and display and the portion of your data to use in calculating
control limits.

Analysis and Display Range


In the Analysis and Display Range area of the Data Ranges tab, you can specify the
portion of your data to analyze and display. You have four choices.
Select File Default if you want to use the default file parameter for this data
range. Its current value is shown in the recessed box to the right of the label.
Select All Rows if you want to use all rows of data. If the file default is “All
Rows,” these first two options will have the same effect. However, if you
select “All Rows” here and subsequently change the File Default to
something else, “All Rows” will still apply to this variable.
Select Last Rows if you want to specify the number of rows at the end of
your file to analyze and display. In the edit box between “Last” and “Rows,”
type the number of rows you want to use.
Select From Row To Row if you want to specify rows at the
beginning or in the middle of your file to analyze and display. In the edit box
after From Row, enter the row number of the first row of data you want to

CHAPTER 7: Customizing Charts • 285


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

analyze. In the edit box after To Row, enter the row number of the last row of
data you want to analyze. To specify the last row in the file, press <DOWN> to
insert (Last).

Control Limit Recalculation Range


In the Control Limit Recalculation Range area of the Data Ranges tab, you can
specify the portion of your data to use in calculating control limits, regardless of
what data you have selected to analyze and display. You have four choices, only
the first of which is different from the Analysis and Display Range settings.
Select Use Analysis and Display Range if you want to base your control limits on
the same data that you are analyzing and displaying. Otherwise, specify another
range as described above.

Missing and Tagged Data


On the Missing & Tagged Data tab of the Variable Parameters dialog box, specify
how you want Quality Analyst to handle missing or tagged data when analyzing
and charting your data. Each group of parameters has its own area on the tab.

286 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Missing Data Handling


You have three main choices in specifying how Quality Analyst should handle
missing data:
Select System Default to use the current system-level settings for handling
missing data. These settings are displayed in the recessed boxes just below the
option description.
Select Eliminate Missing Data if you want Quality Analyst to ignore missing
data when analyzing and charting data.
Select Include Missing Data if you want Quality Analyst to include missing
data when analyzing and charting data. If you choose this option, you can
specify two details for handling missing data. You can choose to Ignore
Subgroups containing Missing Data, or you can choose to Leave space on chart
for empty Subgroups. Either, neither, or both of these options can be selected;
that is, they are not mutually exclusive.

Tagged Data Handling


On the same tab, you have three choices in specifying how Quality Analyst should
handle tagged data—System Default, Use Tagged Data, or Treat Tagged Data as
Missing. (How to tag data is described in the section Tagging Data on page 81.)
Select System Default to use the current system-level setting for handling
tagged data which is shown in the adjacent recessed box.
Select Use Tagged Data if you want Quality Analyst to include tagged data
when analyzing and charting data.
Select Treat Tagged Data as Missing if you want Quality Analyst to apply the
same rules for handling missing data to tagged data.

Subgroup/Sample Size and Type


On the Subgroup/Sample Size and Type tab of the Variable Parameters dialog box,
you specify the size and type of subgroups for measurement data (if they are not
built into the structure of the Data file), the sample size of attribute data, and how
Quality Analyst should adjust the calculation of control limits for subgroups or
samples.

CHAPTER 7: Customizing Charts • 287


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Subgroup Size and Type–Variable Data


The area labeled Subgroup Size and Type–Variable Data will only be active if the
selected variable is a measurement data type. If, as shown in the table below, the
measurement variable for which you are setting parameters is structured at the file
level into subgroups in which each measurement has its own column (that is, the
data type is a number), the Subgroup Size: option will be automatically selected,
the adjacent text box will show the number of measurements in the subgroup (and
will be inaccessible), and the other options will be grayed out. You can not change
the size of the subgroup for such variables on this tab. (You can do so by opening
the Edit menu in the Editor and selecting Variable Definition and Specifications, as
described under Modifying the Data Structure and Display on page 70.)

288 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Sample “Horizontal” Subgroup

DATE MOISTURE (1) MOISTURE (2) MOISTURE (3) Subgroup


2/2/05 3.4 3.7 3.3 1
2/3/05 2.9 3.6 3.2 2
2/4/05 2.8 3.1 3.3 3
2/5/05 2.8 2.7 3.7 4
2/6/05 3.2 2.9 2.7 5

For measurement variables that are not in multicolumn subgroups—that is,


subgroups are arranged vertically in a single column in the Editor—you have three
options for specifying subgroup size:
Select Subgroup Size to specify a fixed number of rows for each subgroup.
Enter the number of rows in the text box.
Select Moving Average to instruct Quality Analyst to use the moving average
of a fixed number of rows as a subgroup. Enter the number of rows in the box
labeled Length.
Select Variable Subgroup Size based on to use a variable number of rows for
subgroup size based on changes in the value of another variable in the file
(such as DATE). Enter the name of the other variable in the text box, or select
it from the drop-down list. If you choose this option, you must also specify
Maximum Subgroup Size—an upper limit to the number of rows Quality
Analyst should allow in a single subgroup. Enter the number of rows in the
text box. This value need not be precise, but it should be several rows more
than the largest subgroup Quality Analyst will actually find in the Data file.
The following table shows an example of this type of subgroup. The
subgroups are labeled in the third column (which is not part of the Data file).

CHAPTER 7: Customizing Charts • 289


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Sample “Vertical” Subgroup that changes with DATE

DATE MOISTURE Subgroup


2/2/05 3.4 1
2/2/05 3.7
2/2/05 3.3
2/4/05 2.8 2
2/4/05 3.1
2/4/05 3.3
2/4/05 2.6
2/4/05 3.8
2/5/05 2.8 3
2/5/05 2.7
2/5/05 3.0
2/5/05 3.7
2/6/05 3.2 4
2/6/05 2.9

Sample Size–Attribute Data


A sample size is required to create a control chart of attribute data. If your file
contains attribute data, the area labeled Sample Size–Attribute Data will be active
and you can specify a sample size for each attribute variable. You have several
options to allow for different sampling and data-collection methods.

290 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

First, a sample size can be constant throughout the file or it can vary from row to
row.
If the sample size is constant, select Sample Size and enter the sample size in
the adjacent box.
If the sample size varies, your file must contain a type “Z” variable whose
value is the sample size for each row. Select Sample Size variable and select
the name of that variable from the drop-down list.

Second, a sample can occupy a single row or can span multiple rows.
If a sample occupies a single row, select (Row) from the drop-down list
labeled Sample based on.
If a sample spans multiple rows, your file must contain a variable (such as
DATE, LOT, SHIFT, and so on) whose values identify each subgroup. A new
sample begins each time the value of that variable changes. Select that
identification variable from the drop-down list labeled Sample Based on.
With multi-row samples, Quality Analyst totals the defects in all rows to
generate a single chart point for each sample.

Note: Samples that span multiple rows may have either constant or varying
samples sizes. If it is constant, the sample size you enter applies to
all of the multiple rows together, not to each row separately.

Tip: If each row in your Data file contains defect data for a single item (a
circuit board or a roll of material, for example), set Sample Size to 1 and
select an identification variable from the Sample Based on list.

Control Limit Adjustments


For charts of both measurements and attributes, you can instruct Quality Analyst
how to compute control limits.
Select System Default: to use the current system-level setting which is shown
in the adjacent recessed box.
Select Adjust when Subgroup Size Varies if you want Quality Analyst to adjust
control limits for varying subgroup or sample sizes.
Select Do Not Adjust when Subgroup Size Varies if you do not want Quality
Analyst to adjust control limits for varying subgroup sizes.

CHAPTER 7: Customizing Charts • 291


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Graphics Comments
On the Graphics Comments tab of the Variable Parameters dialog box, you can edit
text comments that you have added to charts of the current variable.

Note that you can only edit these comments (or delete them) while in the Editor.
You can add comments to charts using the Comment button on the toolbar in the
Graphics Viewer, as described under Annotating Charts on page 203.
The Graphics Comments tab displays a two-column data grid with columns
labeled Chart and Comment. The Chart column shows the chart types for which
you have specified graphics comments. The Comment column shows the
comments you have added. To edit a comment, simply select the cell with the
mouse or arrow keys, press <DELETE> to enter edit mode, and edit the contents of
the cell.
To delete a graphics comment from the list, select the row by clicking the row
number on the left, then click the Delete button. A warning dialog box will appear,
asking you to confirm the deletion. Click OK to delete the comment.

292 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Other
On the Other tab in the Variable Parameters dialog box, you can specify several
additional charting parameters for each variable.

Set Process Parameters


In the Set Process Parameters area of the Variable Parameters tab, you can assign
known values for characteristics of your process. If your Data file contains
variable data, you can specify Target and Standard Deviation. If it contains
attribute data, you can specify Standard Percent Defective and Standard
Nonconformities per unit. These values will be used in control-chart calculations if
you ask Quality Analyst to base calculations on process parameters.
You can calculate any of these values from the data in your file by clicking the
Calculate button next to the corresponding edit box. Quality Analyst will insert the
calculated value into the corresponding edit box. In the case of Standard Deviation,
however, clicking the Calculate button will first display a dialog box titled
Calculate Process Standard Deviation in which you specify the method by which
Quality Analyst should calculate the standard deviation. Click the preferred
method, then click OK.

CHAPTER 7: Customizing Charts • 293


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Description Variables
On the Description Variables tab, you can override, at the variable level, the
Description Variables (that appear along the X axis of your charts) set at the file
level on the File Parameters dialog box.

Select File Default to retain the file-level defaults, which are displayed in the
recessed boxes below that option. To override the file defaults, select Custom,
then specify all other parameters as described in the sections Description
Variables and X-Axis Description Variables beginning on page 279.

294 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Control Chart Parameters


Quality Analyst lets you specify several parameters for charting individual
variables by chart type. To specify these parameters, open the Parameters menu
then select Control Chart. (If the Parameters menu is disabled, see File Paths and
Permissions on page 269 or contact your system administrator.) The Control Chart
Parameters dialog box will appear.

This table shows the tabs and corresponding inputs on the Control Chart
Parameters dialog box.

CHAPTER 7: Customizing Charts • 295


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Chart Parameter Tabs and Inputs

Tab Inputs
Scale Y-axis Scale
Center Line and Limits Control, Warning, and Inner Limits
Limit Regions
Default Chart Limits Warning limits display by chart type
Inner limits display by chart type
Plotting Characters Mean and Individual Chart variations
Individual Measurements Chart variations
Plotting Characters
Cumulative Sum Type of CUSUM
V-mask Design
Set Process Parameters
CUSUM Protractor
Other Pattern Rules use
Show Rainbow Zones on charts
p-chart Units
u-chart Units
Show Target on charts
Show Specifications on charts
EWMA parameters

At the top of the dialog box, above the tabs, is a drop-down list labeled Variable in
which you select the variable in your Data file for which you want to specify
Chart Parameters.

To select a variable, click the drop-down-list button, scroll up or down the list if
necessary, and click the variable name.
At the top of each tab in this dialog box, just below its label, is a drop-down list
labeled Chart in which you select the type of chart for which you want to specify
parameters for the selected variable.

296 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To select a chart, click the drop-down-list button, scroll up or down the list if
necessary, and click the chart name.

Scale
On the Scale tab in the Control Chart Limits dialog box, you can specify settings
for the scale of the Y axis for charts of each variable.

To specify these parameters, first select the variable and the chart type to which
you want the parameters to apply. The chart types available in the drop-down list
will depend on the data type of the variable you have selected.
Normally, the Y-Axis Scale is set to Recalculate as shown. This directs Quality
Analyst to automatically calculate the scale range and tick spacing from the data to
produce a readable, informative chart. You may, however, want to specify your
own settings for the Y-axis scale, either to create a common scale for directly
comparing sets of charts, or to fine-tune the appearance of the chart.

CHAPTER 7: Customizing Charts • 297


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To specify Y-axis scale settings, first click the Manual option on the Scale tab. The
recessed gray boxes for each setting will become white, indicating that they are
editable. Then select each parameter in turn and type in the values you want. The
following table describes each Y-axis setting and explains generally how Quality
Analyst calculates each.

Y-Axis Scale Settings

Setting Description Calculation Note


Minimum The minimum data value that Slightly smaller than the smallest
can be displayed on the chart. data value to provide some space
at the bottom of the chart.
Maximum The maximum data value that Slightly larger than the largest
can be displayed on the chart. data value to provide some space
at the top of the chart.
Scale Start The value near or below the Just off the bottom of the chart.
bottom of the chart at which to
start labeling tick marks.
Scale Increment The spacing of labeled tick Balances readability and
marks. informativeness.
Tick Start The value near or below the Just off the bottom of the chart.
bottom of the chart at which to
start placing tick marks.
Tick Increment The spacing of tick marks. Balances readability and
informativeness.

Before specifying these settings, however, you may want to start with the values
Quality Analyst would have used if allowed to calculate them from the data. To do
this, click the Calculate button at the bottom of the tab. Quality Analyst will insert
the calculated values in their respective cells. Note that all values will be
calculated; any values you might have entered using the keyboard will be
overwritten.

Center Line and Limits


On the Center Line and Limits tab, you can specify (or allow Quality Analyst to
compute) the center line, control limits, warning limits, and inner limits to display
for your data.

298 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Note: Quality Analyst uses the values of the key columns specified for your
Data Set to keep track of which limits apply to which data. So if you
intend to define limit regions, as explained below, be sure to specify key
columns for your Data Set. See Specifying Key Columns for the Data
Set on page 57 for instructions.

Furthermore, you can specify distinct sets of data rows (called “limit regions”) of
each variable in a Data file for which to display different center lines and limits.
For each variable, you can specify regions and their associated limits separately
for each applicable chart type.

CHAPTER 7: Customizing Charts • 299


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Sample chart with three limit regions having different limits

To specify limits or limit regions, first select the combination of variable and the
chart type to which you want the limits and regions to apply. The chart types
available in the drop-down list will depend on the data type of the variable you
have selected.

300 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Available Chart Types for Data Types

Data Type Available Chart Types


Measurement X-bar
Range
Range (with Individuals charts)
Standard Deviation
Individuals
EWMA
Median
Median/Individual
Attribute p-chart
np-chart
u-chart
c-chart

Select the Range chart type to calculate or enter parameters that apply to Range
charts of measurements in subgroups. Select the Range (with Individuals charts)
chart type to calculate or enter parameters that apply to Range charts of individual
measurements.

Specifying Center Line and Limits


Quality Analyst offers several ways to specify the center line, control limits,
warning limits, and inner limits, either for an entire limit region or individually:
Direct entry
Calculate from data in the file
Calculate from process standard deviation
Set to “None”
Set to “Recalculate”
Set to Default

Direct Entry
To enter the center line or any limit directly, select the appropriate cell and type
the value you want. Press <ENTER> or <TAB> to accept the entry.

CHAPTER 7: Customizing Charts • 301


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Calculate from Data


To calculate the center line and limits from data in the file, first select the limit
region by clicking its column header (even if there is only one region). Then click
the Calculate from Data button. The Calculate from Data dialog box will appear.

Specify the data rows from which the control limits should be calculated. The
From Row and the To Row in the third option will display the current boundaries of
the limit region. Change these only if you want to calculate control limits from
data outside the region.
In the area labeled Calculation Method, specify whether to use the Average Range
or Average Standard Deviation to calculate the limits. Note: This area of the
dialog box will not appear if the current variable is type XR or XS, or if you have
configured Quality Analyst to calculate control limits using Individual
Measurements, as explained under Calculation Methods for Charts on page 254.
When you are done, click OK. Quality Analyst will calculate the center line and
limits and then insert the calculated values into their respective cells in the column
for the region.

Calculate from Process Parameters


To calculate the center line and limits from process parameters for the variable
(instead of the actual data), first select the limit region by clicking its column
header, then click the Calculate from Process button. Quality Analyst will calculate
the center line and limits and then insert the calculated values into their respective
cells in the column for the region. The process parameters from which these limits
will be calculated are specified on the Other tab of the Variable Parameters dialog
box for each variable. (This is discussed under Set Process Parameters on
page 293.) If you have not specified process parameters there, clicking the
Calculate from Process button here will display a warning message to that effect.

302 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Set to None
To set all limits for a limit region to None, select the region by clicking its column
header, then click the Set to None button. None will appear in each limit cell.
To set individual limits to None, first select the cell. A drop-down-list button will
appear on the right of the cell. Select None from the drop-down list. When the cell
is selected, you can alternatively press <ESC> then the <UP> or <DOWN> arrow
until “None” appears in the cell. To accept the setting, press <ENTER> or <TAB>.

Set to Recalculate
For the last limit region only, you can instruct Quality Analyst to automatically
recalculate the center line and control limits from the data available each time it
charts. To set these limits to Recalculate, select the region by clicking its column
header, then click the Set to Recalculate button.
To set the center line or a limit in the last region to Recalculate individually, first
select the cell. A drop-down-list button will appear on the right of the cell. Select
Recalculate from the drop-down list. When the cell is selected, you can
alternatively press <ESC> then the <UP> or <DOWN> arrow until Recalculate
appears in the cell. To accept the setting, press <ENTER> or <TAB>.

Set to Default
For the last limit region only, the center line and limits can be set (or reset) to their
default values. The default value for the center line and control limits is
“[Recalculate].” The default values for warning and inner limits depend on the
settings on the Default Chart Limits tab, as indicated in the table below. Default
values are displayed in square brackets, for example “[Recalculate]” as opposed to
the “manual” setting “Recalculate.”
To set all limits to their default values, select the region by clicking its column
header, then click the Set to Default button. The default values will be inserted into
each cell.

Default Values for Center Line and Limits in Last Limit Region

Default Chart Limit Setting


Parameter Yes No
Upper Warning Recalculate None
Lower Warning Recalculate None
Upper Inner Recalculate None
Lower Inner Recalculate None

CHAPTER 7: Customizing Charts • 303


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To set the center line or a limit to its default values individually, first select the
cell. A drop-down-list button will appear on the right of the cell. Click it to drop
down the list.

Select the value in square brackets (either “[Recalculate]” or “[None]”) from the
drop-down list. When the cell is selected, you can alternatively press <ESC> then
the <UP> or <DOWN> arrow until the bracketed value appears in the cell. To
accept the setting, press <ENTER> or <TAB>.
There is a notable difference between None and [None] and between Recalculate
and [Recalculate]. The bracketed versions are the default values and will change as
those defaults are modified on the Default Chart Limits tab or at the system level.
The unbracketed versions are “hard” settings and will remain in effect until they
are modified on this tab.

Defining Regions
The first time you display the Center Line and Limits tab for a variable, a single
limit region will be displayed. The Beginning Row will be <1 and the Ending Row
will be >(Last), indicating that the region includes every row of that variable. Both
cells will be gray and inaccessible since, with only one region, the entire file must
be used. The remaining parameters will be set to their defaults which vary by
parameter as discussed above.
There are two ways to increase the number of limit regions—adding and inserting.

Note: If you define more than one limit region and expect to occasionally
archive older data, removing it from the Data Set, be sure to identify key
columns for this Data Set, as explained under Specifying Key Columns
for the Data Set on page 57. This lets Quality Analyst link the limit

304 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

regions to the actual data and adjust the regions automatically as data is
removed.

Adding a Limit Region


“Adding” a limit region creates a new region at the end of the file. More precisely,
it splits the current last region into two regions. When you click the Add Region
button, the Add Region dialog box will appear.

It asks you to enter the Beginning Row of New Region. By default, it displays a row
number one greater than the Beginning Row for the current last region. (Accepting
this value would make the current last region one row long and would assign all
remaining rows in the current last region to the new last region.) Enter the
Beginning Row number of the new region you want to create, then click OK.
Before the region is added, the Set New Region Limits dialog box appears,
indicating that the limits for the region about to be created are not set.

In the Set Limits area of the dialog box, specify how Quality Analyst should set
these limits. Select either Calculate from Data, Set to None (Enter limits later), or
Calculate from Process Parameters and click OK.
If you selected Calculate from Data, the Calculate From Data dialog box will appear
before the region is added. Use this dialog box as shown and explained under
Calculate from Data on page 302. After you click OK, a column for the new
region will appear in the Control Chart Limits dialog box. If you define more than
three regions, a scroll bar will appear below the limit region grid.

CHAPTER 7: Customizing Charts • 305


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Inserting a Region
“Inserting” a region lets you create a new region anywhere in your file. When you
click the Insert Region button, the Insert Region dialog box will appear and allow
you to specify the Beginning Row of Inserted Region and the Ending Row of
Inserted Region.

Enter row numbers as needed to define the region you want, then click OK.
As with adding a region, the Set New Region Limits dialog box will be displayed.
Specify how Quality Analyst should set the new limits as just described.
A column for the new region will appear in the Control Chart Limits dialog box. If
you define more than three regions, a scroll bar will appear below the limit region
grid.
If you enter row numbers for the new region that include rows from the end of one
existing region and the beginning of the next, the specified rows will be
reassigned to the new region. The regions created from the remnants of the
original two will retain their respective settings.
If you enter row numbers for a new region that include all rows from any existing
region, that region will be subsumed into the new region and its limit settings will
be lost.
If you enter row numbers for a new region that designate rows from the middle of
a single existing region, the beginning and end of the existing region will become
two separate regions and the rows you specified will become a new region. The
new regions made from the beginning and end of the original region will retain the
settings of the original region.

Deleting a Region
To delete a region, first select the region by clicking the column header, then click
the Delete button. If you delete the last region, its rows will be added to those of
the previous region. If you delete a region other than the last, its rows will be
added to the next region. In both cases, the limits of the “destination” region will
be applied to its new rows.

306 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Resizing a Region
You can adjust the size of regions by directly entering values for the beginning
and ending rows into the appropriate cells. The beginning row of the first region
and the ending row of the last region are fixed at <1 and >(Last) (indicating the
first and last row, respectively) and can not be changed. If you change the value
for the ending row of a region, the beginning row of the next region will
automatically be adjusted. If you change the value of the beginning row of a
region, the ending row of the previous region will be automatically adjusted.
If you enter values that define regions that Quality Analyst can not resolve, a
warning dialog box will be displayed notifying you that one or more regions will
be deleted to resolve the conflict. Click OK to delete the regions, or click Cancel to
return to the Center Line and Limits tab and resolve the conflict manually.

Limit Regions and Connectivity Data Sets


If you are configuring a Connectivity Data Set, the first data row (indicated by
“<1” for Beginning Row) and last data row (indicated by “>(Last)” for Ending Row)
are not necessarily the first and last records in the database, but rather the first and
last records retrieved from the database and placed in the Data Set when the
database was queried (when you opened the Data Set).
Because different data will likely be retrieved from the database each time you
open the Data Set, be sure to identify key columns for this Data Set (as explained
under Specifying Key Columns for the Data Set on page 57) if you define more
than one limit region. This lets Quality Analyst link the limit regions to the actual
data and adjust the regions automatically as different data is retrieved each time.

Default Chart Limits


On the Default Chart Limits tab of the Control Chart Parameters dialog box, you
specify whether warning limits and inner limits will be displayed on each of three
groups of charts.

CHAPTER 7: Customizing Charts • 307


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Chart Types
The display of warning and inner limits is specified separately for charts of
process average (X-bar, Individuals, Median, and EWMA charts), charts of
process variation (Range and Standard Deviation charts) and attribute charts (p,
np, c, and u charts). The charts of process average and process variation are
grouped separately because a single chart from one group can be paired with a
single chart from the other to produce a chart pair in which one is displayed above
the other. Quality Analyst lets you specify limits for these individual charts
separately.

Specifying Warning and Inner Limits


You have three options for displaying warning or inner limits or both on your
charts:
Yes, display them.
No, do not display them.
System Default: defer to the system default, which is displayed in the recessed
box.

308 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

The difference between selecting Yes or No and selecting System Default when it
has the corresponding value is that selecting Yes or No will remain in effect even
if you subsequently change the system default. Setting the system defaults is
explained under Limits and Specifications on page 250.

Plotting Characters
Quality Analyst lets you specify plotting characters to be displayed on control
charts to indicate in-control, out-of-control, and rule-violation points. (See
Specifying Plotting Characters on page 226 for instructions.) But the settings on
the Plotting Characters tab of the Control Chart Parameters dialog box let you
specify different plotting characters for certain types of charts for individual
variables.

Plotting Individual Measurements


On Median-and-Individual charts and Individual-measurement charts, individual
measurements structured in subgroups are normally plotted in a vertical “stack”
over their X-axis locations according to their Y-axis values. (By default, Use
Default Plotting Character is selected.)

CHAPTER 7: Customizing Charts • 309


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Median and Individual Chart with normal plotting characters

Because these points are often numerous and therefore often overlap, interpreting
the charts can be confusing. Quality Analyst provides several options for
displaying such points in a way that may make these charts clearer. You can
specify these options separately for Median and Individual charts (in the area
labeled Median and Individual Chart) and any chart pair that includes an Individual
chart (in the Individual Measurements Chart area).

Note The settings in the Median and Individual Chart area apply only to the
individual measurements in M/I charts, not the median values (which use
the standard plotting characters).

Rather than let Quality Analyst plot each measurement in the subgroup with the
same character, you can instruct the program to use the measurement number (that
is 1, 2, 3...n) as the plotting character. To do so, check the Use Measurement
Number as Plotting Character box.

310 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Median and Individual chart with measurement number as the plotting


character

You can also instruct Quality Analyst to spread the individual measurements in
the subgroup out along the X axis slightly. To do this, check the box labeled Offset
Individual Measurement Plotting.

CHAPTER 7: Customizing Charts • 311


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Median and Individual chart with offset plotting characters

If your Data Set is structured in columnwise subgroups (see page 19) and contains
a suitable variable, you can use the first one to three characters of the value of a
variable to label individual data points. To do so:

1 Select First characters of variable (in the Plotting Characters area).


2 Select the number of characters from the small drop-down list.
3 Select the variable name from the large drop-down list.
4 Select Use Variable selected below as Plotting Character (in the Median and
Individual Chart area).

312 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Median and Individual chart with value of variable as plotting characters

Plotting Characters
In the area labeled Plotting Characters, you can specify whether Quality Analyst
should display characters for each type of data point on charts of the selected
variable.
Select System Default to use the settings specified at the system level (as
explained under Plotting Characters on page 250). When this option is
selected, the three check boxes nearby indicate the system-level settings.
Select Custom if you want to override the system-level settings for the
selected variable. Select the check boxes to enable the display of plotting
characters for In-control, Out-of-control, and Rule violation data points. Quality
Analyst will always display data lines, but if you clear any of these check
boxes, the plotting character for the corresponding data points on charts of
this variable will not appear on the chart lines.

In the Plotting Characters area, you can also configure Quality Analyst to use the
first one to three characters of the value of a variable as the plotting “character”
for all charts (not just Individual or Median-and-Individual charts) of the selected
variable. Select First characters of variable, select the number of characters
from the small drop-down list, then select the variable name from the larger drop-

CHAPTER 7: Customizing Charts • 313


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

down list. (For example, if you use the first two characters of the variable
OPERATOR, and it contains the values “Tom,” “Dick,” and “Danny,” then the
points will be labeled “To,” “Di,” and “Da.”) Note that the list of variables will
contain all description variables (data types “D,” “T,” “A,” and “N”) in the file—
the only allowable data types for this variable.

Cumulative Sum
On the Cumulative Sum tab of the Control Chart Parameters dialog box, you
specify parameters affecting the creation of cumulative sum control charts.

Type of CUSUM
Quality Analyst can display two types of cumulative control charts. In the Type of
CUSUM area of the dialog box, select Cumulative Deviation (V-mask) to request a
“V-mask” chart of cumulative deviations from target. Select Minus Reference
Value (Numeric) to request a “Numeric” chart of cumulative deviation from target
minus a reference value. Select the Omit SPC Limits and Out-of-Control Symbols
check box to display CUSUM charts without SPC limits or out-of-control
symbols.

314 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

CUSUM chart with (left) and without (right) SPC limits and out-of-control
symbols

V-mask Design
In this area of the dialog box, specify the parameters of the cumulative sum
V-mask.
In the V-mask Type area, specify which control limits to use. Select Upper to use
the upper control limit, producing a cumulative sum chart with a one-sided
positive V-mask. Select Lower to use the lower control limit, producing a
cumulative sum chart with a one-sided negative V-mask. Select Both Upper and
Lower to use both control limits, producing a two-sided V-mask.
You can specify a reference value and decision intervals in the V-mask Parameters
area of the dialog box. To Use Custom Parameters, check the box adjacent to that
label. The nearby recessed boxes will become editable, allowing you to enter a
Reference Value (k) and Upper (+h) and Lower (−h) Decision Intervals.
In the area labeled Parameters Expressed In, specify whether the V-mask
Parameters are expressed in Standard Deviation or Measurement Units. Depending
on the settings of other parameters in this tab, Parameters Expressed In may be
selected automatically.

Set Process Parameters


In the area labeled Set Process Parameters, you can specify the process Target or
Standard Deviation, if they are known. You can have Quality Analyst calculate
either of these parameters from the data and insert it in the appropriate box by
clicking the Calc Target or Calc Std Dev buttons. If you have Quality Analyst

CHAPTER 7: Customizing Charts • 315


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

calculate standard deviation, the Calculate Process Standard Deviation dialog box
(shown on page 294) will appear. In this dialog box, specify whether to compute
standard deviation from individual measurements, average subgroup range, or
average subgroup standard deviation.

CUSUM Protractor
In the area labeled CUSUM Protractor, you can select and define a CUSUM
“protractor” for Quality Analyst to display. If you select Use Protractor, Quality
Analyst will display the slopes of several process levels on the left-hand side of
the chart. You must then specify the process levels to display by entering values
for the Starting level, the Stopping level, and Step at which to increment
intermediate levels.

Other
On the Other tab of the Control Chart Parameters dialog box, you specify several
miscellaneous control-chart parameters.

316 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Use Pattern Rules


In the area of the Other tab labeled Use Pattern Rules, specify whether you want
Quality Analyst to identify and display violations of pattern rules. You have three
choices:
Yes, display them.
No, do not display them.
System Default: defer to the system default, which is displayed in the adjacent
recessed box.

The difference between selecting Yes or No and selecting System Default when it
has the corresponding value is that selecting Yes or No will remain in effect even
if you subsequently change the system default.
You can specify the system default pattern rules as explained under Pattern Rules
on page 256.

Show Rainbow Zones on Charts


Quality Analyst lets you globally configure “rainbow zones” and enable them for
specific chart types, as explained under Rainbow Zones on page 252. You can
override those global settings for specific charts of specific variables in your Data
Set in the Show Rainbow Zones On area of this tab.
To use the global settings, select System Default.
To override the global settings, select Custom, then select the chart groups on
which you want to show rainbow zones for the selected variable:
X-bar, I, Median, and EWMA
Range and Standard Deviation
p, np, c, and u

p-chart Units
If your Data file contains attribute data, the input area labeled p-chart Units will be
active. Select the units with which to label percent-defective charts:
Fraction Defective
Percent Defective
Parts per Million (ppm)
Parts per Billion (ppb)

CHAPTER 7: Customizing Charts • 317


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

u-chart Units
If your Data file contains attribute data, the input area labeled u-chart Units will be
active. Select the units with which to label nonconformities-per-unit charts:
Number
Parts per Million (ppm)
Parts per Billion (ppb)

Show Target or Specifications on Charts


In the area of the Other tab labeled Show Target on, specify whether you want
Quality Analyst to display the target value for measurement variables. Do so
individually for each type of chart listed for the current variable.
In the area of the Other tab labeled Show Specifications on, specify whether you
want Quality Analyst to display the upper and lower specifications for
measurement variables. Do so individually for each type of chart listed for the
current variable.
Specification limits and target values for measurement variables are specified
when you define or modify the structure of your Data file as described under
Lower, Upper, and Target Specifications on page 46.

Exponentially Weighted Moving Average


If your file contains measurement data, the area labeled Exponentially Weighted
Moving Average will be active. Here you can specify whether to Display Individual
Measurements on EWMA charts. You can also specify the Smoothing Parameter
(lambda) to use in weighting the data when computing the moving average. Enter a
value between 0.0 and 1.0.

Process Capability (Histogram) Parameters


Quality Analyst lets you specify several parameters for process capability charts.
To specify these parameters open the Parameters menu then select Process
Capability (Histogram). (If the Parameters menu is disabled, see File Paths and
Permissions on page 269 or contact your system administrator.) The Process
Capability (Histogram) Parameters dialog box will appear.

318 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

The following table shows the tabs and corresponding inputs available on the
Process Capability dialog box.

Process-Capability (Histogram) Tabs and Input Parameters

Tab Parameters
Histogram Statistics Statistics to display
Number of Footer Lines
Histogram Parameters Histogram Bars
Calculated Bar Location
Additional Limits
Features Displayed
Probability Distribution
Histogram Scale X-axis Scale
Y-axis Scale
Process Capability Calculation Standard Deviation Calculation Method
Capability Index Calculation Assumptions
Confidence Limits

CHAPTER 7: Customizing Charts • 319


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

At the top of the dialog box, above the tabs, is a drop-down list labeled Variable in
which you select the variable in your Data file for which you want to specify
Process Capability Parameters. To select a variable, click the drop-down-list
button, scroll up or down the list if necessary, and click the variable name. Since
process capability histograms apply only to measurement variables, only
measurement variables will appear on the drop-down list in this dialog box.

Histogram Statistics
On the Histogram Statistics tab, you can specify statistics to be computed from
your data and displayed on “footer” lines beneath the Process Capability
Histogram in three columns—left, middle, and right.

Default Statistics
Quality Analyst has a default set of statistics that you can choose to display. These
defaults are set at the system level (as explained in the section Histogram
Statistics starting on page 262).

320 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To use the current default set, select the Use Default Statistics option near the top
of the Histogram Statistics tab. If you select this option, any statistics you may
have already selected (as described below) will be replaced by the defaults.
However, if you now select the Select Statistics option, the default statistics will
remain and you may remove from or add to any of the three lists.

Number of Footer Lines


At the top of the Histogram Statistics tab, specify the Maximum Number of Footer
Lines to Display by typing a value in the box adjacent to that label. This is the
maximum number of lines that will be displayed on the chart, even if more lines of
statistics appear in the Selected lists at the bottom of the tab.

Selecting Statistics
The three main areas of this tab allow you to select the statistics you want to
display in each of the three columns of footer lines below the histogram. In each
area, the upper list, labeled Available, lists all available statistics that can be
displayed in that column. The lower list, labeled Selected, lists the names of the
current default statistics for each column. You specify statistics to display by
copying items from the Available lists into the Selected lists.

CHAPTER 7: Customizing Charts • 321


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Statistics Available for Display on Process Capability Histograms

Left: Middle: Right:


Number of Samples Cpm Cpk aiag Capability Limits
Mean Cpk Cp aiag Target
Standard Deviation k Ppk Specification Limits
Skewness Cp Pp Est % Outside Limits
Kurtosis CR% Cpk > CL% Actual % Outside Limits
Geary’s CPL Cp > CL% Minimum, Maximum
Target CPU Cpm > CL% Skewness
Zmin Cpka > CL% Kurtosis
Zusl Pp > CL% Geary’s
Zlsl Ppk > CL% Geary’s Significance

Adding Statistics
To add a statistic to a footer line:
1 Select the statistic in one of the lists of Available statistics by clicking its
name. (Use the scroll bar to the right of the list to find the statistic, if
necessary.)
2 Click the Select button beneath that list of statistics.

Or you can double-click the name of the statistic. The name of the statistic will
appear in the corresponding Selected list.
You can add several statistics to the footer line at once by selecting several before
clicking Select. There are two ways to do this:
To select a set of adjacent statistics in a list, click the first statistic, then click
the last statistic while holding down the <SHIFT> key. The first, last, and all
intervening statistics will be selected.
To select multiple statistics from anywhere in one or more of the three lists,
click each one in turn while holding down the <CTRL> key.

If you select statistics from more than one list (left, middle, or right), be sure to
click Select for each list in which you have selected statistics.

322 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Inserting Statistics
Normally, Quality Analyst adds selected statistics to the end of the Selected lists.
You can control the order of the statistics in the list of footer lines by inserting
statistics into a particular position in the list. For example, follow these steps if
you have already selected three statistics to display, and you want to insert a
fourth between the first and second.
In the Selected list, click the second statistic to select it.
In the corresponding (left, middle, or right) list of Available statistics, select
the statistic you want to insert.
Click the Select button for that list.

Quality Analyst inserts the new statistic above the selected statistic in the Selected
list. To enable you to add a statistic to the end of the list, Quality Analyst places a
blank row below the last statistic in the list. To add a statistic to the end of the list,
select this blank row before adding the statistic.

Removing Statistics
To remove a statistic from the Selected list, select it then click the Remove button
below the list. You can remove several statistics from the list at once by selecting
several, as described above, before clicking the corresponding Remove button(s).

Histogram Parameters
On the Histogram Parameters tab of the Process Capability (Histogram) Parameters
dialog box, you specify several parameters affecting the appearance of the Process
Capability Histogram. You can specify these parameters individually for each
measurement variable in your file. Select the variable using the drop-down list at
the top of the dialog box.

CHAPTER 7: Customizing Charts • 323


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Histogram Bars
In the Histogram Bars area of this tab, you specify how Quality Analyst should
construct the histogram bars.
Select Recalculate each run to instruct Quality Analyst to compute the starting
value, width, and number of bars from the data each time a histogram of the
variable is displayed.
To specify parameters for Quality Analyst to use, first select the Set Manually
option. The recessed gray boxes for each setting will become white, indicating that
they are editable. Then select each parameter in turn and type in the values you
want.
In the Start box, enter the data value at which you want the leftmost histogram bar
to begin. In the Bar Width box, enter the range of data values you want represented
by each histogram bar. Finally, enter the Number of Bars to display on the
histogram.
Before specifying these settings, you may want to start with the values Quality
Analyst would have used if allowed to calculate them from the data. To do this,
click the Calculate button below the three settings. Quality Analyst will insert the
calculated values in their respective cells. Note that all three values will be

324 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

calculated and inserted. Any values you might have entered using the keyboard
will be overwritten.

Calculated Bar Location


In the Calculated Bar Location area of the Histogram Parameters tab, specify how
you want Quality Analyst to align histogram bars along the X axis.
Select System Default to use the current system-level setting which is shown in the
adjacent recessed box. Select Center Bars to center each bar on a round number on
the X axis. Select Start Bars to align the left edge of each bar with a round number
on the X axis.

Additional Limits
In addition to the specification limits and target, you can specify up to two more
limits to be displayed on the process capability histogram. In the Additional Limits
area of the Histogram Parameters tab is a 2×2 data-entry grid. It contains a row for
each of the two additional limits and two columns labeled Text and Value. In the
Text column, enter a short text label for Quality Analyst to use to identify each
limit on the chart. In the Value column, enter the value of each additional limit.
Quality Analyst will display a vertical line at each limit, labeled near the top of the
chart with the corresponding text.

Features Displayed
In the Features Displayed area of the Histogram Parameters tab, specify the
combination of statistical parameters to display on the process capability chart.
Check the Mean box to display a vertical line at the mean value of the data.
Check the Process Capability box to display the upper and lower process
capability sigma (standard deviation) limits as vertical lines on the chart. If you
select this feature, also specify the sigma factor to use in computing those limits.
Select Default to use the system-level default value which is displayed in the
adjacent recessed box. Or select Custom and specify a value in the adjacent box.
Check Distribution to display the distribution curve computed from the data.
Check Histogram to display the histogram bars constructed from the data.

CHAPTER 7: Customizing Charts • 325


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Probability Distribution
In the Probability Distribution area of the Histogram Parameters tab, specify the
type of distribution to display. Click the drop-down-list button to display a list
options from which to choose.

If you select either Truncated Normal or Folded Normal, you will need to fill out
the rest of this input area. First specify, in the box labeled Truncation/Fold Point,
the point at which to fold or truncate the distribution. Next, select either Data is
Greater Than Point or Data is Less Than Point to indicate whether the distribution is
greater than or less than the truncation or fold point.

Histogram Scale
On the Histogram Scale tab of the Process Capability dialog box, you can specify
settings for the scales of the X and Y axes of the process capability chart.

326 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To specify these parameters, first select the variable to which you want the
parameters to apply.
Normally, the scales are set to Recalculate as shown. This directs Quality Analyst
to automatically calculate the scale range and tick spacing from the data to
produce a readable, informative chart. You may, however, want to specify your
own settings for either scale, either to create a common scale for directly
comparing sets of charts, or to fine-tune the appearance of the chart.
To specify scale settings, first click the Manual option on the Histogram Scale tab.
The recessed gray boxes for each setting will become white, indicating that they
are editable. Then select each parameter in turn and type in the values you want.
The table below describes the scale settings for the X and Y axes.
Before specifying either set of settings, however, you may want to start with the
values Quality Analyst would have used if allowed to calculate them from the
data. To do this, click the Calculate button at the bottom of the tab. Quality
Analyst will insert the calculated values in their respective cells. Note that all
values will be calculated and inserted. Any values you might have entered using
the keyboard will be overwritten.

CHAPTER 7: Customizing Charts • 327


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Histogram Scale Settings

Setting Description
Minimum The minimum data value that can be displayed on the chart.
(Must be 0 for Y axis.)
Maximum The maximum data value that can be displayed on the chart.
Scale Start X axis: The value near or to the left of the left end of the chart at
which to start labeling tick marks.
Y axis: The value near or below the bottom of the chart at which to
start labeling tick marks.
Scale Increment The spacing of labeled tick marks.
Tick Start X axis: The value near or to the left of the left end of the chart at
which to start placing tick marks.
Y axis: The value near or below the bottom of the chart at which to
start placing tick marks.
Tick Increment The spacing of tick marks.

Process Capability Calculation


On the Process Capability Calculation tab of the Process Capability (Histogram)
Parameters dialog box, you specify several parameters and assumptions for
process capability calculations. You can do so individually for each variable,
which you select from the drop-down list at the top of the dialog box.

328 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Standard Deviation Calculation Method


In the area labeled Standard Deviation Calculation Method, specify how you want
Quality Analyst to compute standard deviation.
Select System Default to use the system-level setting which is displayed in the
adjacent recessed box. Otherwise, specify whether to calculate standard deviation
from Individual Measurements, Average Subgroup Range, or Average Subgroup
Standard Deviation. If you specify Individual Measurements, specify whether you
want to base these calculations on Sample (N−1) or Population (N) statistics.

Capability Index Calculation Assumptions


In the area labeled Capability Index Calculation Assumptions, you specify four
assumptions for capability index calculations:
Ideal Centerpoint
Assumed Distribution
Distribution Midpoint
Folded/Truncated Distribution

CHAPTER 7: Customizing Charts • 329


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Select the System Default option to use system-level defaults which are shown
below the label for each assumption on the left half of this dialog area. Select the
Custom option to specify each assumption individually.
For Ideal Centerpoint, specify whether to base the Cpk, k, and Cpm indices on the
process Target or the midpoint between the specifications (Specification Midpoint).
For Assumed Distribution, specify whether the indices should be based on the
Normal distribution or the Current (possibly non-normal) distribution. (See
Probability Distribution on page 326.)
For Distribution Midpoint, specify whether the distribution should be based on the
Mean or Median value of the data.
For Folded/Truncated Distribution, specify whether Quality Analyst should display
the entire Parent distribution or just the Child portion of the distribution.

Confidence Limits
In the area labeled Confidence Limits, specify the confidence limits to use for
process capability calculations. Select System Default to use the system-level
setting which is shown in the adjacent recessed box. Otherwise, select Custom and
type the desired value in the adjacent box.

330 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Capability Report Parameters


Quality Analyst lets you specify several default parameters for Process Capability
Reports. To specify these parameters, open the Parameters menu then select
Capability Report. (If the Parameters menu is disabled, see File Paths and
Permissions on page 269 or contact your system administrator.) The Capability
Report Parameters dialog box will appear.

Default Variables
In the upper part of the dialog box, select the variables that you want to be
“preselected” each time you start to create a process capability report from this
file. When you actually create the report, you can add variables or remove
variables, but these will show up automatically in the Selected list when you open
the Variable menu and select Capability Report. Selecting variables is explained
under Selecting Multiple Variables on page 123.

Breakdown Defaults
In the area labeled Default Breakdown, specify the default breakdown settings you
want to be “preset” each time you start to create a capability report. When you
actually create a report, you can change any of these settings. Select Breakdown by
Variable Only to break down the report (down the page) by variable only. Select

CHAPTER 7: Customizing Charts • 331


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Breakdown by to group values of the selected variable according to the value of


another variable, and create a separate section of the report for each grouping.
This can be useful if the second “breakdown” variable is DATE or SHIFT or
MACHINE. If you select this option, select the breakdown variable from the
adjacent drop-down list.
If you select a DateTime variable for the breakdown variable, the area labeled
Date Breakdown Options will become available. Here you can specify whether to
group by Day, by Week, or by Month. If you select by Week, specify (using the
adjacent drop-down list) whether you want the week to start on Sunday or
Monday.
If you select a breakdown variable that is not a DateTime variable, check Sort by
categories to sort the grouped sections by the breakdown variable. If you leave
this box unchecked, the sections will be displayed in the order in which they are
found in the file. (DateTime variables are always sorted chronologically.)

Box Plot Parameters


Quality Analyst lets you specify several default parameters for Box Plots of
attribute or measurement data. To specify these parameters open the Parameters
menu then select Box Plots. (If the Parameters menu is disabled, see File Paths
and Permissions on page 269 or contact your system administrator.) The Box Plot
Parameters dialog box will appear.

332 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Default Variables
In the upper part of the dialog box, select the variables that you want to be
“preselected” each time you start to create a box plot from this file. When you
actually create the box plot you can add variables or remove variables, but these
will show up automatically in the Selected list when you open the Other menu and
select Box Plots. Selecting variables is explained under Selecting Multiple
Variables on page 123.

Breakdown Defaults
In the area labeled Default Breakdown, specify the default breakdown settings you
want to be “preset” each time you start to create a box plot. When you actually
create a box plot, you can change any of these settings. Select Breakdown by
Variable Only to display all values of a variable in a single box plot. Select
Breakdown by to group values of the selected variable according to the value of
another variable, and display a separate box plot for each grouping. This can be
useful if the second “breakdown” variable is DATE or SHIFT or MACHINE. If
you select this option, select the breakdown variable from the adjacent drop-down
list.
If you select a DateTime variable for the breakdown variable, the area labeled
Date Breakdown Options will become available. Here you can specify whether to
group by Day, by Week, or by Month. If you select by Week, specify (using the
adjacent drop-down list) whether you want the week to start on Sunday or
Monday.
If you select a breakdown variable that is not a DateTime variable, check Sort by
categories to sort the grouped box plots by the breakdown variable. If you leave
this box unchecked, the boxes will be displayed in the order in which they are
found in the file.

Pareto Parameters
Quality Analyst lets you specify several parameters for Pareto diagrams of
attribute data or measurement categories. To specify these parameters, open the
Parameters menu then select Pareto. (If the Parameters menu is disabled, see File
Paths and Permissions on page 269 or contact your system administrator.) The
Pareto Parameters dialog box will appear. These parameters apply to the entire
file.

CHAPTER 7: Customizing Charts • 333


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Pareto Format
In the area labeled Pareto Format, you can specify several parameters that affect
the appearance of Pareto diagrams.
You have three options in choosing the Bars to Display. If you select All Bars, your
Pareto diagram will contain a bar for every attribute variable or type found. If you
select Largest Bars, you can specify, in the box, the number of bars to display
(the largest n bars will be displayed). If you select Top Percent, and enter a
percentage in the box, the Pareto diagram will contain a number of bars that will
represent at least that percentage of total defects. For either of the latter two
options, you can choose to display the remaining data in a single bar labeled
“Other” by checking the box labeled Remaining bars as ‘Other’. If you clear this
box, the remaining data will not be displayed.
You can instruct Quality Analyst to Sort Bars by either the Size of Bar or the
Names of the variables. If you select Names here and enter Labels under Multiple
Variable Pareto, bars will be sorted by those Labels.
If you select Cumulative Frequency, Quality Analyst will superimpose a line
showing cumulative frequency over the frequency bars on the Pareto diagram.
If you select Bar Percents, Quality Analyst will label each bar with its percentage
value.

334 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

File Range (Multiple Variable Pareto only)


In the area labeled File Range (Multiple Variable Pareto only), you can specify a
range of data rows to be used for Multiple Variable Pareto diagrams only. For
other charts, the file-level settings will be used. This set of options is only
available for files with defect data in multiple variables.
Select File Default to use the file-level setting for data range which is shown in the
adjacent recessed box.
Select All Rows if you want Quality Analyst to analyze and chart all data rows.
Select Last Rows to specify the number of rows at the end of the file to
analyze and chart. Enter the number of rows in the box. This is useful if you have
a large Data file and only need to see the most recent data.
Select From Row: To Row: to specify the starting and ending row to
analyze and chart. This lets you select any contiguous set of rows in the file. When
the To Row box is selected, pressing the <DOWN> arrow will insert “(Last)” into
the box.

Multiple Variable Pareto


In the area labeled Multiple Variable Pareto, you can specify additional parameters
for each attribute or defect variable in your file. This area contains a data-entry
grid with a row for each variable. If there are more variables than will fit in the
visible grid, a scroll bar will appear on the right of the grid, allowing you to get to
the remaining variables. The first two columns contain the variable name and
description; these are not editable.
In the third column, labeled Default Select, you specify, by checking the box,
whether the variable is “preselected” when you create a Pareto diagram. In the
Editor, when you request a Pareto diagram, Quality Analyst displays a list of
attribute variables and asks you to select which variables to include in the
diagram. The variables whose boxes are checked in this Default Select column
will be automatically selected in that list. At charting time, you can select or
deselect any attribute variables in the list; these check boxes simply allow you to
“predefine” a set of variables to include in Pareto diagrams made from this file.
In the column labeled Label, you can specify a more descriptive label for Quality
Analyst to use in place of the variable name when labeling the histogram bar for
each variable. Each label may be up to twelve characters long and, unlike variable
names, may contain spaces. (Quality Analyst will sort bars by these labels if
Names is selected under Sort Bars by.)

CHAPTER 7: Customizing Charts • 335


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

In the column labeled Cost, you can enter a cost for each variable to be used for
weighting the diagram. To instruct Quality Analyst to use these costs to weight the
Pareto diagram, check the box labeled Weight Pareto by Cost just below the grid.
The magnitude of each bar will be the product of the number of defects and the
cost you enter.

Short Run Parameters


This section explains how to configure Short Run parameters for a file in Quality
Analyst. For a discussion of the Short Run charting, refer to Creating Short Run
Charts on page 183. To configure Short Run parameters for a file, open the
Parameters menu then select Short Run. (If the Parameters menu is disabled, see
File Paths and Permissions on page 269 or contact your system administrator.)
The Short Run Parameters dialog box will appear.

Select the variable you want to chart from the drop-down list labeled Short Run
Variable. Select the variable to be used as the Identification Variable from the drop-
down list. Click Read/Sort to generate a list of unique values of the Identification
Variable, sort them, and insert them in the Identification column in the grid.

336 • CHAPTER 7: Customizing Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Note: When you add new values (items) to the identification variable in your
file, you can add them to this list manually, or click Read/Sort to
regenerate the entire list.

In the Nominal column, enter the nominal or target values associated with each
identification code. If necessary, enter variation factors for each in the Variation
column to adjust for differences in variation between items.
Repeat these steps for each variable in the Data Set, then click OK. This stores the
short run parameters with the Data Set (in the Header file).
While you are entering Short Run parameters, you may find the buttons on the
right side of the dialog box helpful.
To insert a new row in the data form, first select the row above which you want to
insert a new row (by clicking the row number), then click Insert.
To delete a row, first select it by clicking its row number, then click Delete.
Click Row Mode or Column Mode to switch editing modes as described under
Moving Around in the Data Grid on page 75.
Click Print to print the Short Run parameters.

CHAPTER 7: Customizing Charts • 337


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

CHAPTER 8

General Statistical Analysis

Overview
Quality Analyst lets you perform several types of statistical analyses on your data:
One-way ANOVA
Completely Randomized
Randomized Block Design
Chi-square
Bartlett’s Chi-square Statistic
Difference Among Proportions
Equal Expected Frequencies
Unequal Expected Frequencies
Correlation
Kruskal-Wallis Statistic
Descriptive Statistics
t-Statistics
Unpaired
Paired
Single Sample
Pearson Product Moment Correlation
Wald-Wolfowitz Runs Test
Regression
Single-Variable
Multiple Regression
Polynomial Regression

338 • CHAPTER 8: General Statistical Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Note: If a data filter is in effect, only those data rows that meet your filter
criteria will be included in statistical calculations. See Filtering Data on
page 90.

General Procedure
All statistical analyses are located on the Statistics menu in the Editor. The general
procedure for performing statistical analysis with Quality Analyst is:

1 Open the Data Set that you want to perform a statistical analysis on.
2 Open the Statistics menu.
3 Select the type of analysis you want to perform.
4 Select the variables to analyze.
5 Click OK to perform the analysis (or specify additional optional parameters).

Selecting variables (step 4) is discussed in the chapter on Selecting Variables on


page 121.

Output of Statistics Routines


The output for statistical analyses is displayed as text in the Graphics Viewer as
shown below. Using the Graphics Viewer, you can select the font to use for
displaying the output on screen and for printing. See Specifying Fonts on
page 225. You can also save text output by opening the File menu in the Graphics
Viewer and selecting Save As.

CHAPTER 8: General Statistical Analysis • 339


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

One-way ANOVA
Quality Analyst can perform analysis of variance on two types of experiment
designs:
one-way designs with equal or unequal subclass numbers (uneven Data Set)
one-way randomized block design: a cross-classification of data by blocks (or
subjects) and treatments. This is also referred to as “repeated measures” or
“subjects-by-treatments” design.

Completely Randomized
To create the Analysis of Variance table for a one-way design with equal or
unequal subclass numbers (uneven Data Set):
Open the Statistics menu, point to One-Way ANOVA, then select Completely
Randomized.

340 • CHAPTER 8: General Statistical Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

In the variable-selection dialog box, select at least two Treatment Variables as


explained under Selecting Multiple Variables on page 123.

The output of this routine is in two parts:


The ANOVA table giving sums-of-squares for the treatments and error, and
the F-statistic. The error term is the pooled within-treatment sum-of-squares.
A summary of the group means, standard errors, and number of observations.

CHAPTER 8: General Statistical Analysis • 341


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Randomized Block Design


With Quality Analyst, you can create the Analysis of Variance table for a one-way
randomized block design, a cross-classification of data by blocks (or subjects) and
treatments. This is also referred to as “repeated measures” or “subjects-by-
treatments” design. To do so:
Open the Statistics menu, point to One-Way ANOVA, then select Randomized
Block Design.

In the variable-selection dialog box, select at least two Treatment Variables as


explained under Selecting Multiple Variables on page 123.

342 • CHAPTER 8: General Statistical Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

This ANOVA requires a balanced design, where some data is present for each
treatment in each block. However, the data may be “unbalanced” with different
numbers of subjects for each treatment or missing data for some subjects. If a
single data point is missing, it will be estimated, minimizing the error sum-of-
squares. If more than one element is missing, they will be estimated using an
iterative procedure. The degrees of freedom will be modified to account for the
missing points.

The output of this routine is in two parts:


The ANOVA table giving sums-of-squares for the blocks, treatments, and
error, and the F-statistic. The error term is for blocks-by-treatment interaction.
A summary of the group means, standard errors, and number of observations.

CHAPTER 8: General Statistical Analysis • 343


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Chi-square
Quality Analyst can calculate four types of Chi-square statistics, each of which is
appropriate for a particular type of data:

Chi-square Statistic Appropriate Data Type


Bartlett’s test for homogeneity of Sample variances and their corresponding
variance degrees of freedom
Difference Among Proportions observed values (or positive responses) and
their corresponding sample sizes (n)
Equal Expected Frequencies equal expected frequencies, given a set of
observed frequencies
Unequal Expected Frequencies Data Sets of unequal expected frequencies.
(A set of observed frequencies is compared to
expected or ideal frequencies.)

344 • CHAPTER 8: General Statistical Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Bartlett’s Chi-square Statistic


To calculate Chi-square statistic for Bartlett’s test for homogeneity of variance,
given sample variances and their corresponding degrees of freedom:
Open the Statistics menu, select Chi-square, then select Bartlett’s Chi-square
Statistic.

In the upper half of the variable-selection dialog box, labeled Variance Variable,
select the variable to use for the sample variances as explained under Selecting a
Single Variable on page 121. In the lower half, labeled Degrees of Freedom
Variable, select the variable to use for the degrees of freedom.

The output of this routine consists of Bartlett’s Chi-square statistic and the
significance level.

CHAPTER 8: General Statistical Analysis • 345


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Difference Among Proportions


To compute the Chi-square statistic for a given set of observed values (or positive
responses) and their corresponding sample sizes (n):
Open the Statistics menu, select Chi-square, then select Difference Among
Proportions.

In the upper half of the variable-selection dialog box, labeled Positive Responses
Variable, select the variable to use for the positive responses as explained under
Selecting a Single Variable on page 121. In the lower half, labeled Sample Size
Variable, select the variable to use for the sample size. This must be a type “Z”
variable.

346 • CHAPTER 8: General Statistical Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

The output for this routine consists of the Chi-square statistic, the common alpha,
and the significance level.

Equal Expected Frequencies


To compute the Chi-square statistic for equal expected frequencies, given a set of
observed frequencies:
Open the Statistics menu, select Chi-square, then select Equal Expected
Frequencies.

In the variable-selection dialog box, select the Observed Frequencies Variable as


explained under Selecting a Single Variable on page 121.

CHAPTER 8: General Statistical Analysis • 347


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

The output for this routine consists of the Chi-square statistic, the expected
frequency, and the significance level.

Unequal Expected Frequencies


Use the following steps to compute the Chi-square statistic for Data Sets of
unequal expected frequencies. A set of observed frequencies is compared to
expected or ideal frequencies.
Open the Statistics menu, select Chi-square, then select Unequal Expected
Frequencies.

In the upper half of the variable-selection dialog box, labeled Observed


Frequencies Variable, select the variable that contains the observed frequencies as
explained under Selecting a Single Variable on page 121. In the lower half,
labeled Expected Frequencies Variable, select the variable to use for the expected
or ideal frequencies.

348 • CHAPTER 8: General Statistical Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

The output of this routine consists of the Chi-square statistic and the significance
level.

Correlation
Quality Analyst can calculate the linear correlation coefficients for two or more
variables. This routine produces a correlation matrix for all possible combinations
of the selected variables.

CHAPTER 8: General Statistical Analysis • 349


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To begin the analysis, open the Statistics menu and select Correlation. In the
variable-selection dialog box, select at least two variables as explained under
Selecting Multiple Variables on page 123.

Click Options to display the Correlation options dialog box. (This dialog box will
also appear if you click OK before clicking Options.)

In the area labeled Treat Missing Data, specify how to treat missing data. Select
Casewise if the Data Set contains no missing data. Data rows with any missing
data will be ignored. If you select Pairwise, all possible pairs of data are used, even
if the row contains some missing data. Correlation coefficients will be calculated
using different numbers of data pairs. Selecting Pairwise will slow down
processing.
In the area labeled Output Selection, select the output destination. Select Text
Display to display the results of the analysis on the screen in a window. (Once
displayed on the screen, the results can be saved to a Graphics file using the

350 • CHAPTER 8: General Statistical Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Graphics Viewer.) Select Data File if you want to save the correlation matrix in a
Quality Analyst Data file. You can accept the default output file (OUTPUT.DAT)
or specify another by clicking Select File.
The output of this routine consists of the mean and standard deviation of each
Data Set and the number of data pairs used, correlation coefficient, and
significance level for each possible pair of variables.

If you chose to save the correlation matrix in a Quality Analyst Data file, you can
view it by opening it with the Editor.

Kruskal-Wallis Statistic
The Kruskal-Wallis test is a nonparametric analysis of variance for populations
where the assumptions required by one-way ANOVA are not met.

CHAPTER 8: General Statistical Analysis • 351


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To begin the analysis, open the Statistics menu and select Kruskal-Wallis Statistic.
In the variable-selection dialog box, select at least two variables as explained
under Selecting Multiple Variables on page 123.

The output for this routine consists of the number of data elements, the Kruskal-
Wallis statistic, and the significance level.

352 • CHAPTER 8: General Statistical Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Descriptive Statistics
Quality Analyst lets you compute sample or population descriptive statistics for
one or more variables in a Data Set. This routine computes the following statistics:
95% Confidence Interval for Mean
Arithmetic mean
Coefficient of Kurtosis
Coefficient of Skewness
Coefficient of Variation (%) (1)
Fourth Moment about the Mean
Geometric Mean (2)
Harmonic Mean (2)
Maximum
Minimum
Number of Data Elements (N)
Quadratic Mean (RMS)
Standard Deviation (1)
Standard Error (1)
Sum
Third Moment about the Mean
Variance (1)

(1) computed using “N” for populations or “N–1” for samples.


(2) can not be reported if Data Set contains values equal to zero.

To compute descriptive statistics, open a file with the Editor then open the
Statistics menu and select Descriptive Statistics. The Descriptive Statistics dialog
box will appear. Select one or more variables as explained under Selecting
Multiple Variables on page 123.

CHAPTER 8: General Statistical Analysis • 353


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Click Options to display the Descriptive Statistics Options dialog box. (This dialog
box will also appear if you click OK before clicking Options.)

Use this dialog box to specify additional parameters for computing descriptive
statistics. In the area labeled Calculate Statistics By, select Sample Method to use
“N-1” to calculate the variance, standard deviation, standard error, coefficient of
variation, and third and fourth moments about the mean. Select Population Method
to use “N” in those calculations
In the area labeled Output Selection, select Text Display to display the results of the
analysis on the screen in a window. (Once displayed on the screen, the results can
be saved to a Graphics file using the Graphics Viewer.) Select Data File if you
want to save the statistics for each selected variable in a Quality Analyst Data file.
You can accept the default output file (OUTPUT.DAT) or specify another by
clicking Select File.

354 • CHAPTER 8: General Statistical Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

The Text Display output includes the title of the file, the description of the
variable(s), and the statistics listed at the beginning of this section.

The Data File output includes a row for each variable you selected and a “column”
for each statistic in the following order, left to right:
Variable name
Number of elements
Sum
Minimum
Maximum
Arithmetic mean
Standard deviation
Variance
Standard Error

CHAPTER 8: General Statistical Analysis • 355


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Coefficient of variation

t-Statistics
Quality Analyst can calculate four types of t-statistics:
Ordinary unpaired sample t-statistic
Paired sample t-statistic
Single sample t-statistic
Pearson Product Moment Correlation

Ordinary Unpaired Sample t-Statistic


To compute the common t-statistic for two sample sets from normal populations:
Open the Statistics menu, select t-Statistics, then select Unpaired. The
t-Statistics, Unpaired dialog box will appear.

356 • CHAPTER 8: General Statistical Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Use this dialog box to select two variables (representing sample sets from normal
populations) for which you want to compute the common t-statistic. Select two
single variables as explained under Selecting a Single Variable on page 121.
Variable 1 is the first sample set; Variable 2 is the second.
Click Options to display the t-Statistics, Unpaired Options dialog box. (This dialog
box will also appear if you click OK before clicking Options.) Use this dialog box
to specify whether the two sample sets (variables) have the same variance. Also
enter the hypothesized mean difference between the two sample sets in this dialog
box. The default is zero.

The output of this routine includes:


the t-statistic
significance levels
the means and standard deviations of the respective Data Sets
the difference and standard error of the means

CHAPTER 8: General Statistical Analysis • 357


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

the number of degrees of freedom (calculated using Welch’s method and


rounded to nearest integer if variables have unequal variances)
the pooled standard deviation (reported only if the variables have unequal
variances)

Paired
To calculate the t-statistic for a set of paired observations:
Open the Statistics menu, select t-Statistics, then select Paired. The
t-Statistics, Paired dialog box will appear.

358 • CHAPTER 8: General Statistical Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Use this dialog box to select two variables (representing paired observations) for
which you want to compute the t-statistic. Select two single variables as explained
under Selecting a Single Variable on page 121. Variable 1 is the first sample set;
Variable 2 is the second.
Click Options to display the t-Statistics, Paired Options dialog box. (This dialog
box will also appear if you click OK before clicking Options.) Use this dialog box
to specify the hypothesized mean difference between the two sample sets. The
default is zero.

The output of this routine includes:


the t-statistic
significance levels
mean
standard deviation
standard error
the number of degrees of freedom

CHAPTER 8: General Statistical Analysis • 359


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

If one of the variables is subgrouped measurement data, the average of the


subgroup values will be used, and the output will include the message “(subgroups
averaged).”

Single Sample
To calculate the t-statistic for a Data Set with a known population mean:
Open the Statistics menu, select t-Statistics, and select Single Sample. The
t-Statistics, Single Sample dialog box will appear.

360 • CHAPTER 8: General Statistical Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Use this dialog box to select the variable with a known population mean for which
you want to compute the t-statistic. Select a single variable as explained under
Selecting a Single Variable on page 121.
Click Options to display the t-Statistics, Single Sample Options dialog box. (This
dialog box will also appear if you click OK before clicking Options.)

Specify the hypothesized population mean of the variable. If you know the
population variance, select Variance and enter it. Otherwise, select Unknown
Variance.

The output of this routine includes:


the t-statistic
significance levels
mean
standard deviation
standard error
the number of degrees of freedom

CHAPTER 8: General Statistical Analysis • 361


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Note: When the population variance is known, the degrees of freedom cannot
be calculated directly and you should obtain the value from a normal
table.

Pearson Product Moment Correlation


The Pearson Product Moment Correlation, or correlation coefficient (“r”),
indicates the degree of relationship between paired Data Sets. The test assumes
that data pairs are from a single subject, or from closely matched subjects.

To calculate the correlation coefficient for two paired variables:


Open the Statistics menu, select t-Statistics, then select Pearson Product
Moment Correlation. The t-Statistics, Pearson Product Moment Correlation
dialog box will appear.

362 • CHAPTER 8: General Statistical Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Use this dialog box to select the two paired variables. Select two single variables
as explained under Selecting a Single Variable on page 121.

The output for this routine includes:


Pearson’s “r”
the approximate 95% confidence interval
z-statistic
significance levels

If one of the variables is subgrouped measurement data, the average of the


subgroup values will be used, and the output will include the message “(subgroups
averaged).”

CHAPTER 8: General Statistical Analysis • 363


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Wald-Wolfowitz Runs Test


The Wald-Wolfowitz test is used to determine the degree of randomness in a data
series. The data sequence to be analyzed must either be of two data “types” or able
to be reduced to two types. For example, control chart data may be reduced to
values above the center line and values below the center line. Or, residual values
from a regression may be divided into positive and negative values.

To calculate the Wald-Wolfowitz Runs Test:


Open the Statistics menu and select Wald-Wolfowitz Runs Test. The Wald-
Wolfowitz Runs Test dialog box will appear.

364 • CHAPTER 8: General Statistical Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Use this dialog box to select the variable you want to test for randomness. Select a
single variable as explained under Selecting a Single Variable on page 121.
Click Options to display the Wald-Wolfowitz Runs Test Conditions dialog box.
(This dialog box will also appear if you click OK before clicking Options.) Use
this dialog box to specify two criteria—A and B—for dividing your data. The
divisions should be mutually exclusive. Not all of the data need be included within
the criteria (the center line may be left out, for example).

For each condition, A and B, select a qualifier from the drop down list (choices
shown below), and enter the corresponding value.
< less than
> greater than
<= less than or equal to
>= greater than or equal to

The output of this routine includes:


the number of runs (T)
the value of the Wald-Wolfowitz statistic (W) at the 0.025 and 0.005 levels

CHAPTER 8: General Statistical Analysis • 365


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Regression Analysis
Quality Analyst can perform three basic types of regression analysis:
Single-variable regression (several types)
Multiple linear regression
Polynomial regression

Single-Variable Regression
Quality Analyst can perform four types of regression analysis on a single
independent (X) variable.

Single-Variable Regression Types

Regression Type Equation Form


Linear y = A + Bx
Exponential y = A × eBx
Logarithmic y = A + B × ln x
Power Law y = A × xB
where x is the independent variable, y is the dependent
variable, and A and B are the least-squares regression

366 • CHAPTER 8: General Statistical Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

coefficients.

Selecting Variables
To perform a single-variable regression analysis, open the Data Set that contains
the variables you want to analyze. Open the Statistics menu, select Regression,
then select Single Regression. The Single Regression variable-selection dialog box
will appear.

Select a single variable (or column) each for the Independent (X) Variable and the
Dependent (Y) Variable. (See Selecting a Single Variable on page 121.)
Click OK. The Single Regression options dialog box will appear. Specify
additional parameters for the regression analysis.

CHAPTER 8: General Statistical Analysis • 367


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Regression Type
In the area labeled Regression Selection, select from one to four types of single-
variable regression you want to perform. Because of the mathematics involved, 9
some regression types can not be performed on certain types of data. Some of
these restriction are listed in the table below. If Quality Analyst encounters such a
problem, the offending regression type will be ignored. Corresponding graphics
output will be suppressed and regression statistics will be displayed as “---” in text
output.

Single-Variable Regression Restrictions

Regression Type All Xs must be: All Ys must be:


Exponential >0
Logarithmic >0
Power Curve >0 >0

9
Quality Analyst uses exponentiation to convert some functions to linear form.

368 • CHAPTER 8: General Statistical Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Graphics Output
In the area labeled Graphics Output, select Regression Plot to display a graph of
the data points, the regressed curve(s), and the confidence limits (if selected).

Select Residuals Plot to display a plot of the residuals of the regression analysis.
Quality Analyst displays this plot in its own window, separate from the regression
plot, so you can plot residuals without plotting the regression, if you want. The
residuals plot is standardized. That is, the values plotted are actually the standard
deviations of each residual value from the residual mean.

CHAPTER 8: General Statistical Analysis • 369


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Text Output
In the area labeled Text Output, select Regression Statistics to display the
regression statistics for each regression type selected. If you select this option, you
have the additional option, by checking Include Detail Data, of displaying the
actual and calculated Y values. The output will contain a row for each row in your
Data file, followed by the regression statistics.

370 • CHAPTER 8: General Statistical Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Example regression statistics output

CHAPTER 8: General Statistical Analysis • 371


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Example detailed regression statistics output

Select Residuals File to create a Quality Analyst Data file out of the residuals of
the regression analysis. Specify a name and location for the file by clicking Select
File.

Note: Because Quality Analyst uses logarithms and exponentiation in the


regression algorithm, the estimate of the standard error for coefficient
“A” becomes less accurate as it increases in magnitude.

372 • CHAPTER 8: General Statistical Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Example single-variable regression residual file

Confidence Limits
In the area labeled Confidence Limits, specify the confidence limits you want
displayed on the Regression Plot.
Select None to suppress the display of confidence limits.
Select Default to use the default settings which are displayed in the adjacent boxes.
Select Custom to override the default settings for this plot only. If you select this
option, enter the desired Probability Level in the text box and specify whether the
Limit Type is based on the Individual Points or the regressed Equation.
Select Shelf Life / Stability to analyze the stability of the product. In the Limits area,
select Upper or Lower to indicate which specification limit you want to investigate.
If you have defined upper or lower specifications for the variable being analyzed,
those values will be used as defaults. You can enter a different value in the
adjacent box. Select the Probability Level check box if you want Quality Analyst to
report the probability level intersection with the specification. Enter the desired
probability level in the adjacent box. Select the Regression line check box if you
want to include the intersection of the regression line and the specification in the
report.

Note: If you selected more than one regression type, no confidence limits will
be displayed.

CHAPTER 8: General Statistical Analysis • 373


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Multiple Regression
Selecting Variables
To perform a multiple linear regression, open the Data Set that contains the
variables you want to analyze. Open the Statistics menu, point to Regression, then
select Multiple Regression. The Multiple Regression variable-selection dialog box
will appear.

Select a single variable (or column) for the Dependent (Y) Variable. (See Selecting
a Single Variable on page 121.) Select one or more variables (or columns) for the
Independent (X) Variables. (See Selecting Multiple Variables on page 123.)
Click Options to display the Multiple Regression options dialog box. (This dialog
box will also appear if you click OK before clicking Options.) Specify additional
parameters for the multiple regression analysis.

374 • CHAPTER 8: General Statistical Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Graphics Output
In the area labeled Graphics Output, select Regression Plot to display a graph of
the data points, the regressed curve, and the confidence limits (if selected).

If you select Regression Plot, you may also select Residuals Plot to display a plot
of the residuals of the regression analysis. (Because Quality Analyst displays the

CHAPTER 8: General Statistical Analysis • 375


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

regression plot and the residuals plot in the same graphics window, the residuals
plot is not available unless you select the regression plot.) The residuals plot is
standardized. That is, the values plotted are actually the standard deviations of
each residual value from the residual mean.

Text Output
In the area labeled Text Output, select Regression Statistics to display the multiple-
regression statistics.

376 • CHAPTER 8: General Statistical Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Select Residuals File to create a Quality Analyst Data file out of the residuals of
the multiple regression analysis. Specify a name and location for the file by
clicking Select File.

CHAPTER 8: General Statistical Analysis • 377


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Confidence Limits
In the area labeled Confidence Limits, specify the confidence limits you want
displayed on the multiple-regression plot. Select None to suppress the display of
confidence limits. Select Default to use the default settings which are displayed in
the adjacent boxes. Select Custom to override the default settings for this plot
only. If you select this option, enter the desired Probability Level in the text box
and specify whether the Limit Type is based on the Individual Points or the
regressed Equation.

Polynomial Regression
Quality Analyst can fit your data to a polynomial equation using a least-squares
regression analysis. The form of the polynomial is:
y = B0 + B1x + B2x2 + B3x3 + … + Bnxn
where y is the independent variable, x is the independent variable, B1 through Bn
are the regression coefficients, and n is the order of the polynomial.

378 • CHAPTER 8: General Statistical Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Selecting Variables
To perform a polynomial regression, open the Data Set that contains the variables
you want to analyze. Open the Statistics menu, select Regression, then select
Polynomial Regression. The Polynomial Regression variable-selection dialog box
will appear.

Select a single variable (or column) each for the Independent (X) Variable and the
Dependent (Y) Variable. (See Selecting a Single Variable on page 121.)
Click Options to display the Polynomial Regression options dialog box. (This
dialog box will also appear if you click OK before clicking Options.) Specify
additional parameters for the polynomial regression analysis.

CHAPTER 8: General Statistical Analysis • 379


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Order of Polynomial
Enter the order of the polynomial in the edit box. This is the “n” in the sample
equation above. This value must be less than the number of data pairs (rows) in
your Data Set.

Graphics Output
In the area labeled Graphics Output, select Regression Plot to display a graph of
the data points, the regressed curve, and the confidence limits (if selected).

Select Residuals Plot to display a plot of the residuals of the regression analysis.
Quality Analyst displays this plot in its own window, separate from the regression
plot, so you can plot residuals without plotting the regression, if you want. The
residuals plot is standardized. That is, the values plotted are actually the standard
deviations of each residual value from the residual mean.

380 • CHAPTER 8: General Statistical Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Text Output
In the area labeled Text Output, select Regression Statistics to display the
polynomial regression statistics.

CHAPTER 8: General Statistical Analysis • 381


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Select Residuals File to create a Quality Analyst Data file out of the residuals of
the multiple regression analysis. Specify a name and location for the file by
clicking Select File.

382 • CHAPTER 8: General Statistical Analysis


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Confidence Limits
In the area labeled Confidence Limits, specify the confidence limits you want
displayed on the polynomial regression plot. Select None to suppress the display
of confidence limits. Select Default to use the default settings which are displayed
in the adjacent boxes. Select Custom to override the default settings for this plot
only. If you select this option, enter the desired Probability Level in the text box
and specify whether the Limit Type is based on the Individual Points or the
regressed Equation.

CHAPTER 8: General Statistical Analysis • 383


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

CHAPTER 9

Automating Procedures
with Run Files
Most Quality Analyst functions can be automated with “Run files”—scripts
created by you that instruct Quality Analyst to automatically perform one or more
of its functions. Quality Analyst Run files can be used to automate repetitive tasks
and to enable less experienced users to perform complex sequences of tasks. Run
files can be especially useful if you want to:
Perform standard sequences of tasks where a large number of charts are
routinely created from the same data sources.
Create time-consuming printer or plotter graphics output unattended.
Automate the creation of multiple chart layouts.
Set up an automated charting session for workers less familiar with the use of
computers and Quality Analyst.
Create a control chart automatically from another software package by setting
up a Run file to perform the required operations.
Use Quality Analyst as the SQC charting component of an integrated
manufacturing-information system.

Run files are easy-to-create text files, and can be as simple as a series of
commands to print control charts. The largest section of this chapter—Run File
Commands and Parameters beginning on page 386—discusses each Run file
command in detail and provides examples of the required command syntax.
You can execute Run files from within Quality Analyst (selecting the desired Run
file from a list), from icons on the desktop, or from other applications. This is
explained in the section Executing Run Files beginning on page 496.
More advanced Run files can prompt the user for information, and perform
complex work flows including page layout, data filters, and calculations. The
section Creating Complete Task Sequences, beginning on page 490, explains the
creation of complex work flows and includes examples of complete Run files. Run
files have allowed many Quality Analyst users to create SPC/SQC charts as part of

384 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

an integrated process-information system. These systems often include


combinations of data systems and other computers sharing process information by
transferring Data files. Charting is automated by passing a Data file to the system
that is running Quality Analyst and initiating Quality Analyst with a Run file to
generate the desired charts. Contact NWA if you are interested in this type of
application.

Creating Run Files


Run files are ASCII text files, and may be created and edited using any text editor
(such as Windows’ Notepad) that can handle pure ASCII files. Each line in a Run
file contains a single Run file command with arguments and parameters as
explained under Run File Commands and Parameters below. Run file names
must have the extension “RUN.”

Note: Most full-featured word processors such as Microsoft Word and


WordPerfect normally create files using their own proprietary format.
Files created in these formats cannot be used as Quality Analyst Run
files. These programs can load and save ASCII files, but only when
specifically instructed to do so. Consult the documentation for your word
processor for instruction in using it to create ASCII files.

Quality Analyst includes a Run file Wizard that guides you, step-by-step, through
the process of creating a Run file. A friendly user-interface lets you select and
insert commands, parameters, file names, and variable names with point-and-click
ease. To launch the Run File Wizard, open the Run menu and select Automation
(Run File) Wizard.

How Run Files Work


Quality Analyst executes Run files using a special program (called the Run File
Interpreter) that reads each line of a Run file, interprets each Run file command,
and manages the various other Quality Analyst routines needed to deliver the
requested output. Once started, a Run file will continue to execute automatically,
and will only pause when instructed to do so by a Run file command.
Each Run file consists of one or more lines, with each line containing the
instructions for performing a Quality Analyst function. There is no limit on the
number of lines in a Run file, and some users have created Run files with over
500 lines.

CHAPTER 9: Automating Procedures with Run Files • 385


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Run File Commands and Parameters


In this section, we describe all commands and command parameters available for
use within Run files. The table below lists the Run file commands and parameters
in alphabetical order, as they are presented in the rest of this section.

Alphabetical List of Run file Commands and Parameters

ACCA AskTimeSelectFilter NoWorkingMessage


ANOVA AskVariable PARETO
ANOVAR ATTRIBUT ParseFileName
APPEND BOXPLOT PAUSE
AskAlpha CALC PCAP
AskAlphaMatchFilter CHART POLREG
AskAlphaRange CHITEST PRINT
AskAlphaRangeFilter CLEANUP PROMPT
AskAlphaSelectFilter CLEAR REDUCE
AskDate $COMMENT REGRESS
AskDateMatchFilter CONNECT † REM
AskDateRange COPY RENAME
AskDateRangeFilter CORVAR REPORT
AskDateSelectFilter CreateNWH RUN
AskDATFile CUSUM RUNCHART
AskInteger DELETE SAVE
AskIntegerMatchFilter EWMA SCATTER
AskIntegerRange EXCEPT SET
AskIntegerRangeFilter EXTRACT SetCurrentDir
AskIntegerSelectFilter $FILTER SHELL
AskList FLIP SINGCOL
AskNumber GROUP SUMMARY
AskNumberMatchFilter IR SUMSTAT
AskNumberRange KRUSKAL SYSTEM
AskNumberRangeFilter MCAPREP TITLE
AskNumberSelectFilter MERGE TTESTS

386 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

AskOpenFile MPCAP UpdateNWH


AskSaveFile MR USETEMPDIR
AskTime MSORT WALDRUN
AskTimeMatchFilter MULTREG WEIBULL
AskTimeRange NEWVAR XRS
AskTimeRangeFilter NORMPLOT
† The CONNECT command is available only in the Database Connectivity version of Quality Analyst.
See Using Database Connectivity in Run files on page 583.

Note: Run file commands are not case-sensitive. As long as they are spelled
correctly they will be interpreted correctly by the Run File Interpreter. To
enhance readability, some commands are shown in this manual using
mixed case.

See Also: Replaceable Parameters, p. 484


Command Line Options, p. 502

Use the following table to find the appropriate command for the function you want
to perform.

Run file Commands and Parameters

Command or
Function Type Function
Parameter

Charting c-chart ATTRIBUT


Cumulative Sum CUSUM
Exponentially Weighted Moving EWMA
Average
Individuals IR
Individuals & Range IR
Median MR
Median & Individuals MR
Median & Range MR
Normal Probability NORMPLOT

CHAPTER 9: Automating Procedures with Run Files • 387


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Command or
Function Type Function
Parameter

np-chart ATTRIBUT
Pareto PARETO
p-chart ATTRIBUT
Process Capability Histogram PCAP
Process Capability Report (display) MCAPREP
Process Capability Report (prepare) MPCAP
Quantile plot NORMPLOT
Range XRS, IR
Run chart RUNCHART
Scatter diagram SCATTER
Standard Deviation XRS
u-chart ATTRIBUT
Weibull analysis WEIBULL
X-bar XRS
X-bar & Range XRS
X-bar & Standard Deviation XRS
General Statistics Analysis of variance ANOVA, ANOVAR
Bartlett’s test CHITEST
Box Plots (display) BOXPLOT
Box Plots (prepare) MPCAP
Chi-square statistics CHITEST
Descriptive statistics SUMSTAT
Formatted reporting REPORT
Kruskal-Wallis statistic KRUSKAL
Linear correlation CORVAR
Pearson Product Moment Correlation TTESTS
Regression (multivariable) MULTREG
Regression (polynomial) POLREG
Regression (single-variable) REGRESS
t-statistics TTESTS

388 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Command or
Function Type Function
Parameter

Wald-Wolfowitz Runs test WALDRUN


Output Assignable cause/corrective action ACCA
Comment a chart $COMMENT
Exception reporting EXCEPT, SUMMARY
Formatted reporting REPORT
Group layout GROUP
Printed output PRINT
Save output in new format SAVE
Screen display CHART
General Add new data APPEND
Calculations NEWVAR
Comment a Run file REM
Connect to external database CONNECT
Convert to/from single column SINGCOL
Create Header file CreateNWH
File conversion CLEANUP
File subset extraction EXTRACT
Filter data for charting $FILTER
Manipulate rows, columns, and blocks MERGE
Recalculate calculated variables CALC
Reduce data REDUCE
Rotate rows and columns FLIP
Sort a Data file MSORT
Title a Run file TITLE
Update Header file UpdateNWH
Other Assign values to parameters SET
Call (nest) another Run file RUN
Clear values from parameters CLEAR
Create and use a temporary folder USETEMPDIR
Execute a program SHELL

CHAPTER 9: Automating Procedures with Run Files • 389


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Command or
Function Type Function
Parameter

File operations COPY, DELETE,


RENAME
Parse a file path ParseFileName
Pause execution PAUSE
Prompt user for input All commands
beginning with “Ask”
PROMPT
Set the current directory SetCurrentDir
Suppress “Executing” message NoWorkingMessage
Quit Run file SYSTEM

When executing the Quality Analyst Run File Interpreter from a Windows
command line or program icon, you can include any of several parameters in the
command line to control the way the Run file behaves. These are explained in the
section Command Line Options on page 502.

Note: In the examples in the following sections, some Run file command lines
are too long to fit on a single line in this manual so they wrap to an
indented second line. In your actual Run file, however, you must enter
each command line on a single line. For example, two sample Run file
command lines in this manual might look like this:

PARETO NOZZLE.DAT M SEAL THREADS WELD G


NOZZLE.NWG
PRINT NOZZLE.NWG

But in your Run file they should look like this:


PARETO NOZZLE.DAT M SEAL THREADS WELD G NOZZLE.NWG
PRINT NOZZLE.NWG

The indented second line is actually the end of the first line. The text
editor you use to create your Run files will be capable of creating lines
much longer (usually up to 255 characters) than we can display on a
single line in this manual.

390 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

General Form of Run File Commands


Each line in a Run file begins with a Run file command. Each command performs
one or more Quality Analyst functions. The rest of the command line includes
information required for the command to be interpreted and executed correctly.
This information includes the names of input files and data variables, as well as
command options and parameters used to create and control output. Often, more
than one command line is needed to produce the desired output.
For most commands, the syntax of a command line in a Run file is:
command inpfile vars instructions output outfile

where the elements of the command are as follows:

Command Element Description


command the Quality Analyst command to be executed
inpfile the name of the file containing the data to analyze or chart
vars the name of the variable(s) in the input file to use
instructions one or more specific instructions to the command
output an output type or device
outfile the name of the file where the output of the command will
be stored
Some command elements may not be required for some commands.

Note: Notable exceptions to this general form are the “Ask” commands
(starting on page 399) which prompt the user for input.

Examples of Run File Commands


To set up an X-bar and Range chart for the variable GAP in the Data file
HOUSING.DAT, the command line would be:
XRS HOUSING.DAT GAP X R G

XRS is the name of the Run file command. HOUSING.DAT is the name of the input
file. GAP is the name of the variable. X and R are command parameters
(instructions) that tell XRS to produce both an X-bar and a Range chart. G tells
Quality Analyst to create a Graphics file containing the chart information.

CHAPTER 9: Automating Procedures with Run Files • 391


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

This command line alone would produce no “visible” output. To display the chart
on the screen, you would follow it with a CHART command. To print it, you would
follow it with a PRINT command. A Run file that produces a process capability
histogram in addition to the X-bar and Range chart might look like:
XRS HOUSING.DAT GAP X R G
CHART
PCAP HOUSING.DAT GAP G
CHART

Requirements for Run File Commands


All file names used in a command line in a Run file must include the file-name
extension. Quality Analyst does not automatically add standard or default
extensions to file names in Run file command lines. This applies to input files,
output files, and definition files.
In a Run file, if you specify a long file name or one that contains a space, it must
be enclosed in double quotation marks or the Run File Interpreter will misinterpret
it. (In fact, we recommend enclosing all file names in Run files in quotes.)
For example, assume you want to create an X-bar and Range chart of the variable
WT in the Data file named Ring Weight.dat. You might think the Run file
command to do this would be:
XRS Ring Weight.dat WT X R G

However, because the file name contains a space, the Run File Interpreter will try
to interpret “Ring” as the file name and “Weight.dat” as the variable and the
remaining parameters in the statement will be off by one position. This will
produce an error message.
To avoid this, place the Data file name in quotes:
XRS "Ring Weight.dat" WT X R G

In this case, the Run file command line will execute correctly because Quality
Analyst will interpret everything within the quotes as the file name.
This issue is particularly important if you use Replaceable Parameters to assign
file names in Run files. See Using Replaceable Parameters for File and Path
Names on page 487 for more on this issue.
Quality Analyst Run files can produce three types of output. The available
output options vary with each command and are discussed in the section on each
command.

392 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Run file “output” Options

Output Option Description


G Graphics output: creates a Graphics file to be
displayed by a subsequent CHART or PRINT
command.
W Windowed text output: Creates a Graphics file, to be
displayed by a subsequent CHART or PRINT
command.
D Data file: either a Summary (SMY) file (containing
out-of-control points and rule violations) for
subsequent use by a SUMMARY command, or a Data
(DAT) file, depending on the function.

If a Graphics file is created by a Run file command (by including the “G”
parameter), and the Graphics file name is not specified, the default name
GRAPHICS.NWG will be used.
Also note that the “G” and “W” options create Graphics files but do not display or
print them. This is accomplished by an additional command line containing a
“CHART” or a “PRINT” command or both.

ACCA
The ACCA command produces reports on the assignable causes (ACs), corrective
actions (CAs), and associated comments linked to data points in a Data Set. The
syntax of the ACCA command takes one of three forms depending on the desired
format of the output—text report, Pareto diagram, or Data file.
See Analyzing Assignable Causes and Corrective Actions on page 148 for
detailed explanations of some of these parameters.

Text Report
This form of the ACCA command generates a text report that itemizes assignable
causes, corrective actions, or comments. The syntax for this form of the ACCA
command in a Run file is:
ACCA inpfile format vars info scope output outfile

CHAPTER 9: Automating Procedures with Run Files • 393


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Command Element Description


inpfile the name of the Data file
format the format of the report:
“Tabular” for tabular
“Group” for grouped by variable
“Event” for grouped by event
vars the names of one or more variables (separated by spaces) in
the input file that you want to report
info the type of information to report. One or more of the
following (separated by spaces):
“A” for assignable cause
“C” for corrective action
“M” for comment
scope “Current” to include current Data Set only
“All” to include entire Data Set
output “W” to create a Graphics file containing a text report
outfile the name of the output Graphics file

Example: To generate a tabular report of the ACs and CAs (but not comments)
for the variables THICK and ANGLE in the file FLANGE.DAT, including only
data currently in the Data Set, and save that report to the file FlangeACCA.nwg,
the command line is:
ACCA FLANGE.DAT Tabular THICK ANGLE A C Current W
"FlangeACCA.nwg"

The “W” option creates a Graphics file but does not display or print it. This is
accomplished by an additional command line containing either a “CHART” or a
“PRINT” command.

Pareto Chart
This form of the ACCA command generates a Pareto diagram of assignable causes
or corrective actions to show which are most common. The syntax for this form of
the ACCA command in a Run file:
ACCA inpfile PARETO var bars other info scope output
[outfile]

394 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Command Element Description


inpfile the name of the Data file
var the name of a variable in the input file that you want to plot
bars “A” to include all bars
“L n” to include largest n bars (0<n<501)
“T x” to include top x percent (0<x<100)
other “R” to show remaining bars as “Other”
“N” to exclude remaining bars
info the type of information to report. One of the following:
“A” to show assignable cause
“C” to show corrective action
scope “Current” for current Data Set only
“All” for entire Data Set
output “G” to create a Graphics file
outfile the name of the output file, if applicable

Example: To generate a Pareto diagram of the assignable causes for the variable
ANGLE in the file FLANGE.DAT, showing the three largest bars individually
and the remaining bars grouped as “Other,” including all ACs in the entire Data
Set, and saving the diagram to the file FlangeACPareto.nwg, the command line is:
ACCA FLANGE.DAT PARETO ANGLE L 3 R A All G
"FlangeACPareto.nwg"

The “G” option creates a Graphics file but does not display or print the graphic.
This is accomplished by an additional command line containing either a “CHART”
or a “PRINT” command.

Data File
This form of the ACCA command writes assignable causes, corrective actions, or
comments to a file. The syntax for this form of the ACCA command in a Run file
is:
ACCA inpfile FILE vars info scope output outfile

Command Element Description


inpfile the name of the Data file

CHAPTER 9: Automating Procedures with Run Files • 395


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

vars the names of one or more variables (separated by spaces) in


the input file that you want to report
info the type of information to report. One or more of the
following (separated by spaces):
“A” for assignable cause
“C” for corrective action
“M” for comment
scope “Current” for current Data Set only
“All” for entire Data Set
output “CSV” to create a comma-separated value file
“D” to create a Data file
outfile the name of the output file

Example: To create a comma-separated-value file named FlangeACM.csv


containing the ACs, CAs, and comments for the variables THICK and ANGLE in
the file FLANGE.DAT, including only data currently in the Data Set, the
command line is:
ACCA FLANGE.DAT FILE THICK ANGLE A C M Current CSV
"FlangeACM.csv"

ANOVA
The ANOVA command performs an analysis of variance for one-way
experimental designs with equal or unequal subclass numbers (uneven Data Set).
The syntax of the ANOVA command line in a Run file is:
ANOVA inpfile vars output outfile

Command Element Description


inpfile the name of the input file to use
vars the names of two or more variables (separated by spaces) in
the input file that you want to analyze
output “W” to create a Graphics file containing a text report
outfile the name of the output file

Example: The command line to analyze the variance of each individual


measurement in the subgroup variable GAP in the Data Set BENDCLIP.DAT is:

396 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

ANOVA BENDCLIP.DAT GAP:1 GAP:2 GAP:3 GAP:4 GAP:5 W


DEFAULT.NWG

The “W” option creates a Graphics file but does not display or print it. This is
accomplished by an additional command line containing either a “CHART” or a
“PRINT” command.

ANOVAR
The ANOVAR command performs an analysis of variance for one-way
randomized block designs: a cross-classification of data by blocks (or subjects)
and treatments. This is also referred to as “repeated measures” or “subjects-by-
treatments” design. The syntax of the ANOVAR command line in a Run file is:
ANOVAR inpfile vars output outfile

Command Element Description


inpfile the name of the input file to use
vars the names of two or more variables (separated by spaces) in
the input file that you want to analyze
output “W” to create a Graphics file containing a text report
outfile the name of the output file

Example: The command line to analyze the variance of the variables LINE1,
LINE2, LINE3, and LINE4 in the file BAGGER.DAT is:
ANOVAR BAGGER.DAT LINE1 LINE2 LINE3 LINE4 W DEFAULT.NWG

The “W” option creates a Graphics file but does not display or print it. This is
accomplished by an additional command line containing either a “CHART” or a
“PRINT” command.

APPEND
The APPEND command displays an abbreviated version of the Quality Analyst
Editor and lets you add data to a Data Set. The syntax of the APPEND command
is:
APPEND filename numrecords

CHAPTER 9: Automating Procedures with Run Files • 397


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Command Element Description


filename the name of the Data file
numrecords the number of records (lines) to add to the file

The window for the Append editor will display five data rows and is not resizable.
If numrecords is greater than five, a vertical scroll bar provides access to the
additional rows.

In the Append editor, you can:


see the structure (column headings) of the data,
add data,
edit or delete the added data,
see the results of calculated variables, if any.

In the Append editor, you cannot:


see or edit data in the original Data Set,
change the structure of the Data Set,
add or delete rows of data.

Click Continue to append the data records you entered, or click Quit to proceed
using the original Data Set.
Example: The following Run file statement displays the editor as shown below.
APPEND DEFECTS.DAT 7

Notice that the vertical scroll bar indicates the presence of additional rows past the
fifth.

398 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

AskAlpha
AskDate
AskInteger
AskNumber
AskTime
Note: There are several Run file commands that prompt the Run file user for
one or more inputs of a specific data type and then assign those inputs to
Replaceable Parameters (see page 484). Run file authors can specify the
on-screen text used to prompt the user for input, or they can use default
text. The user’s input is checked to make sure that it complies with the
requirements of the data type.
Several variants of the Ask commands prompt the user for a lower and
upper limit for a range of values, and several other variants prompt the
user for inputs that are to be used as arguments for the $FILTER
parameter (see page 439) of a charting command.

The basic Ask commands (“Ask” followed by a data type) display a dialog box
that prompts you for an input of a specific data type and assigns that input to a
Replaceable Parameter after making sure that it is a valid input. The syntax of the
basic Ask command is:
command param "prompt" "default"

Command Element Description


command the command for the data type being requested:
AskAlpha (text string)
AskDate
AskInteger
AskNumber (real number)
AskTime
param the name of the Replaceable Parameter that the input will
be assigned to (See Replaceable Parameters starting on
page 484 for naming requirements.)
prompt the text to display in the dialog box to prompt the user for
input

CHAPTER 9: Automating Procedures with Run Files • 399


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

default the value to display in the input box when the dialog box
first appears

Note: To prompt the user for input to be used with the $FILTER parameter of a
charting Run file command, use the MatchFilter or SelectFilter forms of
the Ask command instead.

Use double quotation marks as shown in the syntax statement. Both prompt and
default are optional, but if you omit prompt, you must also omit default.
You can use empty quotation marks for prompt, in which case standard text will
be used. To suppress the prompt, use a quoted space. The default value, if
specified, will be assigned to the Replaceable Parameter when the user clicks
Continue unless it is first deleted or replaced.
If you omit the optional quoted parameters, this command displays the following
dialog box (varying slightly for the different data types):

Example: The following Run file statement displays the dialog box shown
below.
AskDate ^MatchDate "Enter the date to investigate:"
"10/1/04"

In this example, Quality Analyst will make sure that the input meets the
requirements for the DateTime data type.

400 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

AskAlphaMatchFilter
AskDateMatchFilter
AskIntegerMatchFilter
AskNumberMatchFilter
AskTimeMatchFilter
Note: See note at AskAlpha AskDate AskInteger AskNumber AskTime on
page 399.

The MatchFilter forms of the Ask command are intended to be used in


conjunction with a $FILTER parameter (see page 439) on a Run file command
line that requests a chart function.
This command displays a dialog box that prompts you for an input of a specific
data type, translates your entry into a valid “matching-filter” argument for the
$FILTER parameter, and assigns the resulting string to a Replaceable Parameter.
The syntax of the MatchFilter form of the Ask command is:
command param "prompt" "default"

Command Element Description


command the command for the data type being requested:
AskAlphaMatchFilter (text string)
AskDateMatchFilter
AskIntegerMatchFilter
AskNumberMatchFilter (real number)
AskTimeMatchFilter
param the name of the Replaceable Parameter that the input will
be assigned to (See Replaceable Parameters starting on
page 484 for naming requirements.)
prompt the text to display in the dialog box to prompt the user for
input
default the value to display in the input box when the dialog box
first appears

Use double quotation marks as shown in the syntax statement. Both prompt and
default are optional, but if you omit prompt, you must also omit default.

CHAPTER 9: Automating Procedures with Run Files • 401


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

You can use empty quotation marks for prompt, in which case standard text will
be used. To suppress the prompt, use a quoted space. The default value, if
specified, will be assigned to the Replaceable Parameter when the user clicks
Continue unless it is first deleted or replaced.
If you omit the optional quoted parameters, this command displays the following
dialog box (varying slightly for the different data types):

Read more about Replaceable Parameters starting on page 484 and about
Filtering Datas starting on page 90.
Example: The first of the following two Run file statements displays the dialog
box shown below.
AskAlphaMatchFilter ^MatchInsp "Enter the Inspector’s
name:" "STEVE"
ATTRIBUT BOARDS.DAT PART_MIS N G MISSING.NWG $FILTER =
"INSPECT ^MatchInsp"

If the user accepts the default value “STEVE,” then the string “M STEVE” is
assigned to the Replaceable Parameter ^MatchInsp and the second Run file
command is executed as:
ATTRIBUT BOARDS.DAT PART_MIS N G MISSING.NWG $FILTER =
"INSPECT M STEVE"

This command creates an np-chart (number defective) of the variable PART_MIS


in the file BOARDS.DAT for all records where the value of the variable
INSPECT is “STEVE.”

402 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

AskAlphaRange
AskDateRange
AskIntegerRange
AskNumberRange
AskTimeRange
Note: See note at AskAlpha AskDate AskInteger AskNumber AskTime on
page 399.

The Range forms of the Ask command display a dialog box that prompts you for
two (beginning and ending) inputs of a specific data type and assigns those inputs
to two Replaceable Parameters after making sure that they are valid inputs. The
syntax of the Range form of the Ask command is:
command param1 param2 "mainprompt" "prompt1" "prompt2"
"default1" "default2"

Command Element Description


command the command for the data type being requested:
AskAlphaRange (text string)
AskDateRange
AskIntegerRange
AskNumberRange (real number)
AskTimeRange
param1 the name of the first (beginning) Replaceable Parameter
(See Replaceable Parameters starting on page 484 for
naming requirements.)
param2 the name of the second (ending) Replaceable Parameter
mainprompt the text to display in the dialog box to prompt the user for
both inputs
prompt1 the text to display in the dialog box to prompt the user for
the first input
prompt2 the text to display in the dialog box to prompt the user for
the second input
default1 the value to display in the first input box when the dialog
box first appears

CHAPTER 9: Automating Procedures with Run Files • 403


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

default2 the value to display in the second input box when the dialog
box first appears

Note: To prompt the user for input to be used with the $FILTER parameter of a
charting Run file command, use the RangeFilter or SelectFilter forms of
the Ask command instead.

Use double quotation marks as shown in the syntax statement. All quoted
elements are optional from right to left. That is, you may omit a quoted element
only if you also omit all elements after it. You may, however, use empty quotation
marks for any of the quoted elements. In that case, standard text will be used for
prompts, and defaults will be left blank. To suppress any prompt, use a
quoted space. The default values, if specified, will be assigned to the
Replaceable Parameters when the user clicks Continue unless they are first deleted
or replaced.
If you omit the optional quoted parameters, this command displays the following
dialog box (varying slightly for the different data types):

Read more about Replaceable Parameters starting on page 484.


Example: The following Run file statement displays the dialog box shown
below.
AskDateRange ^BegDate ^EndDate "Enter a beginning and an
ending date:" "Beginning date:" "Ending date:"
"10/1/04" "10/31/04"

404 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Quality Analyst will make sure that the inputs meet the requirements for the
DateTime data type and that the first date is before (or the same as) the second.

AskAlphaRangeFilter
AskDateRangeFilter
AskIntegerRangeFilter
AskNumberRangeFilter
AskTimeRangeFilter
Note: See note at AskAlpha AskDate AskInteger AskNumber AskTime on
page 399.

The RangeFilter forms of the Ask command are intended to be used in


conjunction with a $FILTER parameter (see page 439) on a Run file command
line that requests a chart function.
This command displays a dialog box that prompts you for two inputs of a specific
data type, then translates your entries into a valid “range-filter” argument for the
$FILTER parameter, and assigns the resulting string to a Replaceable Parameter.
The syntax of the RangeFilter form of the Ask command is:
command param "mainprompt" "prompt1" "prompt2" "default1"
"default2"

CHAPTER 9: Automating Procedures with Run Files • 405


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Command Element Description


command the command for the data type being requested:
AskAlphaRangeFilter (text string)
AskDateRangeFilter
AskIntegerRangeFilter
AskNumberRangeFilter (real number)
AskTimeRangeFilter
param the name of the Replaceable Parameter (See Replaceable
Parameters starting on page 484 for naming requirements.)
mainprompt the text to display in the dialog box to prompt the user for
both inputs
prompt1 the text to display in the dialog box to prompt the user for
the first input
prompt2 the text to display in the dialog box to prompt the user for
the second input
default1 the value to display in the first input box when the dialog
box first appears
default2 the value to display in the second input box when the dialog
box first appears

Use double quotation marks as shown in the syntax statement. All quoted
elements are optional from right to left. That is, you may omit a quoted element
only if you also omit all elements after it. You may, however, use empty quotation
marks for any of the quoted elements. In that case, standard text will be used for
prompts, and defaults will be left blank. To suppress any prompt, use a
quoted space. The default values, if specified, will be included in the string
assigned to the Replaceable Parameters when the user clicks Continue unless they
are first deleted or replaced.
If you omit the optional quoted parameters, this command displays the following
dialog box (varying slightly for the different data types):

406 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Read more about Replaceable Parameters starting on page 484 and about
Filtering Data starting on page 90.
Example: The first of the following two Run file statements displays the dialog
box shown below.
AskDateRangeFilter ^DateFilter "Enter the date range to
investigate:" "Start of investigation period:"
"End of investigation period:" "10/1/2004"
"10/31/2004"
XRS FLUID.DAT VISC X S G $FILTER="DATE ^DateFilter"

If the user accepts the default values “10/1/2004” and “10/31/2004” as shown,
then the string “L 10/1/2004 U 10/31/2004” is assigned to the Replaceable
Parameter ^DateFilter and the second Run file command is executed as:
XRS FLUID.DAT VISC X S G $FILTER="DATE L 10/1/2004 U
10/31/2004"

This command creates X-bar and Standard Deviation charts of the variable VISC
in the file FLUID.DAT for all records where the value of the variable DATE is on
or between “10/1/2004” and “10/31/2004.”

CHAPTER 9: Automating Procedures with Run Files • 407


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Quality Analyst will make sure that the inputs meet the requirements for the
DateTime data type and that the first date is before (or the same as) the second.

AskAlphaSelectFilter
AskDateSelectFilter
AskIntegerSelectFilter
AskNumberSelectFilter
AskTimeSelectFilter
Note: See note at AskAlpha AskDate AskInteger AskNumber AskTime on
page 399.

The SelectFilter forms of the Ask command are intended to be used in conjunction
with a $FILTER parameter (see page 439) on a Run file command line that
requests a chart function.
This command displays a dialog box that prompts you for either one input (to use
as the criterion for a match filter) or two inputs (to use as the criteria for a range
filter), translates your entries into a valid argument for the $FILTER parameter,
and assigns the resulting string to a Replaceable Parameter. The syntax of the
SelectFilter form of the Ask command is:
command param "mainprompt" "prompt1" "prompt2" "prompt3"
"default1" "default2" "default3"

Command Element Description


command the command for the data type being requested:
AskAlphaSelectFilter (text string)
AskDateSelectFilter
AskIntegerSelectFilter
AskNumberSelectFilter (real number)
AskTimeSelectFilter
param the name of the Replaceable Parameter (See Replaceable
Parameters starting on page 484 for naming requirements.)
mainprompt the text to display in the dialog box to prompt the user for
all inputs

408 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

prompt1 the text to display in the dialog box to prompt the user for
the match input
prompt2 the text to display in the dialog box to prompt the user for
the first range input
prompt3 the text to display in the dialog box to prompt the user for
the second range input
default1 the value to display in the match input box when the dialog
box first appears
default2 the value to display in the first range input box when the
dialog box first appears
default3 the value to display in the second range input box when the
dialog box first appears

Use double quotation marks as shown in the syntax statement. All quoted
elements are optional from right to left. That is, you may omit a quoted element
only if you also omit all elements after it. You may, however, use empty quotation
marks for any of the quoted elements. In that case, standard text will be used for
prompts, and defaults will be left blank. To suppress any prompt, use a
quoted space. The default values, if specified, will be included in the string
assigned to the Replaceable Parameters when the user clicks Continue unless they
are first deleted or replaced.
If you omit the optional quoted parameters, this command displays the following
dialog box (varying slightly for the different data types):

Read more about Replaceable Parameters starting on page 484 and about
Filtering Data starting on page 90.

CHAPTER 9: Automating Procedures with Run Files • 409


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Example: The first of the following two Run file statements displays the dialog
box shown below.
AskDateSelectFilter ^DateFilter "Specify the Date(s) to
investigate:" "Day to investigate:" "Start of
investigation period:" "End of investigation
period:" "10/15/2004" "10/1/2004" "10/31/2004"
XRS FLUID.DAT VISC X S G $FILTER="DATE ^DateFilter"

If the user selects From and accepts the default values “10/1/2004” and
“10/31/2004” as shown, then the string “L 10/1/1999 U 10/31/2004” is assigned to
the Replaceable Parameter ^DateFilter and the second Run file command is
executed as:
XRS FLUID.DAT VISC X S G $FILTER="DATE L 10/1/2004 U
10/31/2004"

This command creates X-bar and Standard Deviation charts of the variable VISC
in the file FLUID.DAT for all records where the value of the variable DATE is on
or between “10/1/2004” and “10/31/2004.”
If the user selects Match and accepts the default value “10/15/2004” as shown,
then the string “M 10/15/2004” is assigned to the Replaceable Parameter
^DateFilter and the second Run file command is executed as:
XRS FLUID.DAT VISC X S G $FILTER="DATE M 10/15/2004"

This command creates X-bar and Standard Deviation charts of the variable VISC
in the file FLUID.DAT for all records where the value of the variable DATE is
“10/15/2004.”
Quality Analyst will make sure that the inputs meet the requirements for the
DateTime data type and that the first date in a range is before (or the same as) the
second.

410 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

AskDATFile
The AskDATFile command displays the Quality Analyst file-selection dialog box
and assigns the selected file name to a Replaceable Parameter. The syntax of the
AskDATFile command is:
AskDATFile param "path" "title"

Command Element Description


param the name of the Replaceable Parameter that the file name
will be assigned to (See Replaceable Parameters starting
on page 484 for naming requirements.)
path the folder (directory) whose files will be listed when the
dialog box initially appears
title the text to appear in the title bar of the dialog box

path and title must be enclosed in double quotes.


Use double quotation marks as shown in the syntax statement. Both path and
title are optional, but if you omit path, you must also omit title. You can
use empty quotation marks for path, in which case the default Quality Analyst
folder will be used.
If you omit path and title, this command displays the following dialog box:

CHAPTER 9: Automating Procedures with Run Files • 411


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Read more about Replaceable Parameters starting on page 484.


Example: The following Run file statement displays the dialog box shown
below.
AskDATFile ^DataFile "c:\program files\qa\" "Select a Data
Set:"

412 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

See Also: AskOpenFile on page 416 and AskSaveFile on page 418.

AskList
The AskList command displays a dialog box that prompts you for a choice from a
drop down list of options and assigns that choice to a Replaceable Parameter. The
syntax of the AskList command is:
AskList param optlist "prompt" "default"

Command Element Description


param the name of the Replaceable Parameter that the choice will
be assigned to (See Replaceable Parameters starting on
page 484 for naming requirements.)
optlist a list of possible values to assign to the Replaceable
Parameter (See instructions below)
prompt the text to display in the dialog box to prompt the user for
input

CHAPTER 9: Automating Procedures with Run Files • 413


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

default the value from optlist to use as a default value

Use double quotation marks as shown in the syntax statement. Both prompt and
default are optional, but if you omit prompt, you must also omit default.
You can use empty quotation marks for prompt, in which case standard text will
be used. To suppress the prompt, use a quoted space. The default value, if
specified, will be assigned to the Replaceable Parameter when the user clicks
Continue unless it is first deleted or replaced.
An optlist is a set of possible values for the Replaceable Parameter that will
appear in the drop-down list. The list is enclosed in square brackets (“[ ]”) and the
options are enclosed in quotes and separated by fences (“|”). For example, this
optlist:
["ZN"|"PB"|"AS"]

would produce this drop-down list:

If the possible values of the Replaceable Parameter are not sufficiently descriptive
to be useful to the user, you can include a “friendlier” string to display for each
option by adding a colon and a second quoted string to each option. For example,
this optlist:
["ZN":"Zinc"|"PB":"Lead"|"AS":"Arsenic"]

would produce this drop-down list:

For any option in the list, the leftmost item will be assigned to the Replaceable
Parameter if that option is selected. In the example above, if the user selects
“Lead,” “PB” will be assigned to the Replaceable Parameter.
An optlist can contain both one-item and two-item options. For example, this
optlist:
["ZN"|"PB":"Lead"|"AS"]

would produce this drop-down list:

414 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Note that default, if included, must be the rightmost item of the desired default
option. For example, in this optlist:
["ZN"|"PB":"Lead"|"AS"]

“PB” is the only illegal item for default.


If you omit the optional quoted parameters, this command displays the following
dialog box:

Read more about Replaceable Parameters starting on page 484.


Example 1: The following Run file statement displays the dialog box shown
below.
AskList ^Var1 ["ZN"|"PB"|"AS"] "Select a variable:" "AS"

Notice that because “AS” was specified as the default, “AS” is selected when
the dialog box appears.
Example 2: The following Run file command displays the dialog box shown
below.
AskList ^Element ["AS":"Arsenic"|"PB":"Lead"|"ZN":"Zinc"]
"Select an element to analyze:" "Lead"

CHAPTER 9: Automating Procedures with Run Files • 415


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Notice that “Lead” (the rightmost item of the option), not “PB” (the leftmost), is
correctly specified as the default.

AskOpenFile
The AskOpenFile command displays the Windows File Open dialog box and
assigns the selected file name to a Replaceable Parameter. The syntax of the
AskOpenFile command is:
AskOpenFile param "type" "path" "title"

Command Element Description


param the name of the Replaceable Parameter that the file name
will be assigned to (See Replaceable Parameters starting
on page 484 for naming requirements.)
type the extension of the file type you want listed when the
dialog box initially appears
path the folder (directory) whose files will be listed when the
dialog box initially appears
title the text to appear in the title bar of the dialog box

Use double quotation marks as shown in the syntax statement. All quoted
elements are optional from right to left. That is, you may omit an element only if
you also omit all elements after it. You may, however, use empty quotation marks
for any of the quoted elements. Empty quotation marks for type will cause all file
types to be listed. Empty quotation marks for path will cause the contents of the
default Quality Analyst folder to be listed.
If you omit the optional elements, this command displays the following dialog
box:

416 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Read more about Replaceable Parameters starting on page 484.


Example: The following Run file statement displays the dialog box shown
below.
AskOpenFile ^FileName "NWH" "c:\program files\qa\"
"Specify a file name:"

CHAPTER 9: Automating Procedures with Run Files • 417


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

See Also: AskDATFile on page 411 and AskSaveFile below.

AskSaveFile
The AskSaveFile command displays the Windows File Save dialog box and
assigns the selected file name to a Replaceable Parameter. The syntax of the
AskSaveFile command is:
AskSaveFile param "type" "path" "title"

Command Element Description


param the name of the Replaceable Parameter that the file name
will be assigned to (See Replaceable Parameters starting
on page 484 for naming requirements.)
type the extension of the file type you want listed when the
dialog box initially appears
path the folder (directory) whose files will be listed when the
dialog box initially appears
title the text to appear in the title bar of the dialog box

418 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Use double quotation marks as shown in the syntax statement. All quoted
elements are optional from right to left. That is, you may omit an element only if
you also omit all elements after it. You may, however, use empty quotation marks
for any of the quoted elements. Empty quotation marks for type will cause all file
types to be listed. Empty quotation marks for path will cause the contents of the
default Quality Analyst folder to be listed.
If you omit the optional elements, this command displays the following dialog
box:

Read more about Replaceable Parameters starting on page 484.


Example: The following Run file statement displays the dialog box shown
below.
AskSaveFile ^FileName "NWG" "c:\program files\qa\"
"Specify a file name:"

CHAPTER 9: Automating Procedures with Run Files • 419


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

See also: AskDATFile on page 411 and AskOpenFile on page 416.

AskVariable
The AskVariable command displays a dialog box that prompts you to select a
variable name from a list and assigns that variable name to a Replaceable
Parameter. The syntax of the AskVariable command is:
AskVariable param "filename" "type" "prompt" "COLUMN"

Command Element Description


param the name of the Replaceable Parameter that the choice will
be assigned to (See Replaceable Parameters starting on
page 484 for naming requirements.)
filename the name of the Data file whose variables should be listed
in the list
type a string of characters, each of which represents a type of
data that you want to include in the drop-down list. Include
a space in this string to include subgroup variables.

420 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

prompt the text to display in the dialog box to prompt the user for
input
COLUMN include "COLUMN" if you want the individual columns of
subgroup variables listed separately.

Use double quotation marks as shown in the syntax statement. Except for
filename, all quoted elements are optional from right to left. That is, you may
omit a quoted element only if you also omit all elements after it. You may,
however, use empty quotation marks for type or prompt. Empty quotation
marks for type will cause all variable types to be listed. Empty quotation marks
for prompt will cause a standard prompt to be displayed. To suppress the
prompt, use a quoted space.
The type string may include any character in the Type column of the table of
Data Types on page 37, except that instead of a number (for subgroup data), use a
space. "COLUMN" has no effect unless type contains a space.
If you omit the optional quoted parameters and specify WEIGHTS.DAT for
filename, this command displays the following dialog box:

Read more about Replaceable Parameters starting on page 484.


Example 1: The following Run file statement displays the dialog box shown
below.
AskVariable ^Var1 "WEIGHTS.DAT" " " "Select a weight
measurement:" "COLUMN"

CHAPTER 9: Automating Procedures with Run Files • 421


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Notice that only subgroup variables are listed because type is specified as " " (a
quoted space) in the statement.
Example 2: The following Run file statement displays the dialog box shown
below.
AskVariable ^Var1 "BOARDS.DAT" "P" "Please select a defect
column:"

Notice that only variables of data type “P” appear in the list.

ATTRIBUT
The ATTRIBUT command creates a Graphics file containing an attribute control
chart. The syntax of the ATTRIBUT command line in a Run file is:
ATTRIBUT inpfile var chart output [outfile]

422 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Command Element Description


inpfile the name of the input file to use
var the name of the variable in the input file to use
chart the type of chart to create:
“P” for p-chart (percent defective)
“N” for np-chart (number defective)
“U” for u-chart (nonconformities per unit)
“C” for c-chart (nonconformities)
output “D” to create a Summary (SMY) file, or
“G” to create a Graphics file.
outfile the name of the output file, if applicable

Example: The command line to create a p-chart for the variable THREADS in
the Data file NOZZLE.DAT and produce the Graphics file THREADS.NWG is:
ATTRIBUT NOZZLE.DAT THREADS P G THREADS.NWG

The “G” option creates a Graphics file but does not display or print the graphic.
This is accomplished by an additional command line containing either a “CHART”
or a “PRINT” command.

BOXPLOT
The BOXPLOT command creates a Graphics file containing a box plot. The input
file for this command is an intermediate file created by an MPCAP command.

Note: You must precede a BOXPLOT command with an MPCAP command


(page 447) in your Run file.

The syntax of the BOXPLOT command in a Run file is:


BOXPLOT inpfile statlist type units specs output [outfile]

Command Element Description


inpfile the name of an intermediate file created by the MPCAP
command
statlist optional list of statistics, separated by spaces, to display on
the plot box (for example, “4 3 6 11”) See table of statistic

CHAPTER 9: Automating Procedures with Run Files • 423


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

codes below.
type the type of box plot to create:
“B” for box & whiskers
“C” for capability box plot
“S” for ±3 sigma box plot
units the units for scaling plotted values:
“M” for measurement units
“S” for standardized units
specs “S” to display specifications and target
“N” to suppress them
output “G” to create a Graphics file
outfile the name of the output file, if applicable

Example 1: To create a Graphics file named BX1.NWG containing a box-and-


whiskers plot without specifications using measurement units based on the
intermediate file DXSHIFT.TMP, the command line is:
BOXPLOT DXSHIFT.TMP B M N G BX1.NWG

Example 2: To create a Graphics file named BX2.NWG containing a capability


box plot with specifications using standardized units and showing the Cpk statistic
based on the intermediate file DXSHIFT.TMP, the command line is:
BOXPLOT DXSHIFT.TMP 38 C S S G BX2.NWG

The “G” option creates a Graphics file but does not display or print the graphic.
This is accomplished by an additional command line containing either a “CHART”
or a “PRINT” command.

424 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Statistics Codes for “statlist” Parameter of BOXPLOT and MCAPREP Commands


in Alphabetical Order

Code Statistic Code Statistic Code Statistic


35 Actual Above USL 53 Cpm Confidence Limit 17 Minimum
34 Actual Below LSL 43 CPU 8 Number of Samples
36 Actual Outside Specifications 41 CR% 0 Page Break
6 Breakdown 7 Distribution 50 Pp
5 Breakdown Type 32 Est. Above USL 56 Pp Confidence Limit
4 Breakdown Variable 31 Est. Below LSL 49 Ppk
14 Capability Distribution 33 Est. Outside Specifications 57 Ppk Confidence Limit
13 Capability Sigma 1 File Title 11 Skewness
61 CAMcp 20 First Quartile 10 Standard Deviation
62 CAMcpk 26 Geary’s 28 Target
58 Confidence Level 27 Geary’s significance 21 Third Quartile
40 Cp 59 In The Box 60 Tz
55 Cp (aiag) Confidence Limit 39 k 23 Upper Adjacent
48 Cp aiag 12 Kurtosis 16 Upper Capability
52 Cp Confidence Limit 22 Lower Adjacent 25 Upper Outliers
38 Cpk 15 Lower Capability 30 USL
54 Cpk (aiag) Confidence Limit 24 Lower Outliers 3 Variable Description
47 Cpk aiag 29 LSL 2 Variable Name
51 Cpk Confidence Limit 18 Maximum 46 Zlsl
42 CPL 9 Mean 44 Zmin
37 Cpm 19 Median 45 Zusl
Note: A numerically ordered version of this table is on page 445.

CALC
The CALC command calculates calculated variables, if any, in a Data Set. The
syntax for the CALC command is:
CALC filename.dat

If your Data Set contains calculated variables and contains data that was added to
the Data Set outside the Quality Analyst Editor (for example, by other data-
collection software), you should include a CALC command in your Run file above
any charting or analysis commands.
Example: To create an Individual and Range chart for a variable in a Data Set
that contains a calculated variable, the Run file command lines would be:
CALC VENEER.DAT

CHAPTER 9: Automating Procedures with Run Files • 425


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

IR VENEER.DAT THICK I R G

CHART
The CHART command displays an existing Graphics file on the screen. To use it,
place a CHART command line after one or more other command lines containing
Quality Analyst functions that create Graphics files. When used with the GROUP
command, CHART produces a multichart page layout for display. The CHART
command can also be used to create simultaneous on-screen and printed output,
and to save the chart with a new name or as a graphic image file.

CHART Command Option Description


GROUP style Instructs CHART to form a multichart layout in the
specified style. Style is followed by a list of
Graphics files to include in the Group Layout. These
Graphics files must all have been produced before this
command is executed. See GROUP on page 440, for
examples and a list of layout styles.
NONE Used in place of a Graphics file name following a
GROUP command to leave part of a Group Layout
blank.
/CLOSE Closes the graphics display immediately.
/DELAY seconds Displays the chart for the specified number of
seconds before continuing the execution of the Run
file. Adding “HIDE” after [seconds] will suppress the
display of the DELAY message box, as discussed
under Executing Run Files on page 496.
/PRINT [LANDSCAPE] Causes the displayed graphics to be printed. The
printed graphics will be in portrait orientation unless
“LANDSCAPE” is included.
/CONTINUE Continues execution of the Run file without displaying
the Continue/Quit prompt.
/SAVEAS name.fmt Saves a displayed chart with a new file name or as a
graphic image file in any of several common formats:
BMP, GIF, JPG, NWG, PCX, PNG, or WMF.

Example 1: Display a graph generated by the XRS command—in this case, an


X-bar and Range chart from the variable WEIGHT in the file TEST.DAT:
XRS TEST.DAT WEIGHT X R G

426 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

CHART

Note that the default Graphics file name (GRAPHICS.NWG) need not be
specified if the CHART command follows immediately and only one chart is to be
displayed.
Example 2: Create the Graphics file WTPCAP.NWG, which contains a Process
Capability histogram of the variable WEIGHT in the file TEST.DAT, and display
it for 15 seconds:
PCAP TEST.DAT WEIGHT G WTPCAP.NWG
CHART WTPCAP.NWG /DELAY 15

Example 3: Create a 2×2 group layout of four p-charts from the variables
BUBBLES, MARKS, CRACKS, and TRIM in the file REJECTS.DAT. Note the
use of the four individual Graphics files later combined in the CHART command:
ATTRIBUT REJECTS.DAT BUBBLES P G REJ1.NWG
ATTRIBUT REJECTS.DAT MARKS P G REJ2.NWG
ATTRIBUT REJECTS.DAT CRACKS P G REJ3.NWG
ATTRIBUT REJECTS.DAT TRIM P G REJ4.NWG
CHART GROUP 2V2H REJ1.NWG REJ2.NWG REJ3.NWG REJ4.NWG

Example 4: To also print the group layout from Example 3, modify the last line:
CHART GROUP 2V2H REJ1.NWG ... REJ4.NWG /PRINT

To print the group layout in landscape orientation, modify the last line:
CHART GROUP 2V2H REJ1.NWG ... REJ4.NWG /PRINT LANDSCAPE

Example 5: Save the Graphics file WTPCAP.NWG as a JPG file named


WTFIG1.JPG:
CHART WTPCAP.NWG /SAVEAS WTFIG1.JPG

CHITEST
The CHITEST command calculates one of four types of Chi-square statistics, each
of which is appropriate for a particular type of data. Refer to the section titled Chi-
square beginning on page 344 for more details about Chi-square statistics.
The syntax of the CHITEST command line to calculate Bartlett’s Chi-square
statistic in a Run file is:
CHITEST inpfile B sampvars degfree output outfile

CHAPTER 9: Automating Procedures with Run Files • 427


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

The syntax of the CHITEST command line to calculate the Difference Among
Proportions Chi-square statistic in a Run file is:
CHITEST inpfile D posresp sampsize output outfile

The syntax of the CHITEST command line to calculate the Equal Expected
Frequencies Chi-square statistic in a Run file is:
CHITEST inpfile E obsfreq output outfile

The syntax of the CHITEST command line to calculate the Unequal Expected
Frequencies Chi-square statistic in a Run file is:
CHITEST inpfile U obsfreq expfreq output outfile

Command Element Description


inpfile the name of the input file to use
sampvars the name of the variable to use for the sample variances
degfree the name of the variable to use for the degrees of freedom
posresp the name of the variable to use for the positive responses
sampsize the name of the variable to use for the sample size
obsfreq the name of the variable to use for observed frequencies
expfreq the name of the variable to use for expected frequencies
output “W” to create a Graphics file containing a text report
outfile the name of the output file

Example 1: The command line to calculate Bartlett’s Chi-square statistic where,


in the file CHECK.DAT, the variable VARS contains sample variances and the
variable DFX contains degrees of freedom, is:
CHITEST CHECK.DAT B VARS DFX W DEFAULT.NWG

Example 2: The command line to calculate the Difference Among Proportions


Chi-square statistic, where, in the file DMAIL.DAT, the variable RETURN
contains the number of positive responses and the variable SENT contains the
sample size, is:
CHITEST DMAIL.DAT D RETURN SENT W DEFAULT.NWG

Example 3: The command line to calculate the Equal Expected Frequencies Chi-
square statistic where, in the file BINCHK.DAT, the variable COUNT contains
observed frequencies, is:

428 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

CHITEST BINCHK.DAT E COUNT W DEFAULT.NWG

Example 4: The command line to calculate the Unequal Expected Frequencies


Chi-square statistic where, in the file DISTX.DAT, the variable MEAS contains
observed frequencies and the variable THEORY contains expected frequencies, is:
CHITEST DISTX.DAT U MEAS THEORY W DEFAULT.NWG

The “W” option creates a Graphics file but does not display or print it. This is
accomplished by an additional command line containing either a “CHART” or a
“PRINT” command.

CLEANUP
With the CLEANUP Run file command, you can convert files from external
sources (other software or systems) to Quality Analyst format or vice versa.

External to Quality Analyst—E


To convert a comma-delimited file (or any of several other file formats) into the
space-delimited format required by Quality Analyst, the syntax of the Run file
command line is:
CLEANUP E inpfile charlist numcols outfile

Command Parameter Description


inpfile the name of the input Data file
charlist list the characters (without spaces) to be removed, or use
“N” for none
numcols the number of columns to check for, or
“U” to use the number of columns in the first row of the
Data file, or
“N” to perform no column check
outfile the name of the output Data (DAT) file

The parameters charlist and numcols are explained in more detail under
Importing a Comma-Separated-Value File on page 510.
Example: To convert the external file COMM6.DTX into the Quality Analyst
file CTEST.DAT, removing no characters, using the first row to determine the
number of columns, the Run file command line would be:

CHAPTER 9: Automating Procedures with Run Files • 429


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

CLEANUP E COMM6.DTX N U CTEST.DAT

Fixed-Field to Quality Analyst—F


To convert a fixed-field file into the space-delimited format required by Quality-
Analyst, the syntax of the Run file command line is:
CLEANUP F inpfile ffdfile outfile

Command Parameter Description


inpfile the name of the input file
ffdfile the name of the fixed-field-definition file
outfile the name of the output file

Before performing a fixed-field conversion from within a Run file, you must
create a Fixed-Field Definition file, as explained under Importing a Fixed-Field
File on page 512.

Quality Analyst to Comma-Delimited—S


To convert a Quality Analyst Data file into a comma-delimited file for use by
other software, the syntax of the Run file command line is:
CLEANUP S [V] inpfile outfile

Command Parameter Description


V writes variable names to the first line of the output file
inpfile the name of the input file
outfile the name of the output file

Quality Analyst to Comma-Delimited with Quotes—Q


To convert a Quality Analyst Data file into a comma-delimited file with quotation
marks around each text field, the syntax of the Run file command line is:
CLEANUP Q [V] inpfile outfile

430 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Command Parameter Description


V writes variable names to the first line of the output file
inpfile the name of the input file
outfile the name of the output file

Change Missing-Data Symbol—C


To replace the missing-data symbol in a Quality Analyst Data file with another
character or string of text, the syntax of the Run file command line is:
CLEANUP C inpfile old new

Command Parameter Description


inpfile the name of the input file
old the old missing-data symbol
new the new missing-data symbol

CLEAR
The CLEAR command clears, or “unassigns,” a Replaceable Parameter. The
syntax of the CLEAR command is:
CLEAR param

where param is the name of the Replaceable Parameter to clear.


Example: To clear the Replaceable Parameter ^FileName, the Run file
statement would be:
CLEAR ^FileName

Read more about Replaceable Parameters starting on page 484.

$COMMENT
You can add a line of text to the header lines of a chart by including a
$COMMENT command element and specifying the text as part of the chart
command. This is particularly useful in describing any filters that have been

CHAPTER 9: Automating Procedures with Run Files • 431


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

applied, since Quality Analyst does not do this automatically in Run files. The
syntax is:
$COMMENT= "comment text"

The $COMMENT and $FILTER commands must come after all other parameters
of the main command, but they can occur in any order relative to each other.
Example: To add the comment “Lot Number 2250 Only” to a chart command
that includes a filter specification, include this line in your Run file:
IR FLUID.DAT VISC I R G $FILTER="LOT M 2250" $COMMENT="Lot
Number 2250 Only"

CONNECT
The CONNECT command is used by the Database Connectivity version of
Quality Analyst to establish a connection to an external database. See Using
Database Connectivity in Run files on page 583 for details.
The syntax for the CONNECT command is:
CONNECT filename.dat

COPY
The COPY command makes a copy of a file. The syntax of the COPY command
line in a Run file is:
COPY srcfile newfile

Command Element Description


srcfile the name of the existing file to be copied
newfile the file name of the copy to create

Both arguments should include the path if necessary to locate the source or the
destination.
Example: The command lines to make a temporary copy of the ELEMENTS
Data Set are:
COPY ELEMENTS.DAT ELEMTEMP.DAT
COPY ELEMENTS.NWH ELEMTEMP.NWH

432 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

CORVAR
The CORVAR command computes the linear correlation coefficients for two or
more variables and produces a correlation matrix for all possible combinations of
the selected variables. The syntax of the CORVAR command line in a Run file is:
CORVAR inpfile vars missing output outfile

Command Element Description


inpfile the name of the input file to use
vars the names of two or more variables (separated by spaces) in
the input file that you want to analyze
missing “C” to treat missing data casewise, or
“P” to treat missing data pairwise
output “D” to create a Data (DAT) file, or
“W” to create a Graphics file containing a text report
outfile the name of the output file

Refer to the section titled Correlation on page 349 for a detailed explanation of
casewise and pairwise treatment of missing data.
Example: The command line to compute the correlation coefficients for the
variables PB, CD, ZN, HG, CR, MO, MN, and AS in the file ELEMENTS.DAT,
treating missing data casewise, and storing the results in a formatted text file is:
CORVAR ELEMENTS.DAT PB CD ZN HG CR MO MN AS C W
DEFAULT.NWG

The “W” option creates a Graphics file but does not display or print it. This is
accomplished by an additional command line containing either a “CHART” or a
“PRINT” command.

CreateNWH
The CreateNWH command lets you create a Quality Analyst Header file from
within a Run file. (See Header Files on page 9 for details.) The syntax of the
CreateNWH command line in a Run file is:
CreateNWH hfile var1 type1 var2 type2 … varn typen

OR

CHAPTER 9: Automating Procedures with Run Files • 433


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

CreateNWH hfile @paramfile

Command Element Description


hfile the name of the Header file to create
var1…varn the names of the data columns to define for this Header file.
(See Variable Name on page 36 for naming requirements.)
type1…typen the column-type codes of the correspondingly numbered
variable names. (See Data Type on page 37 for an
explanation. For subgrouped measurements, specify a
column for each measurement; see examples below.)
paramfile the name of a text file that contains at least one line (and
potentially many lines) of var and type pairs.

Example 1: The following command creates a Header file named PinWt.nwh


with a date column named DATE and a four-measurement subgroup named WT.
CreateNWH PinWt.nwh DATE D WT 1 WT 2 WT 3 WT 4

Example 2: In this example, the effect is the same but the individual column
specifications are in a text file and the Run file command specifies that file using
the “@” form of the command.
CreateNWH PinWt.nwh @NewHeader.tmp

The contents of NewHeader.tmp are:


DATE D
WT 1
WT 2
WT 3
WT 4

Notes: To specify other Data Set parameters stored in a Header file, use the
UpdateNWH command, described on page 478.
See Creating Header Files from within Run Files on page 495 for
additional information.
If you need to create a Header file that is compatible with a version of
Quality Analyst earlier than 6.1, make sure hfile uses the older “.hed”
file-name extension. Use “.nwh” to create a Header file in the newer
XML format.

434 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

CreateNWH replaces CreateHED which was used by Quality Analyst


before version 6.1. For backwards compatibility, both commands are
identical.

CUSUM
The CUSUM command creates a Graphics file that contains a Cumulative Sum
chart. The syntax of the CUSUM command line in a Run file is:
CUSUM inpfile var vgroup output [outfile]

Command Element Description


inpfile the name of the input file to use
var the name of the variable in the input file to use
vgroup subgroup for V-mask:
“1, 2, 3,…” for ordinal subgroup number
“L” for last
“N” for none
output “D” to create a Summary (SMY) file, or
“G” to create a Graphics file.
outfile the name of the output file, if applicable

Example: The command line to chart the variable THICK from the Data file
VENEER.DAT and produce the Graphics file VENEER.NWG with the V-mask
located on the 22nd subgroup is:
CUSUM VENEER.DAT THICK 22 G VENEER.NWG

With Quality Analyst, you can produce a series of CUSUM charts with the
V-mask at different positions by creating a Run file containing multiple CUSUM
commands with the same variable.
The “G” option creates a Graphics file but does not display or print the graphic.
This is accomplished by an additional command line containing either a “CHART”
or a “PRINT” command.

CHAPTER 9: Automating Procedures with Run Files • 435


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

DELETE
The DELETE command deletes a file. The syntax of the DELETE command line
in a Run file is:
DELETE filename

where filename is the name of the file to delete. Include the path to the file if
necessary to specify it.
Example: The command lines to delete a temporary copy of the ELEMENTS
Data Set might be:
DELETE ELEMTEMP.DAT
DELETE ELEMTEMP.NWH

EWMA
The EWMA command creates a Graphics file that contains an Exponentially
Weighted Moving Average chart (optionally in combination with a Range or
Standard Deviation chart). The syntax of the EWMA command line in a Run file
is:
EWMA inpfile var chart1 chart2 output [outfile]

Command Element Description


inpfile the name of the input file
var the name of the variable in the input file to use
chart1 the type of the chart:
“E” for EWMA chart
“R” for Range chart
“S” for Standard Deviation chart
chart2 the type of the second chart of a pair:
“E” for EWMA chart
“R” for Range chart
“S” for Standard Deviation chart
“N” for none
output “D” to create a Summary (SMY) file, or
“G” to create a Graphics file.
outfile the name of the output file

436 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Note: chart1 and chart2 must be different.

Example 1: To create an EWMA chart for the variable THICK in the file
VENEER.DAT, and produce a Graphics file named VENEER.NWG for later use
by the PRINT or CHART commands, the Run file command line would be:
EWMA VENEER.DAT THICK E N G VENEER.NWG

Note the mandatory “N” (for “none”) for the nonexistent second chart type.
Example 2: To create an EWMA and Range chart for the same variable, and
produce a Graphics file for later use, the Run file command line would be:
EWMA VENEER.DAT THICK E R G

In this example, the absence of the outfile parameter tells Quality Analyst to
create a Graphics file with the default name GRAPHICS.NWG.
The “G” option creates a Graphics file but does not display or print the graphic.
This is accomplished by an additional command line containing either a “CHART”
or a “PRINT” command.

EXCEPT
The EXCEPT command generates an exception report which lists information
about data that produces control-limit, rule, or specification violations. (See
Exception Reporting on page 157 for details.)
EXCEPT qxp1 [qxp2 [...qxpn]] output [outfile]

Command Element Description


qxp1...qxpn the name(s) of one or more Exception Definition files on
which to base the exception report. See Creating an
Exception Definition File on page 158 for details.
output “W” to display report in an on-screen window,
“P” to print the report (add “/PORTRAIT” or
“/LANDSCAPE” to specify orientation),
“D” to save the exception data in a Quality Analyst Data
(DAT) file (without a Header file),
“TXT” to save the report in a formatted text file,
“CSV” to save the exception data in a comma-separated-
value file, or
“XML” to save the exception data in an XML file.

CHAPTER 9: Automating Procedures with Run Files • 437


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

outfile the name of the output file, if applicable

Example 1: The command line to create an exception report based on the


settings in the Exception Definition file named Shim.qxp and display it in an on-
screen window is:
EXCEPT Shim.qxp W

Example 2: The command line to create an exception report based on the


settings in both ELEM_IR.QXP and ELEM_MR.QXP, and save the report in a
formatted text file named ElemER.txt is:
EXCEPT ELEM_IR.QXP ELEM_MR.QXP TXT "ElemER.txt"

Example 3: The command line to create an exception report based on the


settings in WEIGHTS.QXP, and print the report in landscape orientation is:
EXCEPT WEIGHTS.QXP P /LANDSCAPE

EXTRACT
With the EXTRACT Run file command, you can extract subsets from Data files
and create a new file containing the selected data. The syntax for the Run file
command line is:
EXTRACT inpfile selfile outfile

Command Parameter Description


inpfile the name of the input file
selfile the name of the Extract Definition file (see below)
outfile the name of the output file

Before executing the EXTRACT Run file command, you must create an Extract
Definition (SEL) file containing the information needed by the EXTRACT
command. Creating this file is explained under Extracting Subsets from a Data
File on page 536.
Example: To generate a file named LTNEW.DAT from the Data file
LTEX.DAT, using the Extract Definition file LTEX.SEL, the Run file command
line would be:
EXTRACT LTEX.DAT LTEX.SEL LTNEW.DAT

438 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

$FILTER
The Data Filter feature of Quality Analyst can be used in Run files to select
subsets of data. To do this, place the $FILTER command parameter at the end of a
line in the Run file that requests a chart function. You can include up to three
filters in the same chart command. The syntax is:
$FILTER="var type value [type value]" [$FILTER="..."]
[$FILTER="..."]

Command Element Description


var the name of the variable in the input file to use
type the type of filter criterion:
“L” means lower limit
“M” means match
“U” means upper limit
value the value to be matched or compared with

With the filter criterion, you can select data that either match a value (with “M”) or
fall within a range (with “L” and/or “U”). Only one boundary of a range need be
declared. Normally, the boundary values are included in the range. To exclude the
boundary values from the range, put a “>” in front of the lower limit and a “<” in
front of the upper limit.
In a single $FILTER command, the second type and value are allowable only
when you are specifying a second limit for values of the variable—that is, an
upper limit in addition to a lower limit.
The $FILTER and $COMMENT commands must come after all other parameters
of the main command, but they can occur in any order relative to each other.
Example 1: To request an Individual-and-Range chart for the variable VISC in
the file FLUID.DAT for Lot Number 2250 only (variable name LOT), include this
line in your Run file:
IR FLUID.DAT VISC I R G $FILTER="LOT M 2250"

Example 2: To request an X-bar and Standard Deviation chart for the variable
VISC in the file FLUID.DAT using only data from July 1995 (using the DATE
variable) where the value of the variable PH is greater than 7, include this line in
your Run file:

CHAPTER 9: Automating Procedures with Run Files • 439


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

XRS FLUID.DAT VISC X S G $FILTER="DATE L 7/1/95 U 7/31/95"


$FILTER="PH L >7.0"

Without the “>” in the example above, the analysis would include data where the
value of PH is greater than or equal to 7.0.

Note: To prompt users for filter criteria, use any of the Run file commands that
begin with “Ask” and end with “Filter” such as AskDateRangeFilter.

FLIP
With the FLIP Run file command, you can rotate Data files 90 degrees, turning
rows into columns and columns into rows. To rotate rows, the syntax of the Run
file command line is:
FLIP inpfile R rows D outfile

To rotate columns, the syntax of the Run file command line is:
FLIP inpfile C cols D outfile

Command Parameter Description


inpfile the name of the Quality Analyst input file
rows a list of row numbers, separated by spaces, or
“A” to rotate all rows
cols a list of column names, separated by spaces, or
“A” to rotate all columns
outfile the name of the output file

Example: To rotate the entire file TEST1.DAT by rows, producing TEST2.DAT,


the Run file command line would be:
FLIP TEST1.DAT R A D TEST2.DAT

GROUP
The GROUP command is really an optional parameter to the CHART and PRINT
commands that instructs the Run File Interpreter to form a multichart Group
Layout in a specified arrangement or “style.” The syntax of the GROUP parameter
in a Run file command line is:

440 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

GROUP style filelist

Command Parameter Description


style the style code for the desired layout (see table below)
filelist a list of Graphics files (separated by spaces), one for each
pane in the group layout. To leave a pane blank, use
“NONE” in place of the file name.

The following table lists the available layout styles and their command-line codes.

GROUP Command Option Style Codes

2V 3V 4V 5V

2H 3H 2V2H 3V2H 3V3H 4V3H

2VST 2VSB 2HSL 2HSR

The section Group Layout on page 196 discusses creating Group Layouts
interactively with the Graphics Viewer.
Example: To print two smaller charts (SAMPLE1.NWG and SAMPLE2.NWG)
over a third full-width chart (SAMPLE3.NWG), use style code “2VST”:
PRINT GROUP 2VST SAMPLE1.NWG SAMPLE2.NWG SAMPLE3.NWG

Note that the GROUP command option and the style code follow the CHART or
PRINT command immediately and come before the file names. The charts from
the specified files are placed in the specified layout left-to-right then top-to-
bottom.

CHAPTER 9: Automating Procedures with Run Files • 441


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

IR
The IR command creates a Graphics file containing an Individuals (and/or a
Range) chart. The syntax of the IR command line in a Run file is:
IR inpfile var chart1 chart2 output [outfile]

Command Element Description


inpfile the name of the input file
var the name of the variable in the input file to use
chart1 the type of the chart:
“I” for Individual chart
“R” for Range chart
chart2 the type of the second chart of a pair:
“I” for Individual chart
“R” for Range chart
“N” for none
output “D” to create a Summary (SMY) file, or
“G” to create a Graphics file.
[outfile] the name of the output file
Note: chart1 and chart2 must be different.

Example 1: To create an Individual chart for the variable THICK in the file
VENEER.DAT, and produce a Graphics file named VENEER.NWG for later use
by the PRINT or CHART commands, the Run file command line would be:
IR VENEER.DAT THICK I N G VENEER.NWG

Note the mandatory “N” (for “none”) for the nonexistent second chart type.
Example 2: To create an Individual and Range chart for the same variable, and
produce a Graphics file for later use, the Run file command line would be:
IR VENEER.DAT THICK I R G

In this example, the absence of the outfile parameter tells Quality Analyst to
create a Graphics file with the default name GRAPHICS.NWG.
The “G” option creates a Graphics file but does not display or print the graphic.
This is accomplished by an additional command line containing either a “CHART”
or a “PRINT” command.

442 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

KRUSKAL
The KRUSKAL command performs a Kruskal-Wallis test, which is a
nonparametric analysis of variance for populations where the assumptions
required by one-way ANOVA are not met. The syntax of the KRUSKAL
command line in a Run file is:
KRUSKAL inpfile vars output outfile

Command Element Description


inpfile the name of the input file to use
vars the names of two or more variables (separated by spaces) in
the input file that you want to analyze
output “W” to create a Graphics file containing a text report
outfile the name of the output file

Example: The command line to perform the Kruskal-Wallis test on the variables
SINKS, MOUNT, MARKS, TRIM, and EDGE in the file DEFECTS.DAT is:
KRUSKAL DEFECTS.DAT SINKS MOUNT MARKS TRIM EDGE W
DEFAULT.NWG

The “W” option creates a Graphics file but does not display or print it. This is
accomplished by an additional command line containing either a “CHART” or a
“PRINT” command.

MCAPREP
The MCAPREP command creates a formatted text file containing a process
capability report. The input file for this command is an intermediate file created by
an MPCAP command.

Note: You must precede a MCAPREP command with an MPCAP command


(page 447) in your Run file.

The syntax of the MCAPREP command in a Quality Analyst Run file is:
MCAPREP inpfile statlist output outfile

CHAPTER 9: Automating Procedures with Run Files • 443


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Command Element Description


inpfile the name of an intermediate file created by the MPCAP
command
statlist list of statistics, separated by spaces, to display on the
report (for example, “4 3 6 11”) See table of statistic codes
below.
output “D” to create a Data (DAT) file
“W” to create a Graphics file containing a text report
outfile the name of the output file

Example 1: To create a formatted text file named CAPREP1.NWG containing a


capability report from the intermediate file MPCAP.IDF and that includes the
mean, estimated above and below specifications, Cpk, and Ppk, the command line
is:
MCAPREP MPCAP.IDF 9 31 32 38 49 W CAPREP1.NWG

The “W” option creates a Graphics file but does not display or print it. This is
accomplished by an additional command line containing either a “CHART” or a
“PRINT” command.
Example 2: To create the same report in the form of a Data file named
CAPREP1.DAT, the command line is:
MCAPREP MPCAP.IDF 9 31 32 38 49 D CAPREP1.DAT

444 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Statistics Codes for “statlist” Parameter of MCAPREP and BOXPLOT Commands


in Numerical Order

Code Statistic Code Statistic Code Statistic


0 Page Break 21 Third Quartile 42 CPL
1 File Title 22 Lower Adjacent 43 CPU
2 Variable Name 23 Upper Adjacent 44 Zmin
3 Variable Description 24 Lower Outliers 45 Zusl
4 Breakdown Variable 25 Upper Outliers 46 Zlsl
5 Breakdown Type 26 Geary’s 47 Cpk aiag
6 Breakdown 27 Geary’s significance 48 Cp aiag
7 Distribution 28 Target 49 Ppk
8 Number of Samples 29 LSL 50 Pp
9 Mean 30 USL 51 Cpk Confidence Limit
10 Standard Deviation 31 Est. Below LSL 52 Cp Confidence Limit
11 Skewness 32 Est. Above USL 53 Cpm Confidence Limit
12 Kurtosis 33 Est. Outside Specifications 54 Cpk (aiag) Confidence Limit
13 Capability Sigma 34 Actual Below LSL 55 Cp (aiag) Confidence Limit
14 Capability Distribution 35 Actual Above USL 56 Pp Confidence Limit
15 Lower Capability 36 Actual Outside 57 Ppk Confidence Limit
Specifications
16 Upper Capability 37 Cpm 58 Confidence Level
17 Minimum 38 Cpk 59 In The Box
18 Maximum 39 k 60 Tz
19 Median 40 Cp 61 CAMcp
20 First Quartile 41 CR% 62 CAMcpk
Note: An alphabetically ordered version of this table is on page 425.

MERGE
With the MERGE Run file command, you can insert, delete, or extract rows or
columns from a file. You can also extract or replace an entire block from within a
file and merge files in any orientation.
You specify the MERGE operation by including an operation number in the
command line with other parameters appropriate for the operation. The following
table lists the operation numbers, the operation, and the command syntax for that
operation.

CHAPTER 9: Automating Procedures with Run Files • 445


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Syntax for MERGE Operations in Run files

Operation
Operation Command Syntax
Number
1 Extract Rows MERGE inpfile 1 begrow endrow outfile
2 Extract MERGE inpfile 2 begcol endcol outfile
Columns
3 Extract a MERGE inpfile 3 begrow endrow begcol endcol outfile
Block
4 Delete Rows MERGE inpfile 4 begrow endrow output [outfile]
5 Delete MERGE inpfile 5 begcol endcol output [outfile]
Columns
6 Insert Rows MERGE inpfile 6 insfile begrow output [outfile]
7 Insert MERGE inpfile 7 insfile begcol output [outfile]
Columns
8 Replace a MERGE inpfile 8 replfile begrow begcol output
Block [outfile]

The command parameters and meanings are as follows:

Command Parameter Description


inpfile the name of the input file
begrow when extracting or deleting rows:
the number of the beginning row
when inserting rows:
the number of the beginning row, or
“B” for beginning, or
“E” for end
begcol when extracting or deleting columns:
the number of the beginning column
when inserting columns:
the number of the beginning column, or
“B” for beginning, or
“E” for end
endrow the number of the ending row, or
“L” for last.
endcol the number of the ending column, or

446 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

“L” for last.


insfile the name of the insertion file
replfile the name of the replacement file
output “C” to create a new file (outfile required), or
“O” to overwrite the original input file.
outfile the name of the output file, if applicable

Example: To insert the file PART2.DAT at the right side of PART1.DAT


(operation 7, “insert columns”), and create a new file named OUT.DAT, the Run
file command would be:
MERGE PART1.DAT 7 PART2.DAT E C OUT.DAT

MPCAP
The MPCAP command prepares an intermediate file for use by the BOXPLOT
(page 423) and MCAPREP (page 443) Run file commands. The syntax of the
MPCAP command line in a Run file is:
MPCAP inpfile vars bkdntype [bkdncol] [bkdnsort] [bkdnint]
output outfile

Command Element Description


inpfile the name of the input Data (DAT) file
vars the names of one or more variables in the input file to use
bkdntype the type of breakdown to apply to the data:
“B” to break down by a data column
“D” to break down by a date column
“N” for no breakdown
bkdncol the name of the data column by which to break down the
data (omit parameter if no break down)
bkdnsort “S” to sort by breakdown column
“U” to not sort by breakdown column
(omit parameter unless bkdntype is B)

CHAPTER 9: Automating Procedures with Run Files • 447


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

bkdnint interval of a breakdown by date:


“DAY” for daily breakdown
“WEEKS” for weekly, beginning on Sundays
“WEEKM” for weekly, beginning on Mondays
“MONTH” for monthly
(omit parameter unless bkdntype is D)
output “A” to append information to the output file
“C” to create a new output file
outfile the name of the output file

The “A” option for output lets you execute several MPCAP commands on
different Data files and include them all in a single report. Be sure to use the “C”
option on the first MPCAP command in the series.
Example 1: The following command line creates an intermediate file named
DXSHIFT.TMP containing process capability information on the variable
DIAMETER in the file DIAM.DAT. The information is broken down and sorted
by the variable SHIFT.
MPCAP DIAM.DAT DIAMETER B SHIFT S C DXSHIFT.TMP

Because of the “C” parameter, if a file named DXSHIFT.TMP existed, it would be


overwritten.
Example 2: The following command line creates an intermediate file named
DXMONTH.TMP containing process capability information on the variable
DIAMETER in the file DIAM.DAT. The information is broken down by the
variable DATE and grouped by month..
MPCAP DIAM.DAT DIAMETER D DATE MONTH C DXMONTH.TMP

MR
The MR command creates a Graphics file containing a Median or
Median/Individual chart (and/or a Range chart). The syntax of the MR command
line in a Run file is:
MR inpfile var chart1 chart2 output [outfile]

Command Element Description


inpfile the name of the input file

448 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

var the name of the variable in the input file to use


chart1 the type of the chart:
“M” for Median chart
“R” for Range chart
“MI” for Median/Individual chart
chart2 the type of the second chart of a pair:
“M” for Median chart
“R” for Range chart
“MI” for Median/Individual chart
“N” for none
output “D” to create a Summary (SMY) file, or
“G” to create a Graphics file.
outfile the name of the output file, if applicable
Note: chart1 and chart2 must be different.

Example 1: To create a Median chart for the variable THICK in the file
VENEER.DAT, and produce a Graphics file named VENEER.NWG for later use
by the PRINT or CHART commands, the Run file command line would be:
MR VENEER.DAT THICK M N G VENEER.NWG

Note the mandatory “N” (for “none”) for the nonexistent second chart type.
Example 2: To create a Median/Individuals and a Range chart for the same
variable, and produce a Graphics file for later use, the Run file command line
would be:
MR VENEER.DAT THICK MI R G

In this example, the absence of the outfile parameter tells Quality Analyst to
create a Graphics file with the default name GRAPHICS.NWG.
The “G” option creates a Graphics file but does not display or print the graphic.
This is accomplished by an additional command line containing either a “CHART”
or a “PRINT” command.

MSORT
With the MSORT (for multikey sort) Run file command, you can sort a Data file
based on one or more columns of alpha, numeric, time, or DateTime data. You can
sort in either ascending or descending order and you can either replace the original

CHAPTER 9: Automating Procedures with Run Files • 449


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

data with the sorted data or send the sorted data to a new file. The syntax of the
MSORT command line in a Run file is:
MSORT inpfile sortvars sortorder output [outfile]

Command Parameter Description


inpfile the name of the input file
sortvars the names of one or more variables in the input file
(separated by spaces) by which to sort the file: primary
key first, secondary key second, and so on.
sortorder “A” for ascending, or
“D” for descending
output “C” to create a new file
“S” to sort in place (overwriting original input file).
outfile the name of the output file (required if output is “C”)

Example: To generate a new file named LTSORT.DAT from the Data file
LTEX.DAT, sorted in ascending order by the variable “DATE,” the Run file
command line would be:
MSORT LTEX.DAT DATE A C LTSORT.DAT

MULTREG
With the MULTREG Run file command, you can perform a multiple linear
regression. The syntax of the MULTREG command line in a Run file is:
MULTREG inpfile depvar indvars confint resid output
[outfile]

Command Parameter Description


inpfile the name of the input file
depvar the name of the dependent variable
indvars the names of one or more independent variables
confint Confidence intervals for graphics output (see below)
resid “R” to include the residuals, or
“N” to skip them.

450 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

output “D” to create a Data (DAT) file,


“G” to create a Graphics file, or
“W” to create a Graphics file containing a text report
outfile the name of the output file, if applicable

For confint, specify “C” to include the confidence intervals at 95% based on the
individual measurements, “N” for no confidence intervals, or a number from 1 to
99 to specify the probability level percent. If you specify a number, follow it with
either “I” to base confidence intervals on the individual measurements, or “E” to
base confidence intervals on the equation. You must specify confidence intervals
even if you do not select graphics output.
Example: To perform a multiple linear regression on the dependent variable
TENSILE and the independent variables MIX, BINDER, MOISTURE, and
DWELL in the file REGTEST.DAT, and send output that includes residuals to a
Graphics file, the Run file command line would be:
MULTREG REGTEST.DAT TENSILE MIX BINDER MOISTURE DWELL C R
G

The “G” and “W” options create Graphics files but do not display or print them.
This is accomplished by an additional command line containing a “CHART” or a
“PRINT” command or both.

NEWVAR
With the NEWVAR Run file command, you can create new variables in a Data
file from calculations on existing data in the file. The syntax of the NEWVAR
command line in a Run file is:
NEWVAR inpfile vdffile output [outfile]

Command Parameter Description


inpfile the name of the input file
vdffile the name of the Variable Definition (VDF) file (see
below)
output “A” to add the variable(s) to the existing file, or
“C” to create a new file containing the new variable(s)
((outfile) required)
(outfile) the name of the output file, if applicable

CHAPTER 9: Automating Procedures with Run Files • 451


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Before executing the NEWVAR Run file command, you must create a Variable
Definition (VDF) file containing the information needed by the NEWVAR
command. Creating this file is explained under Defining Calculations for Run
files on page 538.
Example: To generate a new file named LTNEW.DAT from the Data file
LTEX.DAT, using the Variable Definition file LTEX.VDF, the Run file command
line would be:
NEWVAR LTEX.DAT LTEX.VDF C LTNEW.DAT

NORMPLOT
With the NORMPLOT Run file command, you can create a normal probability
plot for a single variable or a quantile plot for two variables.
To create a normal probability plot, the syntax of the Run file command line is:
NORMPLOT inpfile N var output [outfile]

To create a quantile plot, the syntax of the Run file command line is:
NORMPLOT inpfile Q xvar yvar output [outfile]

Command Parameter Description


inpfile the name of the input file
var the name of the variable in the input file to plot
xvar the name of an X-axis variable in the input file
yvar the name of a Y-axis variable in the input file
output “G” to create a Graphics file
outfile the name of the output file, if applicable

Example: To produce a normal probability plot using the variable THICK from
the file VENEER.DAT, and create a graphics output file with the default file
name, the Run file command line is:
NORMPLOT VENEER.DAT N THICK G

452 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

The “G” option creates a Graphics file but does not display or print the graphic.
This is accomplished by an additional command line containing either a “CHART”
or a “PRINT” command.

NoWorkingMessage
The NoWorkingMessage command tells the Run File Interpreter to stop
displaying the “Executing” message box while a Run file is running.

The syntax of the NoWorkingMessage command line in a Run file is:


NoWorkingMessage

This command can only be used to turn the message off, not on. Its effect lasts
until the Run file terminates. It has no effect on the message boxes displayed by
the PAUSE command.

PARETO
The PARETO command creates a Graphics file containing a Pareto diagram. The
PARETO command can accept either a multi-variable file or a single-variable file
and allows charts with multiple variables (multiple defects). The syntax of the
PARETO command line in a Run file is:
PARETO inpfile format vars output [outfile]

Command Parameter Description


inpfile the name of the input file
format “M” for multiple variables, or
“S” for single variable
vars the name(s) of the variable(s) to plot
output “D” to create a Data (DAT) file, or
“G” to create a Graphics file.
outfile the name of the output file, if applicable

CHAPTER 9: Automating Procedures with Run Files • 453


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Example: To create a Pareto diagram from the file NOZZLE.DAT (which


contains defect data in multiple variables) for the variables SEAL, THREADS,
WELD, and SURFACE, and send output to the Graphics file NOZZLE.NWG, the
Run file command line would be:
PARETO NOZZLE.DAT M SEAL THREADS WELD SURFACE G NOZZLE.NWG

The “G” option creates a Graphics file but does not display or print the graphic.
This is accomplished by an additional command line containing either a “CHART”
or a “PRINT” command.

ParseFileName
The ParseFileName command lets you extract the path, file name, and extension
from a full file path. The parsed components are assigned to Replaceable
Parameters. The syntax of the ParseFileName command line in a Run file is:
ParseFileName path base ext "fullname"

Command Parameter Description


path the name of the Replaceable Parameter to which the
parsed path (drive and folder branch) will be assigned.
(See Replaceable Parameters starting on page 484 for
details.)
base the name of the Replaceable Parameter to which the base
file name (without the extension) will be assigned.
ext the name of the Replaceable Parameter to which the file-
name extension will be assigned.
fullname the full path and file name to be parsed. This can be a
“hard-coded” string or the name of a Replaceable
Parameter to which the full path has been assigned earlier
in the Run file. If using a Replaceable Parameter, enclose
it in quotes to allow for path or file names that are long or
include a space.

Example 1: This Run file command line:


ParseFileName ^Dir ^Base ^Ext "c:\qa\data\BoardDef.dat"

would assign strings to Replaceable Parameter as follows:

454 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Replaceable Parameter String


^Dir c:\qa\data\
^Base BoardDef
^Ext .dat

Example 2: If the Replaceable Parameter ^fpath were set to


c:\qa\data\BoardDef.dat, then this Run file command line:
ParseFileName ^Dir ^Base ^Ext "^fpath"

would assign strings to the other Replaceable Parameter as shown above.

PAUSE
The PAUSE command pauses the Run file. The syntax is:
PAUSE [seconds] [message]

The PAUSE command may contain either, both, or no parameters.


If the PAUSE command contains no parameters, this dialog box will appear when
the PAUSE command is executed.

PAUSE dialog box

On this (and all other PAUSE dialog boxes), select Continue button to resume the
Run file, Quit to terminate the execution of the innermost Run file, if it is nested,
or Quit All to terminate the execution of all Run files including any that are nested.
If the PAUSE command includes a seconds parameter, the Run file will pause
for the specified number of seconds and then continue automatically. The PAUSE
dialog box will include a “timer.”

CHAPTER 9: Automating Procedures with Run Files • 455


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

PAUSE dialog box with a “seconds” parameter.

One of the hands on the timer will move each second. Select Continue to resume
the Run file before the programmed pause expires.
For example, to pause for 20 seconds and then continue automatically, the Run
file command line would be:
PAUSE 20

If the PAUSE command line includes a message parameter, the PAUSE dialog
box will display the message you specify. For example, this Run file command:
PAUSE Get your printer ready, then select Continue.

will display this dialog box:

PAUSE dialog box with a “message” parameter

If your PAUSE command includes both a seconds and a message parameter,


the PAUSE dialog box will include a timer and your message. For example, this
Run file command:
PAUSE 30 You have 30 seconds to get your printer ready.

will display this dialog box:

PAUSE dialog box with “seconds” and “message” parameters

456 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

PCAP
The PCAP command creates a Graphics file containing a process capability
histogram. The syntax of the PCAP command line in a Run file is:
PCAP inpfile var output [outfile]

Command Element Description


inpfile the name of the input file to use
var the name of the variable in the input file to use
output “D” to create a Data (DAT) file containing bin counts (the
number of data points represented by each bar) and
distribution estimates (the value of the distribution curve at
the midpoint of each bar), or
“G” to create a Graphics file.
outfile the name of the output file, if applicable

Example: The command line to produce a process-capability chart on the


variable PH in the file LTEX.DAT and send graphics output to the default file
(GRAPHICS.NWG) is:
PCAP LTEX.DAT PH G

The “G” option creates a Graphics file but does not display or print the graphic.
This is accomplished by an additional command line containing either a “CHART”
or a “PRINT” command.

POLREG
With the POLREG Run file command, you can fit your data, using the least-
squares method, to a polynomial equation of the form:
y = B0 + B1x + B2x2 + B3x3 + ... Bnxn
where y is the dependent variable and x is the independent variable. To perform a
polynomial regression, the syntax for the Run file command line is:
POLREG inpfile indvar depvar order confint resid output
[outfile]

CHAPTER 9: Automating Procedures with Run Files • 457


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Command Parameter Description


inpfile the name of the input file
indvar the name of the independent variable
depvar the name of the dependent variable
order the order of the polynomial (n), an integer between 1 and
20
confint Confidence intervals for graphics output (see below)
resid “R” to include the residuals, or
“N” to skip them.
output “D” to create a Data (DAT) file,
“G” to create a Graphics file, or
“W” to create a Graphics file containing a text report
outfile the name of the output file, if applicable

For confint, specify “C” to include the confidence intervals at 95% based on the
individual measurements, “N” for no confidence intervals, or a number from 1 to
99 to specify the probability level percent. If you specify a number, follow it with
either “I” to base confidence intervals on the individual measurements, or “E” to
base confidence intervals on the equation. You must specify confidence intervals
even if you do not select graphics output.
If you specify graphics output and residuals output, the resulting Graphics file will
contain the residuals plot, not the regression plot. If you want the Graphics file to
contain the regression plot, do not specify residuals output. If you want to generate
Graphics files for both the residuals and the regression, include separate POLREG
commands for each in your Run file.
Example: To perform a third-order polynomial regression with the independent
variable LOAD and dependent variable RESPONSE in the file POLYTEST.DAT,
with the regression plot in the graphics output file, the Run file command line
would be:
POLREG POLYTEST.DAT LOAD RESPONSE 3 C N G

The “G” and “W” options create Graphics files but do not display or print them.
This is accomplished by an additional command line containing a “CHART” or a
“PRINT” command or both.

458 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

PRINT
The PRINT command sends output from Graphics files to the default Windows
printer without displaying the graph on the screen. To use it, place a PRINT
command line after one or more other command lines containing Quality Analyst
functions that create Graphics files. When used with the GROUP command,
PRINT prints a multichart page layout.

PRINT Command
Description
Options
GROUP style Instructs PRINT to form a multichart layout in the specified
style. Style is followed by a list of Graphics files to
include in the Group Layout. These Graphics files must all
have been produced before this command is executed. See
GROUP on page 440, for examples and a list of layout
styles.
NONE Used in place of a Graphics file name following a GROUP
command to leave part of a Group Layout blank.
/LANDSCAPE Prints the graphics in landscape orientation. (The default is
portrait.)

Example 1: Print a graph generated by the XRS command—in this case, an


X-bar and Range chart from the variable WEIGHT in the file TEST.DAT using
the default (portrait) orientation:
XRS TEST.DAT WEIGHT X R G
PRINT

Note that the default Graphics file name (GRAPHICS.NWG) need not be
specified if the PRINT command follows immediately and only one chart is to be
displayed.
Example 2: Create the Graphics file CAPX.NWG, which contains a Process
Capability histogram of the variable WEIGHT in the file TEST.DAT, and print it
in landscape orientation:
PCAP TEST.DAT WEIGHT G CAPX.NWG
PRINT CAPX.NWG /LANDSCAPE

Example 3: Print a 2×2 group layout of four p-charts from the variables
BUBBLES, MARKS, CRACKS, and TRIM in the file REJECTS.DAT.
ATTRIBUT REJECTS.DAT BUBBLES P G REJ1.NWG

CHAPTER 9: Automating Procedures with Run Files • 459


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

ATTRIBUT REJECTS.DAT MARKS P G REJ2.NWG


ATTRIBUT REJECTS.DAT CRACKS P G REJ3.NWG
ATTRIBUT REJECTS.DAT TRIM P G REJ4.NWG
PRINT GROUP 2V2H REJ1.NWG REJ2.NWG REJ3.NWG REJ4.NWG

PROMPT
Note: The PROMPT command has been superseded by the newer and more
flexible “Ask” commands which are described beginning on page 399.

With the PROMPT Run file command, you can have your Run file pause and
request input (such as a file name, variable name, text string, or filter criterion) to
assign to a Replaceable Parameter (see Using the “$” Replaceable Parameters on
page 488). You can include a message to give the user of the Run file specific
information about the item to be specified. To prompt for user input, the syntax for
the Run file command line is:
PROMPT parameter [message]

Command Parameter Description


parameter The Replaceable Parameter to which the user’s input will
be assigned. Choices are $FILEn , $VARn, $STRINGn,
$MATCHFILTERn, $RANGEFILTERn, or
$ASKFILTERn where n is a digit from “1” to “9” or a
letter from “a” to “z.”
message The message to display in the dialog box while prompting
for user input

The PROMPT command will display a dialog box whose appearance depends on
the type of parameter requested. Here are a few examples.
This command line:
PROMPT $FILE1 Enter the name of the Data file to analyze:

will display this dialog box:

460 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

This command line:


PROMPT $VAR2 Enter the second variable to analyze:

will display this dialog box:

This command line:


PROMPT $STRINGr Enter regression type (LIN, EXP, LOG, or
POW):

will display this dialog box:

This command line:


PROMPT $MATCHFILTERd Enter the SHIFT to analyze (1, 2, 3):

will display this dialog box:

CHAPTER 9: Automating Procedures with Run Files • 461


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

This command line:


PROMPT $RANGEFILTER7 Enter the date range of the data
(MM/DD/YY):

will display this dialog box:

This command line:


PROMPT $ASKFILTER4 Enter the date(s) of the data
(MM/DD/YY):

will display this dialog box:

During the execution of the Run file, you simply enter, when prompted, the
requested value(s) and click Continue to proceed to the next Run file command. If
you select Quit, the execution of the Run file (whose name is displayed in the
recessed box labeled Run file:) will stop. If the PROMPT command is in a nested
Run file, only the innermost Run file will stop.
For an explanation of what the Run File Interpreter does with the values you enter,
see Replaceable Parameters beginning on page 484.

REDUCE
With the REDUCE Run file command, you convert a Data file containing
measurement data in subgroups into a Data file contain the average (mean or
X-bar), range, and standard deviation of each subgroup. The syntax for the Run
file command line is:
REDUCE inpfile var output [outfile]

462 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Command Parameter Description


inpfile the name of the input Data file
var the name of a variable in the input file
output “A” to append the reduced data to an existing Data file,
“C” to create a Data file containing the reduced data,
“O” to add the reduced-data variable to the original Data
file.
outfile the name of the output Data file, if applicable

Quality Analyst will automatically include description variables from the input file
in the output file.
Example: To reduce the subgrouped variable WEIGHT in the file
TOMATO.DAT, and send the output to a new Data file named
TOMATXRS.DAT, the Run file command line would be:
REDUCE TOMATO.DAT WEIGHT C TOMATXRS.DAT

REGRESS
With the REGRESS Run file command, you can compute the least-squares
coefficients of a single variable regression for the following forms of equations:
Linear: y = A + Bx
Exponential: y = A + eBx
Logarithmic: y = A + B×Ln(x)
Power Law: y = A × xB

To perform a regression analysis, the syntax for the Run file command line is:
REGRESS inpfile indvar depvar types detail resid [confint]
output [outfile]

Command Parameter Description


inpfile the name of the input file
indvar the name of the independent variable
depvar the name of the dependent variable

CHAPTER 9: Automating Procedures with Run Files • 463


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

types one or more of:


“LIN” for linear,
“EXP” for exponential,
“LOG” for logarithmic,
“POW” for power law, or
“ALL” for all four
detail “D” to include the detail data, or
“N” to skip it
resid “R” to include the residuals, or
“N” to skip them.
confint confidence intervals for graphics output (see below)
output “D” to create a Data (DAT) file,
“G” to create a Graphics file, or
“W” to create a Graphics file containing a text report
outfile the name of the output file, if applicable

For confint, specify “N” for no confidence intervals, or a number from 1 to 99


to specify the probability level percent. If you specify a number, follow it with
either “I” to base confidence intervals on the individual measurements, “E” to
base confidence intervals on the equation, or a SHELFLIFE subcommand to
request stability output.
The syntax of a SHELFLIFE subcommand is:
SHELFLIFE [limtype] limit [footer]

Command Parameter Description


[limtype] “L” (or omit) to report lower specification intercepts, or
“U” to report upper specification intercepts
limit the value of the desired specification limit
[footer] code for which intercept to display in the chart footer:
“P” for probability level intercept, or
“R” for regression line intercept, or
“A” (or omit) for both intercepts, or
“N” for none

464 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

If you omit confint, the graph will include the confidence intervals at 95%
based on the individual measurements. Confidence intervals are not displayed if
more than one regression type is selected.
If you specify graphics output and residuals output, the resulting Graphics file will
contain the residuals plot, not the regression plot. If you want the Graphics file to
contain the regression plot, do not specify residuals output. If you want to generate
Graphics files for both the residuals and the regression, include separate
REGRESS commands for each in your Run file.
Example 1: To perform linear regression on the variables LEVEL and OUTPUT
in the file LOGDATA.DAT, with the regression plot in the graphics output file,
the Run file command line would be:
REGRESS LOGDATA.DAT LEVEL OUTPUT LIN N N G

Example 2: To perform the same analysis as in Example 1, but with the residuals
plot instead of the regression plot in the graphics output file, the Run file
command line would be:
REGRESS LOGDATA.DAT LEVEL OUTPUT LIN N R G

Example 3: To perform the same analysis as in Example 1, but with text output
(including details) in the file REG1.NWG, the Run file command line would be:
REGRESS LOGDATA.DAT LEVEL OUTPUT LIN D N W REG1.NWG

Example 4: To perform all available regressions on the variables LEVEL and


OUTPUT in the file LOGDATA.DAT, with the regression plot in the graphics
output file, the Run file command line would be:
REGRESS LOGDATA.DAT LEVEL OUTPUT ALL N N G

Example 5: To perform a linear regression on the variables DAYS and RESULT


in the file TEST.DAT, using a 99% probability level and a lower specification of
250, showing both stability intercepts in the chart footer, and sending stability
results to the graphics output file, the Run file command line would be:
REGRESS TEST.DAT DAYS RESULT LIN N N 99 SHELFLIFE L 250
A G

The “G” and “W” options create Graphics files but do not display or print them.
This is accomplished by an additional command line containing a “CHART” or a
“PRINT” command or both.

CHAPTER 9: Automating Procedures with Run Files • 465


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

REM
With the REM Run file command, you can include comments in a Run file. This
lets you annotate the Run file and describe or explain other command lines. Any
line beginning with “REM” will be ignored during the execution of the Run file.
For example:
REM Create X-bar chart and print it:
XRS VENEER.DAT THICK X N G
PRINT

RENAME
The RENAME command renames a file. The syntax of the RENAME command
line in a Run file is:
RENAME oldname newname

Command Element Description


oldname the name of the existing file to be renamed
newname the new name for the file

Both arguments should include the path if necessary to specify the files.
Example: The command line to rename the default Graphics file
GRAPHICS.NWG so that it won’t be overwritten might be:
RENAME GRAPHICS.NWG WTXR.NWG

REPORT
With the REPORT Run file command, you can print all or selected columns of
Quality Analyst Data files in a format suitable for reports, summaries, and hard-
copy records. You define the format for the report in a format definition file.
The syntax for a REPORT Run file command line is:
REPORT inpfile rptfile output outfile [$PAGEWIDTH=n]

Command Parameter Description


inpfile the name of the input file

466 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

rptfile the name of the Report Format (RPT file (see below))
output “W” to create a Graphics file containing a text report
outfile the name of the output file
$PAGEWIDTH=n the number of characters per line of output

Before executing the REPORT Run file command, you must create a Report
Format file that contains the information needed by the REPORT command.
Creating this file is explained under Printing a Formatted Report on page 115.
You can control the width of a printed report by including a $PAGEWIDTH=n
parameter on the REPORT command line. Substitute the number of characters per
line of output (up to 240) for n (the default is 120).
Example: To generate a report from the Data file LTEX.DAT, using the format
definition file LTEX.RPT, and send the output to a formatted text file named
LTEX.NWG, the Run file command line would be:
REPORT LTEX.DAT LTEX.RPT W LTEX.NWG

The “W” option creates a Graphics file but does not display or print it. This is
accomplished by an additional command line containing either a “CHART” or a
“PRINT” command.

RUN
With the RUN Run file command, you can “nest” Run files. The syntax of the
command line is:
RUN filename

where filename is the name of a Run file. For example, the following Run file
command line will execute the Run file named SECOND.RUN and resume with
the next command line in the original Run file.
RUN SECOND.RUN

You can use the PROMPT command to request the name of the nested Run file
from the user. For example:
PROMPT $FILE3 Enter the name of the secondary run file:
RUN "$FILE3"

In this example, enclosing “$FILE3” in quotes in the RUN command will avoid an
error if the user enters a long file name or one that contains a space.

CHAPTER 9: Automating Procedures with Run Files • 467


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

One useful application of “nested” Run files is error recovery. If an error occurs in
a Run file, the Run file operation terminates. If an error occurs in a nested Run
file, the execution of the “parent” Run file resumes at the next command. (This is
the default behavior, which the user can set in Quality Analyst Settings.) This is
very handy if you anticipate errors (such as missing Data files or insufficient data
after filtering) and want the Run file to continue when those errors occur. In this
case, the portion of the Run file with the error potential should be “nested.”

RUNCHART
The RUNCHART command creates a Graphics file containing a run chart. The
syntax of the RUNCHART command line in a Run file is:
RUNCHART inpfile xvar yvars output [outfile]

Command Parameter Description


inpfile the name of the input file
xvar the name of a variable in the input file, or
“A” for automatic (use row number)
yvars from one to eight variable names
output “G” to create a one-chart Graphics file, or
“M” to create a multi-chart Graphics file (see below).
outfile the name of the output file, if applicable

Both the “G” and “M” options create a Graphics file. If you specify only one
Y variable, output should be “G”. If you specify more than one Y variable,
output type “G” produces a chart on which all Y variables are scaled to a single
Y axis (see example on page 168), and output type “M” produces charts on which
each Y variable is scaled to its own Y axis (see example on page 169).
Example 1: To plot the variable MOISTURE against the row number from the
Data file SAMPLE.DAT, and send output to the Graphics file SAMPLE.NWG,
the Run file command line would be:
RUNCHART SAMPLE.DAT A MOISTURE G SAMPLE.NWG

Example 2: To plot the variables MOISTURE, PROTEIN, and WEIGHT in the


file SAMPLE.DAT on a single Y axis, the Run file command line would be:
RUNCHART SAMPLE.DAT A MOISTURE PROTEIN WEIGHT G

468 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To plot them on separate Y axes, the Run file command line would be:
RUNCHART SAMPLE.DAT A MOISTURE PROTEIN WEIGHT M

The “G” and “M” options both create a Graphics file but do not display or print
them. This is accomplished by an additional command line containing either a
“CHART” or a “PRINT” command.

SAVE
The SAVE Run file command lets you save a Graphics file with a new name or as
a graphic image file in any of several common file formats. It also lets you save
several Graphics files in a Group layout. The syntax for the SAVE command in a
Run file is:
SAVE inpfile AS outfile width height

OR

SAVE GROUP style inpfiles AS outfile width height

Command Parameter Description


style the code for the desired layout arrangement of the group.
See GROUP on page 440, for examples and a list of layout
styles.
inpfile the name of the existing Graphics file
inpfiles the names of one or more existing Graphics files (separated
by spaces) to include in the Group layout
outfile the name of the output file. Use the extension to specify file
format: “BMP,” “GIF,” “JPG,” “NWG,” “PCX,” “PNG,” or
“WMF.”
width the width of the graphic image in pixels
height the height of the graphic image in pixels

If outfile has the extension NWG, width and height are ignored and may be
omitted.
Example 1: To save the chart contained in LeadMR.NWG to an 800×600-pixel
graphic image file named LeadMR.jpg, the Run file command line would be:
SAVE LeadMR.NWG AS LeadMR.jpg 800 600

CHAPTER 9: Automating Procedures with Run Files • 469


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Example 2: To save the charts contained in LeadXR.nwg, LeadMI.nwg, and


LeadPCap.nwg in a vertically stacked group of three to a Graphics file named
LeadGroup.nwg, the Run file command line would be:
SAVE GROUP 3V LeadXR.nwg LeadMI.nwg LeadPCap.nwg AS
LeadMR.nwg

See also: the /SAVEAS parameter of the CHART command on page 426.

SCATTER
With the SCATTER Run file command, you can create an automatically-scaled
scatter diagram of one X-axis variable and up to eight Y-axis variables in a Data
file. The syntax for the SCATTER command line in a Run file is:
SCATTER inpfile xvar yvars output [outfile]

Command Parameter Description


inpfile the name of the input file
xvar the name of an X-axis variable in the input file
yvar the names of up to eight Y-axis variables
output “G” to create a Graphics file
outfile the name of the output file, if applicable

Example: To plot the variables PH and MOISTURE against the variable CONC
from the Data file SAMPLE.DAT, and send output to the Graphics file
SAMPLE.NWG, the Run file command line would be:
SCATTER SAMPLE.DAT CONC PH MOISTURE G SAMPLE.NWG

The “G” option creates a Graphics file but does not display or print the graphic.
This is accomplished by an additional command line containing either a “CHART”
or a “PRINT” command.

SET
The SET command assigns a value to a Replaceable Parameter. The syntax for the
SET command is:
SET param = "value"

470 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Command Element Description


param the name of the Replaceable Parameter that the value will
be assigned to (See Replaceable Parameters starting on
page 484 for naming requirements.)
value a legal value for the Replaceable Parameter

Read more about Replaceable Parameters starting on page 484.


Example 1: In the following Run file statements:
SET ^File1 = "WEIGHT.DAT"
SET ^Var1 = "WT"
XRS ^File1 ^Var1 X R G

the first two assign “WEIGHT.DAT” and “WT” to the Replaceable Parameters
“^File1” and “^Var1” respectively so that the third executes as:
XRS WEIGHT.DAT WT X R G

The following examples illustrate situations where using the SET command
(rather than “hard coding” the parameters) is particularly useful.
Example 2: Creating and maintaining a Run file with repeated commands can be
easier using the SET command. In this example the ATTRIBUT and CHART
commands are all identical but they produce different results because of the SET
commands.
SET ^InFile = "DEFECTS.DAT"
SET ^Var = "FOREIGN"
ATTRIBUT ^InFile ^Var U G
CHART
SET ^Var = "BUBBLES"
ATTRIBUT ^InFile ^Var U G
CHART
SET ^Var = "SINKS"
ATTRIBUT ^InFile ^Var U G
CHART
SET ^Var = "MOUNT"
ATTRIBUT ^InFile ^Var U G
CHART
SET ^Var = "MARKS"
ATTRIBUT ^InFile ^Var U G
CHART

CHAPTER 9: Automating Procedures with Run Files • 471


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Example 3: In the following Run file statements, a single, multipurpose, nested


Run file is called using different parameters each time:
SET ^File1 = "CANDY.DAT"
SET ^Var1 = "WEIGHT"
RUN XRS.RUN
SET ^Var1 = "LENGTH"
RUN XRS.RUN
SET ^Var1 = "WIDTH"
RUN XRS.RUN

To clear, or “unassign,” a Replaceable Parameter, use the CLEAR command


(page 431).

SetCurrentDir
The SetCurrentDir Run file command lets you specify a file path that the Run File
Interpreter will use as the current directory with file names that do not have paths
specified. The syntax is:
SetCurrentDir "path"

where path is the file path. The path should be enclosed in double quotes,
especially if the path includes folder names that are long or contain spaces.
Examples:
SetCurrentDir "G:\LSmith\QA\Data"
SetCurrentDir "D:\Quality Analyst\Data"
SetCurrentDir "S:\QA\DATA"

SHELL
With the SHELL Run file command, you can execute a DOS or Windows
command from within a Run file as if from a Windows command line or a DOS
system prompt. After the command executes, the Run file resumes with the next
command line. The syntax is:
SHELL command [parameters]

Command Parameter Description


command the command you want to execute from within your Run
file.

472 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

parameters command-line parameters, if any, to pass to the command

The SHELL command can be particularly useful if the purpose of your Run file is
to integrate Quality Analyst with other applications. The command you specify on
the SHELL command line can, among other things, call a batch file, or execute
another application.
Example: To run a third-party program named DATAMSTR.EXE, the command
line would be:
SHELL DATAMSTR.EXE

Use SHELL only if you are familiar with its operation. It will only work on
systems using DOS version 3.0 or higher.

Notes: The SHELL command can be unreliable on systems running


Windows 2000 or later.
To copy, delete, or rename files, use COPY (page 432), DELETE
(page 436), and RENAME (page 466).

SINGCOL
With the SINGCOL Run file command, you can convert a single column of data
into a Data file containing multiple columns of data, and vice versa.
To convert several data columns to a single column, the syntax for the command
line is:
SINGCOL inpfile T vars desc [descvars] D outfile

To convert from a single column of data into multiple columns, the syntax for the
command line is:
SINGCOL inpfile F var size desc [descvars] D outfile

Command Parameter Description


inpfile the name of the input file
var, vars the name(s) of the variable(s) in the input file to convert
size the number of observations per sample (that is, the number
of columns you are converting the single data column into)

CHAPTER 9: Automating Procedures with Run Files • 473


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

desc “D” to include description variables, or


“N” not to include description variables
descvars the name(s) of the description variable(s)
outfile the name of the output file

Example: To convert the column WEIGHT in the input file TEST1.DAT to four
columns in the output file TEST2.DAT, and include the description variables
DATE and LOTNUM, the Run file command line would be:
SINGCOL TEST1.DAT F WEIGHT 4 D DATE LOTNUM D TEST2.DAT

SUMMARY
Note: The SUMMARY command has been superseded by the newer EXCEPT
command (page 437) which is more flexible and capable.

With the SUMMARY Run file command, you can summarize the output of a
Quality Analyst chart command. You can generate either a list of out-of-control
points in the file, or a summary or tabulation of out-of-control points based on
user-selected description fields. To generate a summary report, the syntax of the
Run file command line is:
SUMMARY inpfile type output outfile

Command Parameter Description


inpfile the name of the Summary input file
type “L” for list,
“S” for summary, or
“B” for both
output “W” to create a Graphics file containing a text report
outfile the name of the output file

The inpfile for a SUMMARY command is the output file from a control chart
command with the “D” output option. You must therefore precede a SUMMARY
command with a chart command that includes the “D” output option and a
Summary (SMY) file name.

474 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Example: To generate both list output and summary output from the summary
file VENEER.SMY, and send the output to a formatted text file named
VENEER.NWG, the Run file command line would be:
SUMMARY VENEER.SMY B W VENEER.NWG

The “W” option creates a Graphics file but does not display or print it. This is
accomplished by an additional command line containing either a “CHART” or a
“PRINT” command.

SUMSTAT
With the SUMSTAT Run file command, you can compute “sample” or
“population” descriptive statistics for one or more variables in a Data file. To
compute descriptive statistics, the syntax for the Run file command line is:
SUMSTAT inpfile vars type output outfile

Command Parameter Description


inpfile the name of the input file
vars the names of the variables to analyze
type “S” for sample data, or
“P” for population data.
output “D” to create a Data (DAT) file, or
“W” to create a Graphics file containing a text report
outfile the name of the output file

Example: To calculate “sample” statistics for the variable WEIGHT in the file
TOMATO.DAT, and send output to a formatted text file named TOMATO.NWG,
the Run file command line would be:
SUMSTAT TOMATO.DAT WEIGHT S W TOMATO.NWG

The “W” option creates a Graphics file but does not display or print it. This is
accomplished by an additional command line containing either a “CHART” or a
“PRINT” command.

CHAPTER 9: Automating Procedures with Run Files • 475


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

SYSTEM
The SYSTEM command stops the execution of the Run file and the Run File
Interpreter, returning you to Windows. The syntax is:
SYSTEM

TITLE
With the TITLE Run file command, you define a title for the Run file. Any text
following this command will be used as the title. This command must be the first
line in the Run file. For example:
TITLE Northwest Manufacturing Co.

Run file titles are displayed next to the Run file names in the Execute Run file
dialog box.

TTESTS
The TTESTS command calculates one of four types of t-statistics. Refer to the
section titled t-Statistics beginning on page 356 for a detailed explanation of
t-statistics.
The syntax of the TTESTS command line to calculate an ordinary unpaired
sample t-statistic in a Run file is:
TTESTS inpfile U var1 var2 samevari hypmeandiff output
outfile

The syntax of the TTESTS command line to calculate a paired sample t-statistic
in a Run file is:
TTESTS inpfile P var1 var2 hypmeandiff output outfile

The syntax of the TTESTS command line to calculate a single sample t-statistic
in a Run file is:
TTESTS inpfile S var hyppopmean popvari output outfile

The syntax of the TTESTS command line to calculate the Pearson Product
Moment Correlation in a Run file is:
TTESTS inpfile M var1 var2 output outfile

476 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Command Element Description


inpfile the name of the input file to use
var1 the name of the variable to use for the first sample set
var2 the name of the variable to use for the second sample set
samevari “Y” if the variables have the same variance, or
“N” if not.
hypmeandiff the hypothesized mean difference between the two sample
sets
var the name of the variable with a known population mean
hyppopmean the hypothesized population mean of the variable
popvari the population variance:
enter a number, if known, or
“U” if unknown
output “W” to create a Graphics file containing a text report
outfile the name of the output file

Example 1: The command line to calculate an ordinary unpaired sample


t-statistic on the variables TORQUE1 and TORQUE2 in the file CAPS.DAT,
where both variables have the same variance and the hypothesized mean
difference is 0.0, is:
TTESTS CAPS.DAT U TORQUE1 TORQUE2 Y 0 W DEFAULT.NWG

Example 2: The command line to calculate a paired sample t-statistic on the


variables INIT and DUP in the file CALCIUM.DAT where the hypothesized mean
difference is 0.0, is:
TTESTS CALCIUM.DAT P INIT DUP 0 W DEFAULT.NWG

Example 3: The command line to calculate a single sample t-statistic on the


variable VISCOS in the file NP7.DAT where the hypothesized population mean is
1300 and the population variance is unknown, is:
TTESTS NP7.DAT S VISCOS 1300 U W DEFAULT.NWG

Example 4: The command line to calculate the Pearson Product Moment


Correlation on the variables SIEVE1 and SIEVE2 in the file SHAKER.DAT is:
TTESTS SHAKER.DAT M SIEVE1 SIEVE2 W DEFAULT.NWG

CHAPTER 9: Automating Procedures with Run Files • 477


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

The “W” option creates a Graphics file but does not display or print it. This is
accomplished by an additional command line containing either a “CHART” or a
“PRINT” command.

UpdateNWH
The UpdateNWH command lets you modify certain parameters in a Quality
Analyst Header file from within a Run file. (See Header Files on page 9 for
details.) The syntax of the UpdateNWH command line in a Run file is:
UpdateNWH hfile var param value

OR

UpdateNWH hfile @paramfile

Command Element Description


hfile the name of the Header file to update
var the name of a variable in the Header file whose parameter
you want to change. Use “<FILEWIDE>” for parameters
that apply to the entire file.
param the name of the parameter you want to change:
“USL” for upper specification limit (see page 46),
“LSL” for lower specification limit (see page 46),
“TARGET” for target specification (see page 46),
“TITLE” for the file title (use with <FILEWIDE>, see
page 278),
“DESCRIPTION” for the description of a variable (see
page 46),
“WIDTH” for display width of a data column in the
Editor (see page 57),
“MASK” for the input mask for a variable (see page 56),
“#” for code number of any legal Header file parameter.
(This is an advanced feature; contact NWA for details.)
value the new value for the parameter.
paramfile the name of a text file that contains at least one line (and
potentially many lines) of var, param, and value
arguments.

478 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Example 1: The following commands make several changes to the WEIGHT


variable and two file-wide changes to the Header file PIN.NWH.
UPDATENWH PIN.NWH WEIGHT USL 75.5
UPDATENWH PIN.NWH WEIGHT LSL 65.5
UPDATENWH PIN.NWH WEIGHT TARGET 70.5
UPDATENWH PIN.NWH WEIGHT 3 5 4
UPDATENWH PIN.NWH <FILEWIDE> TITLE Pin Production
UPDATENWH PIN.NWH <FILEWIDE> 2 DATE
UPDATENWH PIN.NWH WEIGHT DESCRIPTION Pin weight (g)
UPDATENWH PIN.NWH WEIGHT MASK ##.#

Example 2: In this example, the effect is the same but the individual command
elements are in a text file and the Run file command specifies that file using the
“@” form of the command.
UPDATENWH PIN.NWH @UpdParam.tmp

The contents of UpdParam.tmp are:


WEIGHT USL 75.5
WEIGHT LSL 65.5
WEIGHT TARGET 70.5
WEIGHT 3 5 4
<FILEWIDE> TITLE Pin Production
<FILEWIDE> 2 DATE
WEIGHT DESCRIPTION Pin Weight (g)
WEIGHT MASK ##.#

Note: To create a Header file from within a Run file use the CreateNWH
command, described on page 433.
See Creating Header Files from within Run Files on page 495 for
additional information.
If you need to update a Header file that is compatible with a version of
Quality Analyst earlier than 6.1, make sure hfile uses the older “.hed”
file-name extension. Use “.nwh” to update a Header file in the newer
XML format.
UpdateNWH replaces UpdateHED which was used by Quality Analyst
before version 6.1. For backwards compatibility, both commands are
identical.

CHAPTER 9: Automating Procedures with Run Files • 479


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

USETEMPDIR
The USETEMPDIR command creates a temporary directory (folder) on your local
PC and makes that directory the current Quality Analyst directory. The syntax for
the USETEMPDIR command line in a Run file is:
USETEMPDIR [ON]|OFF

USETEMPDIR ON ( or just USETEMPDIR) creates and enables the temporary


directory. USETEMPDIR OFF restores the current Quality Analyst directory to its
previous value.
USETEMPDIR is intended to be used when more than one Quality Analyst user
might access the same Connectivity Data Set stored in a shared location. This
command makes sure that all such users are working with their own local copies
of the retrieved data.
When USETEMPDIR is ON, the CONNECT command copies the Header file
from the old current directory into the new temporary directory, then retrieves
data from the database into a Data (DAT) file in the temporary directory. All
charting commands in the Run file look in the current directory, which has been
changed to the new temporary directory.

Note If the file name in the CONNECT command or any charting command
includes the full path to the Data file, Quality Analyst will use the full
path, overriding USETEMPDIR.

Example: The Run file listed below and the Data Set EXTDATA.DAT and
EXTDATA.NWH are located in a shared directory, G:\QA\DATA\.
USETEMPDIR ON
CONNECT EXTDATA.DAT
PCAP EXTDATA.DAT VAR G 1.NWG
CHART 1.NWG

Here’s what happens as each command line is executed:

Command Line Action


USETEMPDIR ON 1. Create the directory C:\WINDOWS\TEMP\QA\.†
2. Make C:\WINDOWS\TEMP\QA\ the current
directory.
CONNECT EXTDATA.DAT 3. Copy EXTDATA.NWH from G:\QA\DATA\ to
C:\WINDOWS\TEMP\QA\.

480 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

4. Open
C:\WINDOWS\TEMP\QA\EXTDATA.NWH and
retrieve external data into
C:\WINDOWS\TEMP\QA\EXTDATA.DAT.
PCAP EXTDATA.DAT VAR 5. Create a Graphics file
G 1.NWG (C:\WINDOWS\TEMP\1.NWG‡) containing a
process-capability histogram of the variable VAR
from C:\WINDOWS\TEMP\QA\EXTDATA.DAT.
CHART 1.NWG 6. Display the chart in the file
C:\WINDOWS\TEMP\1.NWG.
[Run file ends] 7. Delete all files in C:\WINDOWS\TEMP\QA\ then
delete the directory.
† Assuming the Quality Analyst Temporary File Path is C:\WINDOWS\TEMP\.
‡ Assuming the Quality Analyst Graphics and Text File Path is C:\WINDOWS\TEMP\.
See File Paths and Permissions on page 269 for details.

WALDRUN
The WALDRUN command performs a Wald-Wolfowitz test to determine the
degree of randomness in a data series. Refer to the section titled Wald-Wolfowitz
Runs Test on page 364 for a detailed explanation of the Wald-Wolfowitz test.
The syntax of the WALDRUN command line in a Run file is:
WALDRUN inpfile var conditions output outfile

Command Parameter Description


inpfile the name of the input file
var the name of the variable to test for randomness
conditions two criteria for dividing your data (see below)
output “W” to create a Graphics file containing a text report
outfile the name of the output file

For conditions, enter two conditions for dividing your data into two mutually
exclusive sets. Each condition consists of a comparison operator (from the table
below) and a value. For example, to divide your data into sets containing values
that are less than 134 and greater than 134, condition would be:

CHAPTER 9: Automating Procedures with Run Files • 481


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

.LT. 134 .GT. 134

Comparison Operators

Operator Meaning
.LT. less than
.GT. greater than
.LE. less than or equal to
.GE. greater than or equal to

Example: The command line to perform the Wald-Wolfowitz test on the variable
VISCOS in the file NP7.DAT where values of VISCOS are divided into those less
than 1300 and those greater than or equal to 1300, is:
WALDRUN NP7.DAT VISCOS .LT. 1300 .GE. 1300 W DEFAULT.NWG

The “W” option creates a Graphics file but does not display or print it. This is
accomplished by an additional command line containing either a “CHART” or a
“PRINT” command.

WEIBULL
With the WEIBULL Run file command, you can fit the Weibull or the exponential
probability distribution to data and produce a probability plot. The syntax for the
Run file command line is:
WEIBULL inpfile var output [outfile]

Command Parameter Description


inpfile the name of the input file
var the name of the variable to fit
output “G” to create a Graphics file
outfile the name of the output file, if applicable

Example: To use the variable LIFE from the file FAN.DAT, and create a
graphics output file, the Run file command would be:

482 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

WEIBULL FAN.DAT LIFE G

The “G” option creates a Graphics file but does not display or print the graphic.
This is accomplished by an additional command line containing either a “CHART”
or a “PRINT” command.

XRS
The XRS command creates a Graphics file containing an X-bar, X-bar and Range,
or X-bar and Standard Deviation chart. The syntax of the XRS command line in a
Run file is:
XRS inpfile var chart1 chart2 output [outfile]

Command Element Description


inpfile the name of the input file
var the name of the variable in the input file to use
chart1 the type of the chart:
“X” for X-bar chart
“R” for Range chart
“S” for Standard Deviation chart
chart2 the type of the second chart of a pair:
“X” for X-bar chart
“R” for Range chart
“S” for Standard Deviation chart
“N” for none
output “D” to create a Summary (SMY) file, or
“G” to create a Graphics file.
outfile the name of the output file
Note: chart1 and chart2 must be different.

Example 1: To create an X-bar chart for the variable THICK in the file
VENEER.DAT, and produce a Graphics file named VENEER.NWG for later use
by the PRINT or CHART commands, the Run file command line would be:
XRS VENEER.DAT THICK X N G VENEER.NWG

Note the mandatory “N” (for “none”) for the nonexistent second chart type.

CHAPTER 9: Automating Procedures with Run Files • 483


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Example 2: To create an X-bar and Range chart for the same variable, and
produce a Graphics file for later use, the Run file command line would be:
XRS VENEER.DAT THICK X R G

In this example, the absence of the (outfile) parameter tells Quality Analyst to
create a Graphics file with the default name GRAPHICS.NWG.
The “G” option creates a Graphics file but does not display or print the graphic.
This is accomplished by an additional command line containing either a “CHART”
or a “PRINT” command.

Replaceable Parameters
Introduction
A Quality Analyst Run file may contain Replaceable Parameters wherever certain
parameters (such as file names, variable names, or filter criteria) are normally
expected.

Replaceable parameters have several uses:


You can create generic Run files that perform a specific set of tasks, but on
different files or variables, and using different filter criteria on each run.
Users can be prompted for values to be assigned to Replaceable Parameters at
run time, providing flexible SQC charting and reporting capabilities for those
who are unfamiliar with Quality Analyst.
A set of Run file command lines that create charts can be repeated throughout
a Run file, each preceded by a different set of command lines that assign
different values to the Replaceable Parameters before the charting commands
are executed. This makes it easier to create Run files that perform repetitive
operations.
You can “call” a Run file from within other programs using different
command lines that assign different values to Replaceable Parameters. This
provides more flexibility in designing integrated SQC systems.
Users can be prompted at run time for Replaceable Parameters that will be
used to modify queries to databases. (See Using Replaceable Parameters
with Filter Criteria in SQL Statements on page 573 for more information.)

Once a user has assigned a value to a Replaceable Parameter, the Run File
Interpreter will substitute that value for each occurrence of the parameter in the
Run file.

484 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

There are two types of Replaceable Parameters:


Replaceable parameters beginning with a caret (“^”) are more flexible and
user-friendly. When used in a Run file with an appropriate “Ask” command,
Quality Analyst prompts the user for input using labeling and data-checking
appropriate for the type of data being requested. Several forms of this type of
Replaceable Parameter can also be used to modify database queries before
they are performed. (See Using Replaceable Parameters with Filter Criteria
in SQL Statements on page 573 for more information.) The “^” Replaceable
Parameters are a more recent addition to Quality Analyst.
Replaceable parameters beginning with a dollar sign (“$”) are an older form
and do not provide as much flexibility as “^” Replaceable Parameters. They
have been retained to provide backward compatibility. “$” Replaceable
Parameters prompt automatically for user input if the Run File Interpreter
encounters one that has not been assigned a value.

The following discussion mainly addresses the “^” Replaceable Parameters. The
“$” Replaceable Parameters are discussed under Using the “$” Replaceable
Parameters beginning on page 488.

Naming Replaceable Parameters


Replaceable parameters begin with the caret character (“^”) and may contain
alphabetic characters (“A”–“Z” or “a”–“z”), digits (“0”–“9”), and the underscore
(“_”). (The characters “:” and “!” are also used in Replaceable Parameters used for
querying Connectivity Data Sets.) Example legal names for Replaceable
Parameters are:
^ProductCode
^VarName
^Prompt_Text
^Date!MatchFilter
^WT:3!ToFilter
Replaceable parameter names are not case-sensitive. That is, Quality Analyst will
treat ^ProductCode and ^PRODUCTCODE as the same Replaceable Parameter.
Spaces are not allowed in Replaceable Parameter names; use the underscore
instead. (Note that Quality Analyst will treat ^ProductCode and
^Product_Code as different Replaceable Parameters.)

CHAPTER 9: Automating Procedures with Run Files • 485


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Assigning Values to Replaceable Parameters


There are three ways you can assign a value to a Replaceable Parameter in a Run
file:
by having Quality Analyst prompt you for it at run time,
by assigning it within a Run file, or
by assigning it on the command line for the Run File Interpreter.

Prompting for Replaceable Parameters at Run Time


To have Quality Analyst prompt you for values of Replaceable Parameters when
you execute a Run file, you should use any of the “Ask” Run file commands (such
as AskDateRange or AskInteger) which are described starting on page 399.

Setting Replaceable Parameters within Run Files


To assign values to Replaceable Parameters within a Run file, use the SET Run
file command. See SET on page 470 for details.

Passing Replaceable Parameters from the Command


Line
Assigning values to Replaceable Parameters on the command line can be useful
when running the Quality Analyst Run File Interpreter:
from a program shortcut, or
from within another program.

See Also: Executing Run Files from a Program Shortcut, p. 498


Executing Run Files from Other Programs, p. 502

To assign a value to a Replaceable Parameter on the command line for the Run
File Interpreter you must first include a Replaceable Parameter in the Run file. For
example, let’s say the Run file WTTASK.RUN contains the following statement.
XRS ^File1 WT X R G

“^File1” in this statement is the Replaceable Parameter. When the command


line:

486 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

QARFI.EXE $RUN=WTTASK.RUN ^File1="WEIGHT.DAT"

is executed, “^File1” in the Run file statement will be replaced with


“WEIGHT.DAT” from the command line and the statement will be executed as:
XRS WEIGHT.DAT WT X R G

You can include more than one Replaceable-Parameter assignment in a command


line. For example, let’s say WTTASK.RUN contains the following statement.
XRS ^DatFile ^XRvar X R G

When the command line:


QARFI.EXE $RUN=WTTASK.RUN ^DatFile="WEIGHT.DAT"
^XRvar="WT"

is executed, “^DatFile” in the Run file statement will be replaced with


“WEIGHT.DAT,” “^XRvar” will be replaced with “WT,” and the statement will be
executed as:
XRS WEIGHT.DAT WT X R G

See Also: Executing Run Files Using a Command Line, p. 497

Using Replaceable Parameters for File and Path


Names
Whenever you use a Replaceable Parameter to represent a file name or a file path,
you should enclose the parameter in quotes in the command line. Then, if a file
name or path that is long or contains a space gets assigned to the parameter—
whether by a SET command, a user prompt, or a command-line assignment—it
will still be interpreted correctly. For example, look at this Run file command:
XRS ^File1 WT X R G

If the Run file that contains this line is executed from this command line:
QARFI.EXE $RUN=WTTASK.RUN ^File1="Ring Weight.dat"

then “^File1” in the Run file statement will be replaced with


“Ring Weight.dat” from the command line and the statement will be executed
as:

CHAPTER 9: Automating Procedures with Run Files • 487


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

XRS Ring Weight.dat WT X R G

The Run File Interpreter will try to interpret “Ring” as the file name and
“Weight.dat” as the variable and the remaining parameters in the statement will
be off by one position. This will produce an error message.
To avoid this, place the Replaceable Parameter in quotes:
XRS "^File1" WT X R G

In this case, that same Run file command line will cause this statement to be
interpreted as:
XRS "Ring Weight.dat" WT X R G

and it will execute correctly because Quality Analyst will interpret everything
within the quotes as the file name.

Using the “$” Replaceable Parameters


Quality Analyst recognizes six types of “$” Replaceable Parameters as shown in
this table.

“$” Replaceable Parameters

Parameter Name Description


$FILEn File name
$VARn Variable name
$STRINGn Text string used for labels or miscellaneous parameters
$RANGEFILTERn Range filter criteria
$MATCHFILTERn Match filter criteria
$ASKFILTERn User-selected (match or range) filter type and criteria

The FILTER parameters let you specify the [type] and [value] elements of
the $FILTER command option (described on page 439) at run time. (See the
example below.)
Quality Analyst lets a single Run file contains up to 35 “$” Replaceable
Parameters of each type by allowing the “n” in each parameter name to be a digit
from “1” to “9” or a letter from “A” to “Z.” Legal Replaceable Parameters
include $FILE1, $VAR9, $STRINGA, and $RANGEFILTERZ.

488 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Note: The $STRINGn parameter accepts all text entered by the Run file user as
is, and is therefore potentially troublesome. The Run file author is well-
advised to include explicit instructions in the message portion of the
PROMPT command when including a $STRINGn Replaceable
Parameter.

You can assign values to “$” Replaceable Parameters in one of two ways:
Include a PROMPT command for each Replaceable Parameter in the Run file.
When the PROMPT command is executed, the user enters the “value” of the
Replaceable Parameter (like a file name) in the Prompt dialog box. (See
PROMPT on page 460). You will probably find this method most useful.
Specify the values of the Replaceable Parameters in the Windows command
line when you execute the Run file.

Example: During the execution of a Run file, if the user is asked for a Data file
name with the command:
PROMPT $FILE3 Enter a file name to analyze:

and the user enters COOKIE.DAT when prompted, then the Run file command:
XRS $FILE3 WEIGHT X R G

will be executed as:


XRS COOKIE.DAT WEIGHT X R G

In the same manner, users can be prompted for variable names, filter criteria, or
text strings (for use as labels or special command parameters). For example, if the
user makes the following assignments at run time (either on the command line or
in response to PROMPT commands):

Replaceable Parameter Assigned Value


$FILE1 ELEMENTS.DAT
$VAR1 PB
$VAR2 CD
$VARB DATE
$STRINGa LIN
$RANGEFILTER7 L 8/1/96 U 8/31/96

CHAPTER 9: Automating Procedures with Run Files • 489


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

then the Run file line:


REGRESS $FILE1 $VAR1 $VAR2 $STRINGa N N G $FILTER="$VARb
$RANGEFILTER7"

will be executed as:


REGRESS ELEMENTS.DAT PB CD LIN N N G $FILTER="DATE L
8/1/96 U 8/31/96"

Note: If the Run File Interpreter encounters a “$” Replaceable Parameter for
which a value has not been provided, the user will be prompted for the
value of the parameter as if a PROMPT command without a message
parameter had been executed.

Creating Complete Task Sequences


One of the advantages of Run files is that they allow you to set up complete
sequences of tasks and operations. The following examples illustrate this
capability.

Example 1
In this example, the Run file will create an X-bar and Range chart on the screen
for the variable THICK in the Data file VENEER.DAT. It will then create a
process-capability distribution on the screen. The Run file will pause when each
chart is displayed and wait for the user to resume execution. The default Graphics
file, GRAPHICS.NWG, will be used since no file name is specified. The Run file
contains the following lines:
TITLE XR and PCAP of veneer thickness
XRS VENEER.DAT THICK X R G
CHART
PCAP VENEER.DAT THICK G
CHART

Example 2
In this example, we expand the first example to add an Individuals chart and a
Normal Probability plot and then assemble the charts into a group layout for
printing.

490 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

TITLE Print XR-PCAP-I group of veneer thickness


XRS VENEER.DAT THICK X R G NW.NWG
PCAP VENEER.DAT THICK G NE.NWG
IR VENEER.DAT THICK I N G SW.NWG
NORMPLOT VENEER.DAT THICK G SE.NWG
PRINT GROUP 2V2H NW.NWG NE.NWG SW.NWG SE.NWG

Example 3
In this example, the Run file creates separate Graphics files containing p-charts for
each defect variable in the Data file NOZZLE.DAT. The Run file then creates a
Graphics file containing a Pareto diagram for four variables in the same Data file.
In the last portion of the Run file, the newly created Graphics files are used to
print charts with the PRINT command.
TITLE Print p-charts of nozzle defects
ATTRIBUT NOZZLE.DAT TDEFECT P G TDEFECT.NWG
ATTRIBUT NOZZLE.DAT SEAL P G SEAL.NWG
ATTRIBUT NOZZLE.DAT THREADS P G THREADS.NWG
ATTRIBUT NOZZLE.DAT WELD P G WELD.NWG
ATTRIBUT NOZZLE.DAT SURFACE P G SURFACE.NWG
PARETO NOZZLE.DAT M SEAL THREADS WELD SURFACE G NOZZLE.NWG
PRINT TDEFECT.NWG
PRINT SEAL.NWG
PRINT THREADS.NWG
PRINT WELD.NWG
PRINT SURFACE.NWG
PRINT NOZZLE.NWG

Note that this Run file could be broken into two Run files (between the PARETO
command and the first PRINT command), each of which could be executed at a
different time, perhaps by different users. This could be useful if, for example,
your data and your printer are not always available at the same time.

Example 4a
In this example, the Run file prompts the user for input using commands that
assign values to Replaceable Parameters. The user is prompted for the name of a
Data file, the name of a variable, and a date range. The Run file then creates a file
containing an Individual and a Range chart for the variable specified by the user
and displays it on the screen.
TITLE Generic IR with date filter
AskDATFile ^File1 "" "Select a Data file to use"

CHAPTER 9: Automating Procedures with Run Files • 491


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

AskVariable ^Var1 "^File1" "" "Select a variable to be


charted:"
AskDateRangeFilter ^DateFilter "Enter the range of dates
to analyze:" "Beginning:" "Ending:"
IR "^File1" ^Var1 I R G $FILTER="DATE ^DateFilter"
CHART

When this Run file executes, you will be prompted first for the name of the Data
file to use, then for the name of the variable to use, and then for the range of dates
to include in the analysis. If you specify ELEMENTS.DAT for the file name, HG
for the variable name, and 7/1/01 and 7/31/01, as shown below, the effect of the
example Run file will be the same as that of the following Run file:
TITLE Generic IR with date filter
IR ELEMENTS.DAT HG I R G $FILTER="DATE L 7/1/01 U 7/31/01"
CHART

492 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Example 4b
This example illustrates the same task as the previous example. In this case,
however, the Run file prompts the user for input using commands that assign
values to “$” Replaceable Parameters.
TITLE Generic IR with date filter
PROMPT $FILE1 Enter the Data file to use
PROMPT $VAR1 Enter the variable to be charted
PROMPT $RANGEFILTER1 Enter the range of dates to analyze:
IR $FILE1 $VAR1 I R G $FILTER="DATE $RANGEFILTER1"
CHART

When this Run file executes, you will be prompted first for the name of the Data
file to use, then for the name of the variable to use, and then for the range of dates
to include in the analysis. If you specify ELEMENTS.DAT for the file name, HG
for the variable name, and 7/1/01 and 7/31/01, as shown below, the effect of the
example Run file will be the same as that of the following Run file:
TITLE Generic IR with date filter

CHAPTER 9: Automating Procedures with Run Files • 493


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

IR ELEMENTS.DAT HG I R G $FILTER="DATE L 7/1/01 U 7/31/01"


CHART

Example 5
In this example, another software package runs the Quality Analyst Run File
Interpreter, invoking a Run file, and providing the file and variable names. A
second Run file is “nested” within the first, and its name is provided at run time.
The name of the nested Run file (and which additional charts are to be created) is
determined at run time by the originating software.
The following Run file setup will create an X-bar and Range chart and a Process
Capability chart for the variable ACID from the file TEST.DAT, start up a second
Run file to create a Run Chart for variables DSOLID and SSOLID, and return to
the originating Run file to create a report using all three variables in TEST.DAT.
Control returns to Windows (and hence, to the originating program) at the end of
Run file execution:
1 The originating program executes the following Windows command which
runs the Quality Analyst Run File Interpreter:

494 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

QARFI $RUN=BASIC.RUN ^File1="TEST.DAT"


^File2="BASIC2.RUN" ^Var1="ACID"
^Var2="DSOLID" ^Var3="SSOLID"

2 The parent (unnested) Run file, BASIC.RUN, contains the following


commands:

XRS ^File1 ^Var1 X R G


CHART
PCAP ^File1 ^Var1 G
CHART
RUN ^File2
REPORT ^File1 BASIC.RPT W
CHART
SYSTEM

3 The nested Run file, BASIC2.RUN, which is specified in the command line
by the originating program, contains the following lines:

RUNCHART ^File1 A ^Var2 $Var3 G


CHART

Creating Header Files from within Run Files


In some situations it may be useful to use other programs in your quality-control
software system to create Quality Analyst Data Sets “on the fly” so that they can
then be processed by Quality Analyst using Run files as part of a larger workflow
or integrated application.
A Data Set includes a Data (DAT) file and a Header (NWH) file, as explained
under Data Sets on page 8. Because a Data file is simply an ASCII text file
containing rows of space-separated values, it is relatively straightforward to write
a program to create a Data file. See Data File Structure on page 15 for details.
A Header file, however, is structured in XML and can contain other data-related
parameters such as target and specification limits, variable descriptions, and other
analysis parameters. Quality Analyst includes two Run file commands that make it
relatively easy to program the creation and modification of Quality Analyst
Header files. They are:
CreateNWH, explained on page 433, and
UpdateNWH, explained on page 478.

These two commands make sure that the settings you specify are properly written
to the Header file, regardless of the order in which you specify them.

CHAPTER 9: Automating Procedures with Run Files • 495


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Probably the best way to use these commands in a larger workflow is:
1 Use another program to create a temporary parameter file (the paramfile
argument described under CreateNWH and UpdateNWH).
2 In your Run file, use the “@” form of a CreateNWH and/or UpdateNWH
command and specify that temporary parameter file.

Executing Run Files


Executing Run Files from within Quality Analyst
After you have created a Run file, you initiate Run file processing by clicking the
Run file button or by opening the Run menu of the Editor and selecting Execute
Run Files. The Execute Run File dialog box will appear.

Select the Run file you want to process by clicking its name in the list, then
clicking Open.

496 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Executing Run Files Directly


Because Run files are registered with Windows during the installation of Quality
Analyst, you can execute a Run file simply by double-clicking it in Explorer.

Note: After you install Quality Analyst, if you install another program that re-
registers the “.RUN” file-name extension, you will not be able to execute
Quality Analyst Run files directly. See Registered File Types on page 14
for instructions on registering file-name extensions.

Executing Run Files Using a Command Line


You can also execute Run files from a Windows command line, such as:
the one that appears when you click the Start button and select Run,
the one in the definition of a program shortcut,
the one in the definition of a Windows 98 Task Scheduler event, or
the argument of a “shell” command in another program.

Simply create a command line that begins with the name of the Run file and
includes any additional command-line options.
For example, to execute the Run file CHART.RUN using data in the folder
E:\QA\DATA, the command line would be:
CHART.RUN $DATA="E:\QA\DATA"

Because Run files are associated with the Quality Analyst Run File Interpreter in
the Windows Registry, this command will launch the Interpreter and execute
CHART.RUN using the $DATA parameter shown.
However, if you subsequently install software that re-registers the RUN file-name
extension, such command lines will not work. In that case, you must use a
command line that includes the name of the Quality Analyst Run File Interpreter
(QARFI.EXE), a $RUN command, the name of a Run file, and any additional
command-line options.
For example, to execute the Run file CHART.RUN from another application or
from a program shortcut, the command line would be:
C:\QA\QARFI.EXE $RUN=CHART.RUN

(This assumes QARFI.EXE is located in C:\QA\ and that CHART.RUN is in a


folder where QARFI.EXE can find it.)

CHAPTER 9: Automating Procedures with Run Files • 497


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

See Command Line Options on page 502 for information about other command-
line parameters and Replaceable Parameters.

Executing Run Files from a Program Shortcut


You can create a Windows program shortcut that, when double-clicked, will
execute a Quality Analyst Run file. The easiest way to do so is:

1 Right-click the Run file in Explorer, then select Create Shortcut from the pop-
up menu. (The shortcut usually appears at the end of the file list.)
2 [Optional] To relabel the shortcut, right-click it, select Rename from the pop-
up menu, enter a new label, then press <ENTER>.
3 Move the shortcut to a convenient location on your PC, such as the Windows
Desktop.

To add parameters to the shortcut command line:


1 Right-click the shortcut and select Properties from the pop-up menu.
2 Edit the Target field, adding parameters as desired.
3 Click OK.

(See Passing Replaceable Parameters from the Command Line on page 486
for more information.)

Executing Run Files Using Task Scheduler


Windows 98 and later versions include the Task Scheduler which lets you
schedule programs to run periodically. You can use this feature to execute a Run
file at an interval you specify. The instructions below apply to Windows 98 and
Windows XP. For other version of Windows, consult your Windows
documentation.

Windows 98
1 In Windows Explorer, select Scheduled Tasks in the folder tree on the left.
2 In the list of tasks on the right, double-click Add Scheduled Task to start the
Scheduled Task Wizard.
3 When the list of applications appears, click Browse, locate QARFI.EXE in the
Quality Analyst program folder, and click OK.

498 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

4 Follow the instructions provided by the wizard to specify the frequency at


which you want to execute the run file.
5 On the last wizard screen, select the check box labeled Open advanced
properties for this task when I click Finish, then click Finish.
6 On the next wizard screen, in the Run box, add “$RUN=” and the name of the
Run file to the end of the command line. Be sure to include the entire file path
if the Run file is not in a folder where Quality Analyst expects to find it.

7 Click OK.

CHAPTER 9: Automating Procedures with Run Files • 499


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Windows XP
1 Click Start, then select Control Panel.
2 Click the Scheduled Tasks icon(shown at left).
3 Double-click Add Scheduled Task to start the Scheduled Task Wizard.
4 On the first screen, click Next.
5 When the list of applications appears, click Browse, locate QARFI.EXE in the
Quality Analyst program folder, and click Open.

6 On the next screen, enter a name for the task. This will appear as the label of
the task icon in the Scheduled Task applet in Control Panel. Also specify the
execution frequency for the task, then click Next.

500 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

7 On the next two screens, specify additional scheduling and security


parameters, click Next on each screen.
8 On the next screen, select the check box labeled Open advanced properties for
this task when I click Finish, then click Finish.
9 On the Task tab of the task configuration dialog box, add “$RUN=” and the
name of the Run file to the end of the command line. Be sure to include the
entire file path if the Run file is not in a folder where Quality Analyst expects
to find it.

CHAPTER 9: Automating Procedures with Run Files • 501


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

10 Click OK.

Executing Run Files from Other Programs


Many of the programs that might be a part of your quality-control system (such as
Microsoft Access or Microsoft Excel) can run other programs. (For example,
Microsoft Access uses the SHELL command for this purpose, but other programs
might use commands named something like RUN or EXEC or EXECUTE.)
You may find it useful to run the Quality Analyst Run File Interpreter from within
those programs. To do so, create a command line (as explained under Executing
Run Files Using a Command Line on page 497) and use it as an argument to the
“shell” command of the other program. For example:
SHELL C:\QA\QARFI.EXE $RUN=CHART.RUN ^InFile="WEIGHT.DAT"

Command Line Options


The command parameters listed in the following table are available on a Run File
Interpreter command line.

502 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Command Parameters for Run files

Syntax Explanation
$RUN=filename.run Name of Run file to execute.
$TITLE="text" System title text (replaces default title).
$REPORTDATE="text" Text to use for Report Date
$DATA=folder Folder (directory) containing Data files
$TEMP=folder Folder (directory) to store temporary files
$PLOT=folder Folder (directory) to store Graphics files
$QANWA=folder\QA.NWC Folder (directory) and file name of the Quality
Analyst configuration file
<Replaceable One or more Replaceable Parameters. See
Parameters> examples below.
@<command_file_name> Name of a file containing command line options.
(Used if options are too long for a command line.)
Note: Include quotation marks as shown. Also note that quotes around folder names and file names are
mandatory if any is long or contains a space.

For example, the following Windows command line will start the Quality Analyst
Run File Interpreter and execute the Run file ANALYZE.RUN. Every time the
Run File Interpreter encounters “^DatFileA,” “^VariableA,” or “^VariableB” in
ANALYZE.RUN, it will use the strings “ELEMENTS.DAT,” “PB,” and “CD”
respectively, instead.
QARFI $RUN=ANALYZE.RUN ^DatFileA="ELEMENTS.DAT"
^VariableA="PB" ^VariableB="CD"

Similarly, the following Windows command line will start the Quality Analyst
Run File Interpreter and execute the Run file ANALYZE.RUN. Every time the
Run File Interpreter encounters “^InFile,” “^Var1,” or “^Var2” in
ANALYZE.RUN, it will use the strings “ELEMENTS.DAT,” “PB,” and “CD”
respectively, instead.
QARFI $RUN=ANALYZE.RUN ^InFile="ELEMENTS.DAT" ^Var1="PB"
^Var2="CD"

See Replaceable Parameters on page 484 and Passing Replaceable Parameters


from the Command Line on page 486 for more information.
To use the @ Run file command parameter, create a text file with a single
command parameter on each line, and include the name of the file in the Run file

CHAPTER 9: Automating Procedures with Run Files • 503


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

command following an “@” character. For example, suppose you want to execute
the following Run file command.
QARFI $RUN=BASIC.RUN $TITLE="SEMIANNUAL REPORT: JANUARY-
JUNE 1996" ^DatFile1="JAN96.DAT"
^DatFile2="FEB96.DAT" ^DatFile3="MAR96.DAT"
^DatFile4="APR96.DAT" ^DatFile5="MAY96.DAT"
^DatFile6="JUN96.DAT" ^DateVar="DATE"
^ElemVar2="PB" ^ElemVar3="CD" ^ElemVar4="ZN"
^ElemVar5="HG" ^ElemVar6="CR" ^ElemVar7="MO"
^ElemVar8="MN" ^ElemVar9="AS"

Instead, you could create a file named SEMIANN.TXT with the following
contents:
$RUN=BASIC.RUN
$TITLE="SEMIANNUAL REPORT: JANUARY-JUNE 1996"
^DatFile1="JAN96.DAT"
^DatFile2="FEB96.DAT"
^DatFile3="MAR96.DAT"
^DatFile4="APR96.DAT"
^DatFile5="MAY96.DAT"
^DatFile6="JUN96.DAT"
^DateVar="DATE"
^ElemVar2="PB"
^ElemVar3="CD"
^ElemVar4="ZN"
^ElemVar5="HG"
^ElemVar6="CR"
^ElemVar7="MO"
^ElemVar8="MN"
^ElemVar9="AS"

and then execute the following Run file command:


QARFI @SEMIANN.TXT

Interacting with the Run File Interpreter


Regardless of how you start the Run File Interpreter, as it processes the commands
in the Run file, it may display any of the Quality Analyst Run File Interpreter dialog
boxes, shown below.
The dialog box shown below will appear at the completion of a CHART command
that does not include the /DELAY option. Clicking the Continue button will clear

504 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

the dialog box and resume the Run file. Clicking the Quit button will terminate the
execution of the Run file.

After a CHART command without the /DELAY option

The dialog box shown below will appear at the completion of a CHART command
that does include the /DELAY option. One of the hands on the timer will move
each second. Click the Continue button to resume the Run file before the
programmed delay period expires. Click the Quit button to terminate the execution
of the Run file.

After a CHART command with the /DELAY option

The dialog box shown below will appear when a PAUSE command is executed.
Click the Continue button to resume the Run file. Clicking Quit will terminate the
execution of the innermost Run file, if it is nested. Clicking Quit All will terminate
the execution of all Run files including any that are nested.

The result of a PAUSE command

Run File Errors


Occasionally, the Run File Interpreter will encounter a command or command
parameter that it does not expect or cannot execute properly.
The Run File Interpreter can handle most serious errors encountered in a Run file.
When the interpreter encounters an error, a dialog box will appear containing an
error message that will indicate the error and the location of the error in the Run
file. The processing of the Run file will terminate whenever an error is

CHAPTER 9: Automating Procedures with Run Files • 505


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

encountered depending on how Quality Analyst is configured (see Run File Error
Handling on page 248).
The following table contains example error messages, the error(s) they represent,
and explanations of the error and possible causes.

Run file Error Messages

Example Message: *** FILE ('VENER.DAT') NOT FOUND IN RUN


FILE 'VENEER.RUN' AT LINE 5
Error: Input file not found
Explanation: The line number of the Run file will be identified, as “LINE
n”, to help you correct the problem. You may have mistyped
the file name or deleted, moved, or renamed the file.
Example Message: *** INVALID VARIABLE NAME ('PART99') IN
RUN FILE 'TEST.RUN' AT LINE 3
Error: Variable name not found in the Data file.
Explanation: You may have mistyped the variable name or you may have
typed the variable name from a different file.
Example Message: *** INVALID FIRST CHART TYPE ('T') IN RUN
FILE 'ANALYZE.RUN' AT LINE 1
Error: Mistyped or missing parameter
Explanation: For example, an erroneous chart type, such as “T” instead of
“R” in the XRS command.
Example Message: *** 'PRINTT' NOT FOUND
Error: Wrong or missing Quality Analyst Run file command
Explanation: Typographical error.

Tip: You can mitigate the effect of errors on the execution of lengthy Run
files by nesting Run files. See the discussion under RUN on page 467.

Using Older Run Files


Run file commands and their behavior have changed as Quality Analyst has
evolved from a DOS-based to a Windows-based program, and as XML has
become a widely accepted data-structuring technology. This section describes

506 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

changes you should make, and issues you should be aware of, if you intend to use
Run files from earlier versions of Quality Analyst with newer versions.

Windows-based Run Files Earlier than


Version 6.1
Beginning with Quality Analyst 6.1, Header files and Graphics files have different
formats and file-name extensions. Both are now structured using XML, and use
the file-name extensions NWH and NWG respectively instead of HED and PLT.
Also, Graphics files now serve the function of Text Output files (with a PTX
extension) from earlier versions, which are no longer used. Because of these
changes, you may need to modify existing Run files to make sure they produce the
intended results. (Quality Analyst does not automatically convert older Run files
when you execute them.)

Converting Files to the New Formats


Any Data Set used in a Run file should be opened in the Editor before you execute
the Run file. Opening a Data Set in Quality Analyst 6.1 automatically creates an
XML-structured Header file with the file-name extension “.nwh” from the older
“.hed” Header file.
If any of your Run files use “permanently” stored Graphics files (for example,
files containing charts that are included in a Group Layout for historical
comparisons), you should regenerate those charts using Quality Analyst 6.1 and
save them with the new “.nwg” file-name extension.

Modifying Run Files


Change the names of Header, Graphics, and Text Output files to use the file-name
extensions shown in this table.

File Type Old Extension New Extension


Header file .hed .nwh
Graphics file .plt .nwg
Text Output file .ptx .nwg

CHAPTER 9: Automating Procedures with Run Files • 507


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

This is particularly important if your Run files contain any commands that
perform file operations directly or indirectly, such as AskOpenFile, AskSaveFile,
COPY, DELETE, RENAME, or SHELL.

Note: See CreateNWH on page 433 and UpdateNWH on page 478 for special
considerations regarding the behavior of those commands on “.hed” and
“.nwh” files.
Any Graphics file created by a Run file command under Quality
Analyst 6.1 or later will contain XML-structured data, regardless of the
file-name extension (if any) used in the command. Thus, if you use an old
Run file with a command that creates a file named, for example,
PCAP.PLT, the content of that file will be in the new XML-structured
format of an “.nwg” file (even though the file-name extension is “.plt”),
and the Run file command will execute properly. However, even though
updating file names in such cases is optional, file management may
become confusing if you don’t.

DOS-based Run Files


Using Existing DOS-based Run Files under Windows
There are several things you should be aware of if you are using Run files written
for a DOS-based version of Quality Analyst. The Windows Run File Interpreter
will interpret many DOS Run file commands correctly as follows:
The DOS CSCREEN command will be interpreted as the Windows CHART
command, displaying the graphics on the screen under Windows.
The DOS CPRINT and CPLOT commands will be interpreted as the
Windows PRINT command, sending output to the Windows printer.
“Named” graphics drivers (user-supplied names like “laser1”) will be
ignored. (No output will be produced.)
The DOS I (Interactive) command for screen graphics is not recognized. (No
output will be produced.)
The ATTRIB command will be executed as ATTRIBUT which has been
renamed as such to avoid a name conflict with a system-support command.

508 • CHAPTER 9: Automating Procedures with Run Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Converting DOS Run Files to Windows


Although most DOS-based Run files will execute under Windows, you should
eventually convert those Run files.

To convert DOS Run files to Windows:


Change the screen-output command CSCREEN to CHART.
Change the printer-output commands CPRINT and CPLOT to PRINT.
Change ATTRIB to ATTRIBUT.
Change named drivers to PRINT (if they are used to assemble a page layout,
you should also rewrite the command statement to include a GROUP option).
Change S, P, and T output types to W, add the name of a Graphics file to the
command line, and insert a CHART or PRINT command for the NWG file.
Change the I command for screen-graphics output to G and add a new line
containing CHART. For example, change:

XRS COOKIE.DAT WEIGHT X R I

to
XRS COOKIE.DAT WEIGHT X R G
CHART

CHAPTER 9: Automating Procedures with Run Files • 509


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

CHAPTER 10

Using External Data Files

Importing Data
Quality Analyst lets you import data from other sources, such as other software or
data-acquisition systems. You can import data from:
comma-separated-value files (and similar files) in which the values that end
up in Quality Analyst’s columns are separated by commas in the source file.
Quality Analyst also “cleans up” files in which values are separated by
commas but which also contain other characters (like tabs, punctuation,
nested quotes, and so on).
fixed-field files in which the values that end up in Quality Analyst’s columns
are aligned in columns (using spaces for “padding”) in the source file.

Note: Some programs create space-delimited data files in which values are
separated by spaces and text values contain no spaces. Quality Analyst
can use these files without conversion. See Opening a Data File without
a Header File on page 518.

If you want to use Quality Analyst to work with data that are stored in the file
format of any of several popular database programs (including any ODBC-
compliant database), you can use the connectivity features of Quality Analyst to
connect directly to those databases without conversion. Database connectivity is
discussed in CHAPTER 12.

Importing a Comma-Separated-Value File


Quality Analyst lets you import data from comma-separated-value (CSV) files in
which the values that end up in Quality Analyst’s columns are separated by
commas in the source file, as in this example:
4/24/96,FS,22.5,22.5
4/24/96,FS,152.0,153.0

510 • CHAPTER 10: Using External Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

4/25/96,SBW,29.0,29.0
4/25/96,SBW,127.5,128.2
5/1/96,FS,172.0,175.0
5/9/96,SBW,55.5,55.0
5/9/96,FS,72.5,72.5
Comma-separated-value files, sometimes called comma-delimited files, often have
the file-name extension “CSV.”
When you import a CSV file, Quality Analyst performs the following tasks in this
order:

1 Remove nonprinting characters. Change tabs to spaces.


2 Remove all delimiters within quotes (including spaces, commas, and nested
quotes).
3 Replace empty quotes with the current missing data symbol (to preserve
column count).
4 Change quotes (single and double) to spaces.
5 Remove all spaces that immediately follow commas.
6 Insert current missing-data symbol between any adjacent commas (to preserve
column count).
7 Change commas to spaces.

To import a CSV file, first close the Data Set in the Editor if one is open. Open the
File menu, select Import, then select CSV to Quality Analyst Format. The Convert
CSV to Quality Analyst Format dialog box will appear.

CHAPTER 10: Using External Data Files • 511


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

In the area labeled Input File, click Select File to select the external file to be
converted. Its name will then appear in the box.
In the area labeled Output File, click Select File to specify a name and location for
the converted file. Its name will then appear in the box.
In the box labeled Additional characters to remove, enter any characters you want
removed from the file during conversion, in addition to those described in the
steps above. Enter the characters one right after the other; do not separate them
with spaces, commas, or any other character. Each character you enter will be
removed individually (not as a group) from the input file. For example, if your
input file contains values enclosed in brackets, enter the two characters [ and ].

Note: You must not include a comma or space here since Quality Analyst
handles those specially.

In the area labeled Columns to check, specify how many columns of data are in the
source file. This setting affects only the data-conversion report that Quality
Analyst displays after the conversion. Regardless of which option you select here,
you will end up with the same converted file. The data-conversion report will list
any discrepancies between the number of fields expected and the number of fields
actually found in the file.
Check Columns to specify the number of data columns Quality Analyst
should “look for” when converting the input file. Enter the number of
columns in the adjacent box.
Check Use first row to use the number of data elements found in the first row
in the input file as the number of columns to “look for.”
Check No test to forgo a check on the number of columns. If you select this
option, no discrepancies in column count will be reported.

Click OK to convert the file. The import function does not actually load the file
into the Editor. After converting the file, you must open it as you would any other
Quality Analyst Data Set. See Opening a Data File without a Header File on
page 518.

Importing a Fixed-Field File


Quality Analyst lets you import data from fixed-field files in which the values that
end up in Quality Analyst’s columns are aligned in columns in the source file, as
in this example:
4/24/96FS 22.5 22.5

512 • CHAPTER 10: Using External Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

4/24/96FS 152.0153.0
4/25/96SBW 29.0 29.0
4/25/96SBW127.5128.2
5/1/96FS 172.0175.0
5/9/96SBW 55.5 55.0
5/9/96FS 72.5 72.5
To import a fixed-field file, first close the Data Set in the Editor, if one is open.
Open the File menu, select Import, then select Fixed Field to Quality Analyst Format.
The Fixed-Field to Quality Analyst Format dialog box will appear.

In the area labeled Input File, click Select File to select the external file to be
converted. Its name will then appear in the box.
In the area labeled Output File, click Select File to specify a name and location for
the converted file. Its name will then appear in the box.
Quality Analyst uses a “Fixed-Field Definition” to determine which columns of
characters in the fixed-field file represent data (field) columns. Fixed-field
definitions can be saved in files (with FFD extensions) and reused later (for
example, in Quality Analyst Run files). In the area labeled Fixed Field Definition
File, you can create and edit Fixed-Field Definitions and optionally save and open
them.
Click Select to select a Fixed-Field Definition (FFD) file that you have
already created. Its name will appear in the box.
Click Edit to modify the definition contained in the file you have selected.
(See instructions below.)
Click Create to create a new Fixed-Field Definition. (See instructions below.)
Click Save to save the current Fixed-Field Definition in the file whose name
is displayed in the box.

CHAPTER 10: Using External Data Files • 513


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Click Save As to save the current Fixed-Field Definition in a file other than
the one named in the box.

If you click OK without saving the Fixed-Field Definition to a file, a message box
will appear asking if you want to save the Fixed-Field Definition. You need not
save a Fixed-Field Definition to an FFD file, but doing so can be useful if you:
repeatedly receive fixed-field files to convert that have the same column
layout, or
want to convert fixed-field files in a Run file (in which case an existing FFD
file is required).

During the conversion, any spaces within a field are converted to underscores
(“_”). When the file has been converted, Quality Analyst will display a data-
conversion report that contains a summary of actions taken and lists any
discrepancies found during the conversion.
The import routine does not actually load the file into the Editor. After converting
the file, you must open it as you would any other Quality Analyst Data Set. See
Opening a Data File without a Header File on page 518.

Creating and Editing a Fixed-Field Definition File


When you click either Create or Edit in the Fixed-Field to Quality Analyst Format
dialog box, the Fixed Field Definition dialog box will appear.

514 • CHAPTER 10: Using External Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Use this form to specify the column locations in a fixed-field file for importing
into Quality Analyst format.

Specifying Columns
For each formatted column in the input file, specify:
the Starting Character Position of the column (the first position is 1).
the Width of the column, in characters.

Using the Form


To enter and edit the data in this form, use the same basic editing commands as in
the main Editor (see Data Structure Editing Functions on page 31).
As you <TAB> or <ENTER> out of each Width cell for the last row in the form, the
Starting Character Position of the next Column will be calculated and inserted.
(This is not automatic after the first time.)
When you enter your last Width, you will have an “orphan” Starting Column
Position in the last row of the form. Before you click OK, delete that row:

1 Click the column number on the left.


2 Click Delete.
3 Click OK in the Delete Columns dialog box.

CHAPTER 10: Using External Data Files • 515


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To see if any of the columns you have specified overlap:


1 Click Check Overlap.
2 Enter the number of the first and last columns you want to check.
3 Click OK in the Columns to check overlap dialog box.

A message box will describe the location of each overlap found:

To correct overlapping columns, recalculate Starting Character Positions:


1 Click Calculate.
2 Enter the number of the first and last columns you want to recalculate.
3 Click OK in the Columns to calculate dialog box.

Quality Analyst will recalculate the starting positions based on the widths.

516 • CHAPTER 10: Using External Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To insert a blank row in the form:


1 Select the row above which you want to insert a new row by clicking its row
number.
2 Click Insert.
3 In the Insert Columns dialog box, enter the number of rows (they are rows in
the form, but columns in the file) to insert and the beginning row.
4 Click OK.

To delete a row in the form:


1 Select the row you want to delete by clicking its row number.
2 Click Delete.
3 Enter the number of rows (in the form) to delete and the beginning row.
4 Click OK.

To delete the contents of one or more cells:


1 Select the cell you want to delete. (To select several cells, click the cells while
holding down the <CTRL> or <SHIFT> keys.)
2 Click Clear.

Though the columns you define must not overlap, they need not abut. As in the
example below, you can define a “null” area between columns. Quality Analyst
will ignore anything found in the input file that is not within a defined column.
This is useful if you want to ignore one or more data columns or label columns in
the input file.

CHAPTER 10: Using External Data Files • 517


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

This Fixed-Field Definition defines three six-character columns with a three-


character “null” area between each. In the input file, any characters in the x
positions below, will be ignored during the conversion:
....|....|....|....|....|
xxx xxx
xxx xxx
xxx xxx
xxx xxx
....|....|....|....|....|
1 5 10 15 20 25

Opening a Data File without a Header File


Several Quality Analyst functions create a Quality Analyst Data file without a
corresponding Header file. Because the structure of a Quality Analyst Data Set
(variable names, data types, and so on) is stored in the Header file, you must
create a Header file before you can use the Data file.
To create a Header file for a Data file, start by opening the Data file. Open the File
menu and select Open. The Quality Analyst Open dialog box will appear.

518 • CHAPTER 10: Using External Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

This dialog box displays all Data files. Select the Data file you want to open. The
No Data Set Structure dialog box will appear.

Using an Existing Header File


If you know that the Data file has the same structure as an existing Data Set, click
Use Existing to retrieve that structure for the Data file. The Use Existing File
Structure dialog box will appear.

CHAPTER 10: Using External Data Files • 519


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

This dialog box lists all Header files. Select the Header file that contains the
structure you want to apply to the Data file. When you click Open, the Editor will
display the data in the Data file with the data structure from the Header file.
If you inadvertently select a Header file that Quality Analyst cannot apply to the
Data file, a warning message will appear. Click OK and select another Header file.

Creating a New Header File


In the No Data Set Structure dialog box, click Define New to define a data structure
for the Data file from scratch. The Column Definition and Calculations dialog box
will appear.

520 • CHAPTER 10: Using External Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Quality Analyst will assign temporary variable names and the alphabetic data type
(“A”) to each column. Simply redefine the structure of the Data Set as explained
under Column Definition and Calculations on page 72.

Tip: Because Quality Analyst also loads the data into the Editor, you can
reposition the windows as shown in the figure to view the data as you
restructure it.

Exporting Data to a Comma-Delimited File


Quality Analyst lets you export a Data Set to a comma-separated-value (CSV) file
for use by other software. This routine converts multiple spaces to single spaces
and then changes the spaces to commas. You have the option of enclosing non-
numeric fields in quotes.

CHAPTER 10: Using External Data Files • 521


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To export to a comma-delimited file:


1 Open the File menu and select Export to CSV. The Export to CSV Format dialog
box will appear.

2 Under Input File, click Select File and specify the Quality Analyst file to
convert.
3 Under Output File, click Select File and specify a name and location for the
destination comma-delimited file.
4 Check Delimit Text with Quotes if you want to enclose non-numeric fields in
quotation marks.
5 Check Variable Names on first line if you want to write the variable names as
the first line of the file.
6 Click OK.

Using the Clipboard with the Editor


Pasting Data into the Editor
In Quality Analyst, you can copy data into the Editor via the Windows Clipboard
from most Clipboard-capable spreadsheets. Before importing data, make sure the
Editor has a large enough “destination” for the data. The upper left corner of the
source data will be pasted into the currently selected cell in the Editor grid. The
remaining pasted data will fill cells to the right and down from there. If extra rows
are needed in the Editor to receive the data you paste from the Clipboard, Quality
Analyst will add them automatically. But if additional columns are needed, you
must add them yourself before you paste. (To add new columns, open the Edit

522 • CHAPTER 10: Using External Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

menu and select either Variable Definition and Specifications or Column Definition
and Calculations.)
The cells that you paste into may be empty or may contain either data or the
missing-data symbol. Existing data and the missing-data symbol will be
overwritten by pasted data. If Quality Analyst adds new rows when you paste, any
new cells that do not receive pasted data will contain the missing-data symbol.
The following example explains pasting data into the Editor. We will paste eight
rows and four columns of data to a Quality Analyst file that already has dates in
the first column.

Editor with eight rows and four columns free for importing

In the source application (in this example, Microsoft Excel) we mark and copy the
desired data.

CHAPTER 10: Using External Data Files • 523


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Source data selected and copied to Clipboard

In Quality Analyst, first position the cell in the upper left corner of the range you
want to paste to, then open the Edit menu and select Paste (or press <CTRL+V>.

524 • CHAPTER 10: Using External Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

The data will appear in the range you cleared for them and the Verify Data message
box will appear.

CHAPTER 10: Using External Data Files • 525


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Select Yes to have Quality Analyst verify the validity of the imported data. If you
select No, we strongly recommend that you verify the pasted data before
performing any analysis or charting with them. (See Verifying Data on page 100.)

See Also Importing Data, p. 510


Inserting Data from Another Data Set, p. 112

Copying Data Out of the Editor


You can copy all or some of the values in a Data file into another Clipboard-aware
application. To copy all the data in a Data Set to the Clipboard, open the Edit
menu and select Copy All.
To copy part of a Data Set to the Clipboard, first select the range of cells you want
to export.

526 • CHAPTER 10: Using External Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Open the Edit menu and select Copy to copy the highlighted data to the clipboard.
Or open the Edit menu and select Cut to copy the data to the clipboard and remove
it from the Editor.
In the destination application, follow its instructions for pasting data. Usually, this
involves selecting the cell in the upper left corner of the destination range, then
opening the Edit menu and selecting Paste, just as we did when pasting data into
the Editor. The following example uses Microsoft Excel.

CHAPTER 10: Using External Data Files • 527


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

528 • CHAPTER 10: Using External Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Different applications behave differently with regard to available space, data


types, etc.

See Also Exporting Data to a Comma-Delimited File, p. 521


Extracting Subsets from a Data File, p.536

CHAPTER 10: Using External Data Files • 529


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

CHAPTER 11

Manipulating Data Files

Note: This chapter explains how to perform several internal manipulation


functions on Quality Analyst Data Sets. If you want to copy, rename, or
delete a Data Set, see Managing Data Sets on page 9.

Changing the Missing Data Symbol


To change the missing data symbol in a Quality Analyst Data Set, open the File
menu, select Utilities, then select Change Missing Data Symbol. The Change
Missing Data Symbol dialog box will appear.

If you had a Data Set open in the Editor when you started this procedure, the box
in the area labeled File to Modify will display the name of the Data file. If not, you
should click Select File and select the file whose missing-data symbol you want to
change.
The box labeled Current missing data symbol displays the current System
Parameter for the missing-data symbol (see Missing Data Symbol on page 272).
This might not be the same as the missing-data symbol in the file you want to
modify.
In the box labeled Old Missing Data Symbol, enter the symbol or text string
currently used to indicate missing data in the Data Set you want to modify.

530 • CHAPTER 11: Manipulating Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

In the box labeled New Missing Data Symbol, enter the desired symbol or text
string to indicate missing data. The missing-data symbol can be a single character
(such as “*”) or a string of text (such as “N/A” or “MISSING”). Spaces and
commas are not allowed within the missing-data symbol.

Rotating a Data Set


Quality Analyst lets you transpose, or “rotate,” a Data Set diagonally. This
operation rotates all or part of a file 90 degrees, turning columns into rows and
rows into columns. For example:
Before After
A 1 6 A B C D E
B 2 7 1 2 3 4 5
C 3 8 6 7 8 9 10
D 4 9
E 5 10 (or vice versa)

To rotate a Data Set, open the File menu, select Utilities, then select Rotate Data
File. The Rotate Data File dialog box will appear.

If you had a Data Set open in the Editor when you started this procedure, the box
in the area labeled Input File will display the name of that Data Set. If not, you
should click Select File and select the file you want to rotate.

CHAPTER 11: Manipulating Data Files • 531


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

In the area labeled Output File, click Select File to specify the name of the file to
create from the new arrangement of rows and columns.
In the area labeled Rotation, specify the rows or columns you want to rotate.
Select All Columns to include all columns (and rows) in the rotation.
Select Select Columns to include only those columns that you specify (and all
rows) in the rotation. In the adjacent box, enter the column numbers,
separated by spaces, to include in the rotation. For example, 1 2 3 4
Select All Rows to include all rows (and all columns) in the rotation.
Select Select Rows to include only the rows you specify (and all columns) in
the rotation. In the adjacent box, enter the row numbers (separated by spaces)
of the rows you want to include. For example: 1 3 4 5 7.

Notes: When you try to open the new rotated file, Quality Analyst will tell you
that the data has no structure (that is, there is no Header file for the Data
file). At that time, you can either create a new structure or use the
structure of another Data Set, as if you were creating a brand new
Data Set.

Converting Subgroups To or From a Single


Column
With Quality Analyst, you can convert a single column of data into a file
containing multiple data columns, and vice versa. The diagram below illustrates
the effect of each conversion. This function is useful if:
a data-collection device records readings from different sources in a single
column at regular intervals (single to multiple).
a data-collection device records individual readings of the same parameter in
separate columns (multiple to single).

In both cases, Quality Analyst retains the original file and creates a new file
containing the converted data.

532 • CHAPTER 11: Manipulating Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Effect of Single and Multiple Column Conversions

Single to Multiple Multiple to Single


Before After Before After
A 1 A 1 2 3 A 1 2 3 A 1
B 2 D 4 5 6 B 4 5 6 A 2
C 3 G 7 8 9 C 7 8 9 A 3
D 4 B 4
E 5 B 5
F 6 B 6
G 7 C 7
H 8 C 8
I 9 C 9
The alphabetic columns represent optional description columns.

Single Column to Multiple Columns


To convert a single data column into multiple data columns, open the Data Set you
want to convert, open the File menu, select Utilities, and select Convert Subgroups
to/from Single Column. The Convert Subgroups to/from Single Column dialog box
will appear.

In the area labeled Conversion Type, select Convert from single column. In the
adjacent box, enter the Number of observations per sample. This is the number of
data columns (excluding description columns) you want in the new multi-column
Data Set.

CHAPTER 11: Manipulating Data Files • 533


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Check Include description columns if you want to use the values of one or more
fields in the existing single-column Data Set as description field(s) in the new
multi-column Data Set. (In the input file, if the value of the description field varies
within each set of rows that will be converted to columns, the value from the first
row of the set will be used to “label” the row in the new multi-column Data Set.
See diagram above.)
When you click OK, the Convert Subgroups to/from Single Column variable-
selection dialog box will appear. (The lower half of this dialog box, labeled
Description Columns, will appear only if you selected Include description columns
above.)

Select the Column to Convert (as explained under Selecting a Single Variable on
page 121) and, if applicable, the Description Columns to use (as explained under
Selecting Multiple Variables on page 123).
The new multi-column Data Set will include a Header file and the columns will be
named VAR_1, VAR_2, and so on. You can open the file with the Editor and
restructure it as needed.

Notes: In the input file, if the value of the description field varies within each set
of rows that will be converted to columns, the value from the first row of
the set will be used to “label” the row in the new multi-column Data Set.

534 • CHAPTER 11: Manipulating Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Multiple Columns to a Single Column


To convert multiple data columns into a single data column, open the Data Set you
want to convert, open the File menu, select Utilities, and select Convert Subgroups
to/from Single Column. The Convert Subgroups to/from Single Column dialog box
will appear. Select Convert to single column.
Check Include description columns if you want to use the values of one or more
fields in the existing single-column Data Set as description field(s) in the new
multi-column Data Set. The value of the description field for each row in the input
file will be used to “label” each of the several new rows in the new multi-column
Data Set. See diagram above.
When you click OK, the Convert Subgroups to/from Single Column column-
selection dialog box will appear.

Select the Columns to Convert and, if applicable, the Description Columns to use.
(See Selecting Multiple Variables on page 123).
Click OK to convert the file. The converted column in the new Data Set will be
named “VAR_N” where “N” is one more than the number of description columns
you selected. You can open the new Data Set with the Editor and restructure it as
needed.

CHAPTER 11: Manipulating Data Files • 535


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Extracting Subsets from a Data File


Quality Analyst lets you extract part of an existing Data Set into a new, separate
Data Set. You can specify extraction criteria based on the values of any column or
combination of columns in the existing Data Set. (For example, you could extract
all batches produced during July with a pH less than 4.5.)
You can save the extraction criteria you specify in an Extract Definition (SEL) file
and reuse them later. An existing Extract Definition file is required by the
EXTRACT Run file command (page 437).

Note: In fact, the primary purpose of this feature of the Quality Analyst Editor
is to create and maintain SEL files for use by the EXTRACT command in
Run files. It is probably easier to eliminate unneeded or unwanted rows
of data by saving a filtered Data Set, as explained under Filtering Data
starting on page 90.

Extracting Data
To extract part of a Data Set, first close the Data Set in the Editor if one is open.
Open the File menu, select Utilities, and select Extract Subset from Data File. The
Extract Subset from Data File dialog box will appear.

In the area labeled Input File, click Select File to select an input file. This is the
existing file from which you want to extract data.
In the area labeled Output File, click Select File to specify a name and location for
the new file that will contain the extracted data.

536 • CHAPTER 11: Manipulating Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

In the area labeled Extract Definition File, click Select to load extraction criteria
from an existing Extract Definition (SEL) file. The name of the file will be
displayed in the text box. Click Edit to modify the extraction criteria. Click Create
to create a new set of extraction criteria. Click Save to save the current extraction
criteria in the current Extract Definition file. Click Save As to save the current
extraction criteria in a new file. (For instructions on what to do after you click
Create or Edit, see Creating and Editing an Extract Definition File below.)
To extract the subset, click OK. The new extracted Data Set will have a Header file
derived from the Header file of the parent Data Set—the same file title and
column definitions will be used.

Creating and Editing an Extract Definition File


In the Extract Subset from Data File dialog box, when you click Create or Edit, the
Extract Definitions dialog box will appear.

Use this dialog box to define criteria for extracting a subset of a Data Set. You can
define up to ten criteria.
The Definition List contains the current set of definitions. They will be named
Definition 1, Definition 2, and so on. As you select definitions in this list, the label
of the area to the right will change to the name of the selected definition and the
components of the criterion will be displayed.
To add a new definition to the end of the list, click Add. To delete an existing
definition, select it in the Definition List, then click Delete. To insert a new
definition in a specific position in the list, select the definition above which you
want to insert the new one, then click Insert.
In the area labeled Definition N, specify the extraction criterion for the definition
selected in the list to the left.

CHAPTER 11: Manipulating Data Files • 537


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Select And if the extracted data must meet both this definition and the previous
definition. Select Or if the extracted data must meet either this definition or the
previous definition. (This option is available for all but the first definition.)
From the drop-down list labeled Variable, select the data column on which you
want to base this extraction criterion.
Select Match to extract only those values that exactly equal the value you enter in
the adjacent box. Select From to specify a range of values to extract. Enter a lower
limit for the values you want to extract in the adjacent box. Place a “>” before the
value to exclude records where the field value is exactly equal to the lower limit.
Values “just greater than” the lower limit will be included. In the box labeled To,
specify an upper limit for the values you want to extract. Place a “<” before the
value to exclude records where the field value is exactly equal to the upper limit.
Values “just less than” the upper limit will be included.

Note: To specify an open-ended range of values, specify values for either From
or To, but not both. For example, you could specify values greater than or
equal to 25 or less than 0.05:

Select Positive to extract data that meet the criterion you have defined. Select
Negative to extract all data except those that meet the criterion you have defined.
When you click OK, Quality Analyst will validate all definitions and identify any
illegal or missing components for you to correct.

Defining Calculations for Run files


Overview
One of the parameters for the NEWVAR command in Run files is the name of a
Variable Definition file (with a VDF extension). (See NEWVAR on page 451.)
The Variable Definition file contains formulas for creating one or more new
variables based on calculations using other variables in the Data file. This section
describes how to create a Variable Definition file.

538 • CHAPTER 11: Manipulating Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Note: Adding a calculated variable to a file is much easier using the procedure
described under Defining Calculated Variables on page 62.
You can probably skip this section unless you use existing Run files that
contain many NEWVAR commands, and those files are too complex for
you to consider modifying them.

Creating a Variable Definition File


To define calculations for Run files, first close the Data Set in the Editor if one is
open. Open the File menu, select Utilities, and select Define Calculations for Run
Files. The Define Calculations for Run files dialog box will appear.

In the area labeled Input File, click Select File to select the existing Data Set that
contains the variable(s) from which you want to calculate one or more new
variables. The name of the file will be displayed in the text box.
Output to is discussed below.
In the area labeled Variable Definition File, click Select to load variable definitions
from an existing Variable Definition (VDF) file. The name of the file will be
displayed in the text box. Click Edit to modify the variable definitions. Click
Create to create a new set of variable definitions. Click Save to save the current
variable definitions in the current Variable Definition file. Click Save As to save
the current variable definitions in a new file.

CHAPTER 11: Manipulating Data Files • 539


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

After you have saved the Variable Definition file, you can click Cancel if you are
using this routine only to create a Variable Definition file for use in a Run file. Or,
see Saving New Calculated Variables to a Data File below.

Defining Calculated Variables


If you click Create or Edit, the New Variable Definition dialog box will appear.

This dialog box looks and acts just like the Column Definition and Calculations
dialog box described under Specifying Column Definition and Calculations on
page 61. Follow those instructions and guidelines as you compose formulas for the
new variables in this dialog box.

Note: To maintain compatibility with previous versions of Quality Analyst, the


syntax for formulas here is slightly different than it is for formulas of
calculated variables in a Data Set. As you compose formulas here, check
the descriptions in the lower half of the dialog box for details.

Click OK to complete variable definition.

540 • CHAPTER 11: Manipulating Data Files


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Saving New Calculated Variables to a Data File


Though the main purpose of this procedure is to create a Variable Definition
(VDF) file for use by a Run file, you can also use it to “execute” the definitions in
a Variable Definition file, generating new variables “on the spot.”
In the area labeled Output to in the Define Calculations for Run files dialog box,
select Existing file to create new columns in the input file for the new calculated
variables. Select New file to create a new file containing the new calculated
variables. Specify a name and location for the output file by clicking Select File.
Click OK to send the output to its destination. If you are using this routine only to
create a Variable Definition file for use in a Run file, you can ignore this Output to
area and click Cancel instead. (But first, be sure to save the Variable Definition
file by clicking Save or Save As.)

CHAPTER 11: Manipulating Data Files • 541


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

CHAPTER 12

Database Connectivity

Overview
NWA Quality Analyst lets you define Quality Analyst Data Sets that use external
databases as the source of data. This lets you connect to external data—either
directly or via ODBC (Open DataBase Connectivity)—while retaining the
complete functionality of Quality Analyst. This version of Quality Analyst
provides seamless connections to any ODBC-compliant database and direct
connections to many PC-based databases.
Using Quality Analyst, you define a connection between a Quality Analyst Data
Set and an external data source. Once the link is established, using the external
data is transparent to you. Quality Analyst stores the information needed to
establish the connection to the external data source as part of the Data Set
definition. Whenever you use a Connectivity Data Set, Quality Analyst simply
uses the definition to read the data from the external data source instead of from a
Quality Analyst Data file. Quality Analyst Connectivity Data Sets are listed
alongside the standard Quality Analyst Data Sets in the Open dialog box.
You can also configure Quality Analyst to read the specifications for the variables
in your Data Set from an external database. When you do so, the specifications are
read whenever you open the Data Set, and whenever a CONNECT command
(page 432) is executed in a Run file. See Reading Specifications from a Database
on page 46 for instructions.

Note: Refer to the Installation Guide for important information about installing
and configuring the connectivity components of NWA Quality Analyst.

Before Using Connectivity


Before you can link a Quality Analyst Data Set to an external database, you must
comply with the following requirements.

542 • CHAPTER 12: Database Connectivity


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Direct Connection
Quality Analyst can connect directly to “desktop” databases created by dBase,
FoxPro, Microsoft Access, and Paradox. It can also connect directly to data stored
in Microsoft Excel spreadsheets.
The Quality Analyst installation program installs the Microsoft Data Access
Components (MDAC) which handles all direct connections to desktop databases.
Installing additional drivers is not necessary.

ODBC Connection
Quality Analyst should connect to virtually any data source that supports ODBC.
To connect to ODBC-compliant databases, you must:
Have the appropriate ODBC drivers installed on your system
Define an ODBC data source for each database you want to read (as
discussed below)

This manual assumes that you comply with these requirements.


Appropriate Windows ODBC drivers are usually installed along with the database
software whose data you want to connect to via ODBC. If not, you may need to
run the setup program for your database software and add the ODBC drivers, or
obtain drivers from one of many third-party sources.
Establishing an ODBC data source based on a particular ODBC driver is done
using the ODBC setup normally found in the Windows Control Panel. Refer to
your Windows documentation or contact your information systems support staff
for information about setting up ODBC data sources.
Quality Analyst allows connections to Oracle and SQL Server databases via 32-bit
ODBC using drivers installed as part of MDAC.

Defining Connectivity Data Sets


Quality Analyst provides a complete user interface for defining a Connectivity
Data Set. You can define a Connectivity Data Set in one of two ways:

CHAPTER 12: Database Connectivity • 543


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Use Quality Analyst to create the definition. A convenient user interface lets
you select each component from lists provided by querying the data source.
You may select fields only from a single table in the data source selected.
You can define any number of filters to limit the amount of data retrieved
from the data source or to sort it on any field as it is retrieved.
Provide a complete SQL statement that performs all the functions necessary
to retrieve the desired data from the database. You can enter the SQL
statement by composing it at the keyboard or by copying and pasting it from
other applications. You should use this method if you need to perform
multitable operations or complex manipulation to retrieve the correct data.
(The Quality Analyst connectivity filters can not be used with the SQL
statement.) Although Quality Analyst performs some syntax checking, you
are responsible for the SQL statement and the consequences of its use.

Defining a Connectivity Data Set with Quality Analyst involves these steps:
1 Select New External Database when creating a new Data Set.
2 Specify a connection type (either ODBC, or a specific database for direct
connection).
3 Specify an external data source.
4 Do one of the following:
Select a table from the external data source
or
Enter SQL commands to define the data within the data source to use.

5 Assign fields from the data source to columns in the Quality Analyst Data Set.
6 Identify the key columns in the Data Set.
7 Specify data filters to limit the amount of data retrieved. (This step is
available only if you select a table in step 4, and is optional.)
8 Specify how the data should be sorted as it is retrieved. (This step is available
only if you select a table in step 4, and is optional.)

The rest of this section describes this process in detail.

Select New External Database


Begin by running Quality Analyst and select Create a New Data Set from the
Quality Analyst start-up screen. The New Data Set dialog box will appear.

544 • CHAPTER 12: Database Connectivity


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Select New External Database. The Quality Analyst External Database Setup dialog
box will appear.

Selecting a Connection Type


In the drop-down list labeled Connection, select the type of connection you want
to make. Select ODBC to connect to an ODBC-compliant database, or select any of
the database formats listed to connect to that type of database directly.

CHAPTER 12: Database Connectivity • 545


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Selecting a Data Source


Direct-Connection Sources
If you selected one of the direct-connection (non-ODBC) database types, the
Windows Open File dialog box will appear.

The dialog box lists files of the selected database type (*.MDB for Microsoft
Access, for example). Select the external Data file you want to connect to. Make
sure it is a file created by the database application you selected in the previous
step. After you click OK, the name of the file you select will be displayed in the
box labeled Data Source.

546 • CHAPTER 12: Database Connectivity


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

ODBC Sources
If you selected an ODBC connection, select the source of the data you want to use
for the Data Set from the drop-down list. This list will contain all ODBC data
sources available on your system. If no sources are listed, or if the desired source
is not listed, you need to create an ODBC source definition using the ODBC
module of Windows Control Panel. See ODBC Connection on page 543.

Specifying a Data Table


With Quality Analyst, you can select an existing single table in your data source
or specify SQL commands to manipulate one or more tables in the data source and
create the table you need for your Quality Analyst Data Set. The next two sections
discuss each option.

Using an Existing Table in the Data Source


Selecting an Existing Table
To use an existing table in the external data source, select the Table option in the
External Database Setup dialog box. From the adjacent drop-down list, select the
table you want to use. This list contains the names of all tables in the data source
you selected. In this example, we selected the Center Thickness table:

CHAPTER 12: Database Connectivity • 547


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

When you select a table, the names of the fields in that table will be displayed in
the area of the dialog box labeled Available Fields. You can use this list of fields to
confirm that you have selected the correct table.
(If you do not need to denormalize the data table, skip to Setting External
Database Access Options on page 557.)

Denormalizing a Normalized Table


Quality Analyst can denormalize data when reading it from the external database,
assembling separate but related “serial” records in the database into “parallel”
fields in a Data Set record.

Overview of Denormalization
Many data-collection systems store data in “normalized” databases where each
database record includes a data identifier and a measured value. Thus, each
reading occupies several records in the database, as illustrated here:

Normalized Numerical Data

Date SerNum ID Value


1/23/2005 2344 Height 111
1/23/2005 2344 Width 222
1/23/2005 2344 Weight 333
1/23/2005 2345 Height 444

548 • CHAPTER 12: Database Connectivity


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

1/23/2005 2345 Width 555


1/23/2005 2345 Weight 666
1/24/2005 2346 Height 777
1/24/2005 2346 Width 888
1/24/2005 2346 Weight 999

“Denormalizing” this data turns each multi-record reading into a single record
with a column (field) for each unique value of the data identifier. For example,
denormalizing the data above would produce this data:

Denormalized Numeric Data

Date SerNum Height Width Weight


1/23/2005 2344 111 222 333
1/23/2005 2345 444 555 666
1/24/2005 2346 777 888 999

Notice that each unique Date-SerNum pair identifies a separate reading, each
unique value of ID becomes a separate data column, and the original Values for
each ID become the data in the columns. This arrangement makes the data suitable
for use by Quality Analyst.
Quality Analyst can denormalize numerical data (as shown in the example above)
as well as textual data, as shown in the following examples.
In the data table below, each row contains a single observation of a particular
defect on a particular day.

Normalized Text Data (to be Counted)

Date Defect
1/24/2005 Bent
1/24/2005 Scratched
1/24/2005 Bent
1/24/2005 Bent
1/24/2005 Scratched
1/25/2005 Dirty
1/25/2005 Scratched
1/25/2005 Scratched
1/25/2005 Dirty
1/25/2005 Scratched
1/25/2005 Bent
1/25/2005 Scratched
1/25/2005 Scratched

CHAPTER 12: Database Connectivity • 549


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

1/26/2005 Scratched
1/26/2005 Dirty
1/26/2005 Dirty
1/26/2005 Bent
1/26/2005 Torn
1/26/2005 Scratched
1/26/2005 Scratched
1/26/2005 Scratched
1/26/2005 Scratched
1/26/2005 Scratched
1/26/2005 Dirty

Quality Analyst can denormalize this data such that each row is a single date, each
type of defect is a separate column, and the data is the number of occurrences of
that defect on that day. Denormalizing the data above would produce this data:

Denormalized Text Data (Counted)

Date Scratched Bent Dirty Torn


1/24/2005 2 3 0 0
1/25/2005 5 1 2 0
1/26/2005 6 1 3 1

In another example of normalized textual data (illustrated below), each row


contains the goal status for each of three work shifts on a single day.

Normalized Text Data (to be Transcribed)

Date Shift Goal Status


1/10/2005 Day Met
1/10/2005 Night Missed
1/10/2005 Graveyard Exceeded
1/11/2005 Day Met
1/11/2005 Night Met
1/11/2005 Graveyard Exceeded
1/12/2005 Day Missed
1/12/2005 Night Met
1/12/2005 Graveyard Maintenance

Quality Analyst can denormalize this data such that each row contains a single
date, each shift is a separate column, and the data is the goal status for each shift
on that day. Denormalizing the data above would produce this data:

550 • CHAPTER 12: Database Connectivity


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Denormalized Text Data (Transcribed)

Date Day Night Graveyard


1/10/2005 Met Missed Exceeded
1/11/2005 Met Met Exceeded
1/12/2005 Missed Met Maintenance

Selecting Denormalization Variables


To specify denormalization settings, click the Denormalize button on the External
Database Setup dialog box. The Denormalize Table dialog box will appear.

In the Data Field list, select the field in the database that contains the measured
data—that is, the Value , Defect, and Goal Status columns in the examples
above.
In the Column Names Field list, select the field in the database that contains the
data identifiers—that is, the ID , Defect, and Shift columns in the examples
above. (Yes, in the second example, the Data Field and the Column Names Field are
the same.)

Filtering Records for Column Names


The next step is to display all unique values found in the Column Names Field. To
prepare to do this, first specify, in the List Frequent Names area, how many of the

CHAPTER 12: Database Connectivity • 551


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

unique values to display. To display all values, select All. To display only the most
frequently recurring values, select Top, then enter the number of unique values to
display.
If you are connecting to a very large database, be aware that querying the database
to determine those unique values may take more time than you want. So before
you display all column names, you may want to filter the database to limit the data
retrieved to records whose field values match certain criteria. To do this, click the
Filter Names button. The Filter Records to Search for Names dialog box will
appear.

In the drop-down list, select the variable on whose values you want to base your
filter.

To retrieve database records for a single value of that variable:


1 Select Match.
2 Enter the value in the adjacent box.

To retrieve database records for a range of values of that variable:


1 Select From.
2 Select a lower-limit condition from the adjacent drop-down list:
Select “=” to include records where the field value is exactly equal to the
lower limit.
Select “>” to exclude records where the field value is exactly equal to the
lower limit. Values “just greater than” the lower limit will be included.

3 In the adjacent box, enter the lower limit of the desired range.
4 Next to To:, select an upper-limit condition from drop-down list:
Select “=” to include records where the field value is exactly equal to the
upper limit.

552 • CHAPTER 12: Database Connectivity


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Select “<” to exclude records where the field value is exactly equal to the
upper limit. Values “just less than” the upper limit will be included.

5 In the adjacent box, enter the upper limit of the desired range.

Click OK.

Displaying Column Names


After you have defined filters for querying the database, if necessary, click the
Display Names button. The large Column Names list will show all unique values
found in that field, with a check box next to each.

(Note: If you change the List Frequent Names setting after clicking Display
Names, you must click Display Names again to update the list.)
In the Column Names list, select the check boxes next to the values that you want
to turn into data columns in the Data Set. To select all displayed values, click the
Select All Names button.

Grouping Normalized Data


You must also specify how Quality Analyst should group the multiple serial
records into single-record readings. You specify one or more fields from the
database, and Quality Analyst will create a separate record (row) in the
denormalized Data Set for all database records where the value of these fields,

CHAPTER 12: Database Connectivity • 553


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

taken together, is unique. For example, you could configure Quality Analyst to
group records for each unique combination of a date value, a time value, and a lot
number.
In the Group Rows by area, click the New button to select the first grouping field.
The Select Grouping Field dialog box will appear.

This dialog box displays all allowable fields. For date and time fields, there are
additional listings with a grouping parameter, for example month or hour. If you
select one of these “derived” fields, Quality Analyst will not use the exact value of
the field to group records; instead it will group records according to the
supplemental parameter. For example, if you select [Time] (hour), then all database
records from the same hour will become a single record in the Data Set. When you
group by (week), values from each week (Sunday through Saturday) will be
grouped into a single record.
Select the field you want to use, then click OK. Use the New button again to
specify additional grouping fields. To remove a grouping field, select it in the
Group Rows by list, then click Remove.
If the grouping fields you select cause more than one database value to be grouped
into a Data Set record, the value that Quality Analyst uses for the grouped record
depends on the data type of the Data Field:
Numerical Data Quality Analyst computes the mean of all grouped
values.
Text Data Quality Analyst uses the setting in the area labeled Report
Results As (which will appear whenever the Data Field is a text data type).

554 • CHAPTER 12: Database Connectivity


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Select Count if you want Quality Analyst to count the number occurrences of
unique values in that field, as in the Defect example above.
Select Text if you want Quality Analyst to simply return the text value of the
field, as in the Goal Status example above. Note: Because it is not
meaningful to “group” multiple textual values, select Text only if your
settings will ensure that only a single value will be retrieved during grouping.
Otherwise, the denormalized data will not be meaningful.
When you have specified denormalization settings, click OK and skip to Setting
External Database Access Options on page 557.

Using SQL to Create a Data Table


To use SQL commands to create a data table, select SQL in the External Database
Setup dialog box. The large adjacent box will become active, as shown below.

CHAPTER 12: Database Connectivity • 555


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Enter the SQL commands that perform the operations required to define the data
to which you will link your Data Set. (You can use the Paste button on the right to
insert SQL statements copied to the Windows Clipboard from other applications.)

Tip: If you type the statements into the dialog box directly, begin a new line
by pressing <CTRL+ENTER>.

Preparing SQL Statements


SQL, with its not-quite-standard syntax and cryptic error messages, can be
difficult to work with. Quality Analyst passes the commands you enter directly to
the data source with little or no error checking. We suggest building your SQL
statements in Microsoft Access using its QBE (query by example) feature,
copying them to the Clipboard, and pasting them into Quality Analyst. The section
Configuring and Troubleshooting, beginning on page 587, contains important
instructions for configuring Quality Analyst to connect to external databases.

Note: You can use Quality Analyst’s Replaceable Parameters in your SQL
statements for added flexibility in querying the source data. See Using
Replaceable Parameters with Filter Criteria in SQL Statements starting
on page 573 for details.

556 • CHAPTER 12: Database Connectivity


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Defining Attached Tables


If you use SQL to connect to a database such as Oracle using “attached” Microsoft
Access files, you must tell Quality Analyst which tables in the target database the
SQL statements will refer to. To do this, click the Tables button to display the
Attached Tables dialog box.

To select a table, highlight it in the list of Database Tables on the left, and click
Select. The name of the table will move to the list of Selected Tables on the right.
Refer to the section Configuring and Troubleshooting, beginning on page 587,
for more information.

Completing the SQL Query


When you have entered the SQL query, you can press <ENTER> to refresh the list
of Available Fields, or click OK to execute the SQL statements.

Setting External Database Access Options


In the External Database Setup dialog box, clicking Options displays the External
Database Access Options dialog box which lets you override, at the file level,
several global connectivity options. This makes it easier for you to connect to
multiple database types.

CHAPTER 12: Database Connectivity • 557


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Select System Default to use the global settings. (Configuring these global settings
is explained under Configuring Connectivity on page 587.)
Select Custom to override the global parameters with the parameters you specify
in this dialog box. The parameters will be saved for the current Data Set in its
Header file.
For explanations of these settings, see Data Retrieval on page 590 and Database
Options on page 588.

Assigning Database Fields to Quality Analyst


Variables
Once the external database definition is completed, the Database Connectivity
Definition dialog box will appear. The upper half of this dialog box contains the
Database Connectivity Definition form where each column in the Quality Analyst
Data Set is defined. Each row in this grid defines a column in the Data Set you are
creating. The lower half of the dialog box contains two tabs labeled External
Database Fields (discussed in this section) and External Database Filters (discussed
in the next section—Defining Connectivity Data Filters).

558 • CHAPTER 12: Database Connectivity


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

You define your new Data Set by specifying a name and data type for each
column in the Data Set and then assigning a field from the external data source to
the data column using the External Database Fields tab.
Select the External Database Fields tab at the bottom of the dialog box. At the top
of the tab, the Connection type, Data Source, and Table are displayed. Below that,
all Fields requested from the data source are listed in the format
[table].[field_name]. You need not include all of these fields in your Data Set.
You can fill out the Database Connectivity Definition form in any order you find
convenient. For example, you can:
select all fields at once (using the Assign All button), modify the automatically
assigned variable names and data types, if desired, and add descriptions; or
enter all the column names, data types, and descriptions, then assign database
fields; or
select all applicable database fields first, then enter a name, data type, and
description for each; or
fill in one row at a time, entering a name and data type, assigning a database
field, and entering a description for each as you go.

CHAPTER 12: Database Connectivity • 559


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Selecting Fields Individually


In the following example, we will start by selecting the desired fields from the
database data source and then enter a name and data type for each.

To select a database field:


1 In the Database Connectivity Definition form, select an empty cell under
External Database Field.
2 In the External Database Fields tab:
select a field in the Fields list and click Assign,
OR
double-click a field in the Fields list.

The field name will appear as the External Database Field in the Database
Connectivity Definition form.
In the following figure, the fields “DATE” and “TIME” have been selected for the
first two data columns and the field “LOTCODE” is about to be selected for the
third.

560 • CHAPTER 12: Database Connectivity


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

After you have assigned External Database fields to Data Set columns, enter a
variable name and data type for each variable.

The variable name you enter must conform to Quality Analyst rules for variable
names:
They must be 2 to 32 characters long.
They may contain letters (“A”–“Z”), numerals (“0”–“9”), or the underscore
(“_”).
They must begin with a letter.
Each must be unique within a Data file.

The data type must be a legal Quality Analyst data type. (See Data Type on
page 37.) External database field names, on the other hand, need not conform to
Quality Analyst’s rules for naming variables.

Selecting All Fields


If you want to use all fields in your external data source, click Assign All in the
External Database Fields tab. Quality Analyst will copy all field names to the
External Database Field column and the first 32 characters of all field names to the
Name column.

CHAPTER 12: Database Connectivity • 561


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

You can then edit the column names (if you want) and specify data types for each
data column. (Assign All will overwrite any existing contents in the column
definition form.)

Note: Using Assign All can result in duplicate field names if, for example, the
first 32 characters of two external database fields with longer names are
the same. When you click OK, Quality Analyst will detect this and ask
you to correct it.

Using Date-and-Time Fields


Many database programs store date and time as a single field. Quality Analyst can
read these values directly into any DateTime variable (data type D) or time
variable (type T). The resulting DateTime variable will contain date-and-time
data, 10 but the resulting time variable will contain only time data.

10
If you want your DateTime variable (type D) to contain only date data without the time
portion, you must first change a system setting as explained in Handling Date-and-Time
Fields on page 590.

562 • CHAPTER 12: Database Connectivity


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

If you want to store time in a separate Data Set column, Quality Analyst can
extract the time portion of a DateTime database field and write it to a time variable
(type T).

To assign the time portion of a date-and-time field into a time variable:


1 Add the date-and-time field to the list of External Database Fields.
2 Enter “TIME” in the Name column in the same row.
3 Enter “T” in the Type column in the same row.

Defining Connectivity Data Filters


On the External Database Filter tab in the Database Connectivity Definition dialog
box you can define filters to limit the amount of data retrieved from the data
source.

(By default, Quality Analyst will retrieve the entire table from the data source
when you open the Data Set.) The filter criteria you specify here become part of
the data definition stored in the Header file of the Data Set. When you open an
external Data Set that includes filter criteria, Quality Analyst translates the criteria

CHAPTER 12: Database Connectivity • 563


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

into SQL commands and sends them to the external source so the data are filtered
by the external source before being sent back to Quality Analyst.

Note: The External Database Filter tab is only accessible if your Data Set is
based on the single table you selected from the drop-down list in the
External Database Setup dialog box. If you chose instead to base your
Data Set on an SQL query, the External Database Filters tab will not be
available and the SQL commands you enter must perform all necessary
filtering.

When using connectivity filters, please note:


You can define any number of filter criteria. Only data records meeting all
criteria will be returned to Quality Analyst. (That is, “AND” logic is used.)
Any External Database field assigned to the Quality Analyst Data Set may be
used in a filter.
You can specify filters that return records with fields that match specific
values or that fall within a range of values. (See explanations below.)
Filters based on a date field can be set to return records from a specified
number of months or days ending today.
If you change the definition of the Connectivity Data Set, the External
Database filter(s) may be cleared. Quality Analyst will warn you that, unless
you redefine the filter before you click OK, the entire (unfiltered) table will be
retrieved.
The Reset button clears (erases) all current filter criteria and reestablishes the
lists of available fields (Columns). (You may need to click Reset to initialize
the filters when you first create the Data Set.)

564 • CHAPTER 12: Database Connectivity


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Defining Filters to Retrieve Matching Data


To define a connectivity filter to retrieve matching data:
1 Click New and select the database field on which you want to base the filter.

The field name will appear in the list of Filters on the left and in the Column
box.

2 Select Match.
3 Do one of the following:
Enter a value to match in the adjacent box. This must be a legal value for
that variable type.
Select (Ask) from the drop-down list if you want to specify this filter
criterion each time you use the database. (See Using the (Ask) Settings
on page 569.)
Here is an example of a match filter that will retrieve only data produced on
July 1, 2001.

CHAPTER 12: Database Connectivity • 565


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

In this example, the user will be prompted for a match date when the database is
opened.

Defining Filters to Retrieve Similar Data


To define a connectivity filter to retrieve similar data:
1 Click New and select the database field on which you want to base the filter.
The field name will appear in the list of Filters on the left and in the Column
box.
2 Select Like.
3 In the adjacent box, do one of the following:
Enter the string you want to search for, using question marks and
asterisks as “wild cards.” Use a question mark (“?”) to represent any
single character and an asterisk (“*”) to represent one or more characters.
Select (Ask) from the drop-down list if you want to specify this filter
criterion each time you use the database. (See Using the (Ask) Settings
on page 569.)

Here is an example of a filter that will retrieve only data records in which the
LOTCODE field begins with any three characters and ends with -27-F.

566 • CHAPTER 12: Database Connectivity


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Defining Filters to Retrieve Ranges of Data


To define a connectivity range filter:
1 Click New and select the database field on which you want to base the filter.
The field name will appear in the list of Filters on the left.
2 Select From.
3 Select a lower-limit condition from the adjacent drop-down list:
Select “=” to include records where the field value is exactly equal to the
lower limit.
Select “>” to exclude records where the field value is exactly equal to the
lower limit. Values “just greater than” the lower limit will be included.

4 In the adjacent box, do one of the following:


Enter the lower limit of the desired range.
Select (Ask) from the drop-down list if you want to specify the lower
limit each time you use the database. (See Using the (Ask) Settings on
page 569.)

5 Next to To:, select an upper-limit condition from drop-down list:


Select “=” to include records where the field value is exactly equal to the
upper limit.
Select “<” to exclude records where the field value is exactly equal to the
upper limit. Values “just less than” the upper limit will be included.

6 In the adjacent box, do one of the following:


Enter the upper limit of the desired range.
Select (Ask) from the drop-down list if you want to specify the upper
limit each time you use the database. (See Using the (Ask) Settings on
page 569.)

CHAPTER 12: Database Connectivity • 567


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Here is an example of a range filter that will retrieve only data collected during
July 2001.

Example of a data-range filter

You can define an “open-ended” range filter by leaving either the To or the From
entry blank. Here is an example of a range filter that will retrieve only data
collected before August 1, 2001 (“To <”).

Example of an “up to” data-range filter

Here is an example of a range filter that will retrieve only data collected on or
after June 1, 2001 (“From =”).

Example of an “above” data-range filter

568 • CHAPTER 12: Database Connectivity


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To define a “preceding period” connectivity filter:


1 Click New and select the database field on which you want to base the filter.
The field name will appear in the list of Filters on the left.
2 Select During the last month(s) or During the last day(s).
3 In the corresponding box, do one of the following:
Enter a number of months or days (including today).
Select (Ask) from the drop-down list if you want to specify the number of
months or days each time you use the database. (See Using the (Ask)
Settings below.)

Here is an example of a “preceding period” filter that, if executed on June 30,


2005, would retrieve only data collected from June 24 through June 30, 2005.

Example of a “preceding period” filter

Using the (Ask) Settings


When you select the (Ask) option for any filter criterion, Quality Analyst inserts an
appropriate SQL statement in the Header file of the Data Set and sends that SQL
query to the database when you connect to it. These SQL statements use the
Replaceable Parameter syntax described under Prompting for Filter Criteria at
Run Time on page 574. For example, if you selected (Ask) for a Match filter for
the variable DATE in the database DB then Quality Analyst would include the
following SQL statement in the Header file for the Data Set:
SELECT * FROM DB WHERE DATE=#^DATE!MatchFilter#

When you connect to the database, either by opening the Data Set with the Quality
Analyst Editor or by using a CONNECT command in a Run file, you will be
prompted for the appropriate filter criterion in an appropriately labeled dialog box.
(The examples under Prompting for Filter Criteria at Run Time on page 574
show samples of these dialog boxes.)

CHAPTER 12: Database Connectivity • 569


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

If you do not want to be prompted for this filter criterion, but would rather pass
values from the command line or set values within a Run file, you must use this
same syntax in the command line or the SET command. For example:
YES: SET ^DATE!MatchFilter = "10/1/2005"
NO: SET ^DATE = "10/1/2005"
NO: SET ^BeginDate="10/1/2005"
YES: QARFI.EXE $RUN=WTTASK.RUN
^DATE!MatchFilter="10/1/2005"
NO: QARFI.EXE $RUN=WTTASK.RUN ^DATE="10/1/2005"
NO: QARFI.EXE $RUN=WTTASK.RUN ^BeginDate="10/1/2005"

Removing Filters
To remove a connectivity filter:
1 Select the filter in the list of Filters at the far left of the dialog box.
2 Click Remove below the list.

Specifying Key Columns


It is likely that different data will be retrieved from the database each time you
open a Connectivity Data Set. Therefore, it is important to make sure that the SPC
parameters you specify for the Data Set remain synchronized with the data in the
database.
For example, when you configure the center line, control limits, warning limits,
and inner limits for your data (as explained under Center Line and Limits on
page 298), one option lets you calculate those limits from “regions” of data—that
is, from specific sets of records in the database. Quality Analyst needs some way
to associate the regions you define with the actual data records in the database,
since data will probably cycle into and out of the database.
To make this association possible, you must identify one or more “key columns”
in your Data Set whose values, taken together, will uniquely identify each record
in the database. So before you can finalize the definition of your Connectivity
Data Set, you must identify those key columns.

570 • CHAPTER 12: Database Connectivity


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To specify key columns for your Connectivity Data Set:


1 Click the Add button in the Key Columns area. The Select Key Columns dialog
box will appear.

2 Select a field in the list by clicking it.


3 [Optional] Select additional fields by clicking them while holding the
<CTRL> or <SHIFT> keys.
4 Click OK. The field will appear in the list of Key Columns.

5 Repeat to add more key columns, if necessary.

To remove a key column from the list:


1 Click the key column in the list to select it.
2 Click the Remove button.

Quality Analyst uses the key columns to sort the data after retrieving it from the
database, so you must arrange the key columns in order of decreasing sorting
significance—that is, most significant (coarse) first, and least significant (fine)
last.

CHAPTER 12: Database Connectivity • 571


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To re-order the key columns:


1 Select the key column you want to move by clicking it.
2 Click the up or down button (see left) next to the list.

The things that Quality Analyst uses key columns for are listed under Specifying
Key Columns for the Data Set on page 57. We strongly recommend that you
identify key columns for your Data Sets in all cases, but if you are certain you will
never use any of the features listed on page 57, you can forego selecting any key
columns. Simply select the No Key Columns check box before clicking OK in the
Database Connectivity Definition dialog box.

Note: You can specify key columns either in the Database Connectivity
Definition dialog box, or on the Key Columns tab of the Variable Definition
and Specifications dialog box.

Viewing SQL Commands Generated by Filter Settings


When you specify filters for External Databases, Quality Analyst generates the
SQL commands required to connect to and query the database accordingly. After
connecting to the database, you can view the generated SQL commands by
opening the Data menu and selecting Copy SQL to Clipboard. You can then paste
these commands into Notepad or any other suitable application.

Completing Data Definition


When the Data Set definition is complete, select OK in the Database Connectivity
Definition dialog box. Quality Analyst will process the resulting connectivity
request, write the retrieved data table to the Data file of the Quality Analyst Data
Set, and display the data in the Quality Analyst Editor.

572 • CHAPTER 12: Database Connectivity


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Quality Analyst will save the connectivity information in the Header file of the
new Connectivity Data Set. When you close the Data Set, the Data file will be
retained on disk. Each time Quality Analyst uses the Data Set, it will try to reread
the data from the external source. If it is unable to do so, it will offer to use the
Data file retained from the last successful retrieval.

Note: Now that you have connected your Data Set to your database, you should
configure the other parameters of the Data Set. See Specifying Variable
Definition and Specifications on page 35 to specify variable
descriptions, specifications, Input Masks, numeric formats, axis labels,
and assignable causes and corrective actions. See Specifying Column
Definition and Calculations on page 61 if you need to define additional
calculated variables.

Using Replaceable Parameters with Filter


Criteria in SQL Statements
If your Connectivity Data Set uses an SQL query to filter the database, you can
use Replaceable Parameters within your SQL statements to have Quality Analyst:

CHAPTER 12: Database Connectivity • 573


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

prompt you for a filter criterion as it connects to the database,


use a filter criterion that is set within a Run file, or
use a filter criterion that is passed from the command line.

For example, let’s look at this typical SQL statement:


SELECT PRODUCT, WT FROM DB WHERE DATE>=#10/1/2004#

Note: This example statement shows the Microsoft Access SQL syntax for
denoting a date constant (it is enclosed by two “#” characters) which
differs from the syntax of other varieties of SQL. If you are passing the
query to an external database (see Opening Databases on page 588) that
uses a different variety of SQL, you must use the correct syntax for that
variety of SQL in all your statements. Consult your database’s
documentation for more information.

This statement retrieves the fields PRODUCT and WT from a database named DB
for records where the value of the DATE field is on or later than 10/1/2004.
But rather than “hard-wire” the date 10/1/2004 into the query, Quality Analyst lets
you supply the date each time the database is queried. There are three ways you
can supply this value:
by having Quality Analyst prompt for it at run time,
by setting it within a Run file, or
by setting it on the command line for the Run File Interpreter.

Prompting for Filter Criteria at Run Time


To have Quality Analyst prompt you at run time for values of Replaceable
Parameters to be used as filter criteria, use the following syntax:
^[column name](prompt type)

Command Parameter Description


[column name] the column name as it appears in the External Database
Filters tab of the Database Connectivity Definition dialog box

(prompt type) the type of prompt to display, when applicable:
“!FromFilter” prompts for the beginning value of a

574 • CHAPTER 12: Database Connectivity


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

range. ‡
“!LastDaysFilter” prompts for the number of
recent days to include.
“!LastMonthsFilter” prompts for the number of
recent months to include.
“!LikeFilter” prompts for a “mask” or “template”
with wildcards.
“!MatchFilter” prompts for an exact value for the
variable. ‡
“!ToFilter” prompts for the ending value of a range.

† If the column is one of a multicolumn subgroup, add a colon and the column number to the variable
name (for example, WEIGHT:3).
‡ Wording in the prompt will reflect the data type of the variable and whether the value entered will be
included or excluded.

All (prompt type)s cause Quality Analyst to display an appropriately labeled


dialog box which prompts for user input and checks it for validity. Additionally,
the !FromFilter, !MatchFilter, and !ToFilter prompt types are labeled
differently depending on the data type of the [column name] specified.
Though (prompt type) is optional, we highly recommend using it because it
reduces the likelihood of user errors. If you omit it, Quality Analyst displays a
generically labeled dialog box and does not validate input.
Example: Let’s say you have a Run file named LUMBTASK.RUN that connects
to a Connectivity Data Set named LUMBER.DAT. If the pertinent section of the
Run file contains the line:
CONNECT LUMBER.DAT

and your SQL contains the statement:


SELECT * FROM lumber WHERE Date>=#^Date!FromFilter#

(see note on SQL syntax on page 574) and you start the Run File Interpreter with
the command line:
QARFI.EXE $RUN=LUMBTASK.RUN

then Quality Analyst will display this dialog box:

CHAPTER 12: Database Connectivity • 575


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Note that the dialog box displays the variable name (Date), the description of the
variable (“Date Produced”) taken from the Header file of the Data Set, and
appropriate labeling for the data-entry box based on the data type (DateTime) and
the “>=” preceding the first “#” in the SQL statement. If the user enters 6/1/04
and clicks OK, Quality Analyst replaces “^Date!FromFilter” in the SQL
statement with “6/1/04” and passes the SQL statement to the database as:
SELECT * FROM lumber WHERE Date>=#6/1/04#

Here are some examples of other prompting dialog boxes and the SQL statements
that produce them. (See note on SQL syntax on page 574.)
This SQL statement:
SELECT * FROM Lumber WHERE Date<#^Date!ToFilter#

produces the following dialog box.

This SQL statement:


SELECT * FROM lumber WHERE shift="^shift!MatchFilter"

produces the following dialog box.

This SQL statement:

576 • CHAPTER 12: Database Connectivity


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

SELECT * FROM products WHERE Product LIKE


"^PRODUCT!LikeFilter"

produces the following dialog box.

This SQL statement:


SELECT * FROM Lumber WHERE Date > DATEADD("d", -
^Date!LastDaysFilter, NOW())

produces the following dialog box.

This SQL statement:


SELECT * FROM Lumber WHERE Date > DATEADD("m", -
^Date!LastMonthsFilter, NOW())

produces the following dialog box.

This SQL statement:


SELECT * FROM Lumber WHERE shift="^ActiveShift"

produces the following dialog box.

CHAPTER 12: Database Connectivity • 577


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Setting Filter Criteria within Run files


Let’s say you have a Run file named WTTASK.RUN that connects to a
Connectivity Data Set named WEIGHT.DAT. If the pertinent section of the Run
file contains the lines:
SET ^BegDate = "10/1/99"
CONNECT WEIGHT.DAT

and your SQL contains the statement:


SELECT PRODUCT, WT FROM DB WHERE DATE>=#^BegDate#

(see note on SQL syntax on page 574) and you start the Run File Interpreter with
the command line:
QARFI.EXE $RUN=WTTASK.RUN

then Quality Analyst will take “10/1/99” from the SET command, substitute it
for “^BegDate” in the SQL statement, and pass the SQL statement to the
database as:
SELECT PRODUCT, WT FROM DB WHERE DATE>=#10/1/99#

Quality Analyst recognizes the caret (“^”) as the beginning of a Replaceable


Parameter and processes the following characters accordingly.
If the definition of your Connectivity Data Set includes an (Ask) setting, you can
specify a value for that filter criterion within a Run file using a SET command and
avoid being prompted for the criterion. If you do so, be sure to use the syntax
described under Prompting for Filter Criteria at Run Time on page 574. See
Using the (Ask) Settings on page 569 for more information.

Passing Filter Criteria from the Command Line


Let’s say you have a Run file named WTTASK.RUN that connects to a
Connectivity Data Set named WEIGHT.DAT. If the pertinent section of the Run
file contains the line:

578 • CHAPTER 12: Database Connectivity


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

CONNECT WEIGHT.DAT

and your SQL contains the statement:


SELECT PRODUCT, WT FROM DB WHERE DATE>=#^FromDate#

(see note on SQL syntax on page 574) and you start the Run File Interpreter with
the command line:
QARFI.EXE $RUN=WTTASK.RUN ^FromDate ="10/1/04"

then Quality Analyst will take “10/1/04” from the command line and substitute
it for the Replaceable Parameter “^FromDate” in the SQL statement and pass the
SQL statement to the database as:
SELECT PRODUCT, WT FROM DB WHERE DATE>=#10/1/04#

Quality Analyst recognizes the caret (“^”) as the beginning of a Replaceable


Parameter and processes the following characters accordingly.
If the definition of your Connectivity Data Set includes an (Ask) setting, you can
pass a value for that filter criterion to the Run File Interpreter on the command
line and avoid being prompted for it. If you do so, be sure to use the syntax
described under Prompting for Filter Criteria at Run Time on page 574. See
Using the (Ask) Settings on page 569 for more information.

Viewing SQL Commands Generated by


Replaceable Parameters
When you include Replaceable Parameters in your SQL statements, Quality
Analyst replaces those parameters with the SQL commands required to connect to
and query the database accordingly. After connecting to the database, you can
view the generated SQL commands by opening the Data menu and selecting Copy
SQL to Clipboard. You can then paste these commands into Notepad or any other
suitable application.

Using Connectivity Data Sets


Using a Connectivity Data Set is as easy as using a standard Quality Analyst Data
Set. In the Quality Analyst Editor, when you open the File menu and select Open,
Connectivity Data Sets are listed among the standard Data Sets.
When you select a Connectivity Data Set to open, there is a short delay while
Quality Analyst connects to the data source and retrieves the data. If you defined

CHAPTER 12: Database Connectivity • 579


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

the Data Set to prompt you for any filter criteria (by specifying (Ask) as a filter
value, for example), one (or more) of several possible dialog boxes may appear.
(See Prompting for Filter Criteria at Run Time on page 574 for examples of
possible dialog boxes.)
After the data is retrieved from the source, Quality Analyst stores it as a standard
Quality Analyst Data Set, so you will experience the same performance level, after
the file is open, as when you work with a standard Quality Analyst Data Set.
After opening a Connectivity Data Set, you may want or need to update the local
data periodically by re-querying the database. To do this, open the Data menu and
select Query Database.
Also, when Quality Analyst opens a Connectivity Data Set, it will use the
connection definition stored in the Header file of the Data Set. If the structure or
location of the database has changed since the Data Set was created, Quality
Analyst may have problems retrieving the data. The error messages produced may
not be useful in identifying the source of the error since the problem may be the
database application, a network problem, configuration changes, and so on. If you
encounter such problems, refer to Configuring and Troubleshooting beginning
on page 587, or contact your Information Systems administrative or support staff
before calling NWA.

Modifying Connectivity Data Sets


After you have created a Connectivity Data Set, you can change the definition of
the Data Set by:
adding or removing fields,
changing field assignments,
adding or changing an External Database filter, or
changing the External Database source file or table.

As you change the data definition, you may experience delays or pop-up
messages. This is because Quality Analyst may connect and reconnect to the data
source, sending commands and receiving results, as you redefine the Data Set. The
nature and length of these delays will depend on the type and location of the data
source. Remember, though, that once your Data Set is defined and opened, you
can expect the same performance from a Connectivity Data Set as from a standard
Quality Analyst Data Set.
To change the External Database definition, open the Edit menu and select
Database Connectivity Definition. The Database Connectivity Definition dialog box
will appear.

580 • CHAPTER 12: Database Connectivity


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

It should look just as it did when you finished defining the External Database
columns when you created the Data Set. Remember, the rows in this form define
columns in the Data Set.

CHAPTER 12: Database Connectivity • 581


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To change the Connection, Data Source, or Table for the Data Set:
1 Click the External button. The External Database Setup dialog box will appear.

2 Select a new Connection from the drop-down list.


3 Click Select, and select a new Data Source either from the drop-down list or
the Windows Open File dialog, as described under Selecting a Data Source
on page 546.
4 Do one of the following:
Select a new Table from the drop-down list,
Select SQL and, in the adjacent box, enter SQL commands that will create
the table you want to use for the Data Set. (Specify target tables, if
necessary, using the Tables button.)

Note: If you change the Data Source or Table, all field references and data
filters will be deleted. The Quality Analyst column names will be
retained but you may need to modify them to match the fields you
choose from the new source or table for the new data definition.

582 • CHAPTER 12: Database Connectivity


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To add a new column to the data definition:


1 In the Database Connectivity Definition form, select an empty cell under
External Database Field.
2 In the External Database Fields tab:
select a field in the Fields list and click Assign,
OR
double-click a field in the Fields list.

The field name will appear in the cell in the form.


3 Enter a variable name, data type, and description (optional) for each variable.

To remove a database field assignment from the data definition:


1 In the Database Connectivity Definition form, select the External Database
Field you want to remove from the data definition.
2 Click Remove.

To change the connectivity filter(s):


Follow the steps under Defining Connectivity Data Filters on page 563.

Note: Be sure to redefine any filters that were based on fields you
removed.

When you are done redefining the Data Set, select OK. The data from the previous
definition will be discarded and the new connectivity definition will be used to
create a new Data file.

Using Database Connectivity in Run files


Overview
You can use data from external sources in Quality Analyst Run files by
establishing a connectivity definition for the Data Sets referenced in the Run file.
A command placed in the Run file causes Quality Analyst to make the defined
connection and download the data. This command must reference each
Connectivity Data Set used in the Run file before the data is used for charting.

CHAPTER 12: Database Connectivity • 583


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

The steps are:


1 Use the Quality Analyst Editor to define the necessary Connectivity
parameters for each Data Set used in the Run file and make sure the desired
data is downloaded.
2 Include a USETEMPDIR command (see below) if the Connectivity Data Set
is located in a shared directory for use by more than one user at a time.
3 Include a CONNECT command (see below) in the Run file for each Data Set
before the Data Set is referenced for charting.
4 If your data definition includes calculated variables, include a CALC
command (see below) in the Run file after the CONNECT command.

Note: If the CONNECT command is not used, the data present in each Data Set
at the time the Run file is executed will be used. This will likely be “left
over” from the last time the Data Set was used.

The USETEMPDIR Command


If a Connectivity Data Set is located in a shared directory for use by more than one
user at a time, you should use the USETEMPDIR command in your Run files to
avoid potential file conflicts.
The syntax for the USETEMPDIR command is:
USETEMPDIR [ON]|OFF

See USETEMPDIR on page 480 for details.

The CONNECT command


The CONNECT command establishes a connection to an external database. The
syntax for the CONNECT command is:
CONNECT filename.dat

The CONNECT command for a Data Set may occur anywhere in the Run file as
long as it is before the Data Set is first referenced for processing.

Tip: Put all CONNECT commands at the top of a Run file where they are
easily located and sure to be processed before the Data Sets are used.

584 • CHAPTER 12: Database Connectivity


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

The CALC Command


The CALC command calculates calculated variables, if any, in a Data Set. If the
data definition for your connectivity Data Set includes calculated variables, you
should include a CALC command after the CONNECT command to ensure that
the calculated variables are updated to reflect any new or changed data in the
external database.
The syntax for the CALC command is:
CALC filename.dat

Replaceable Parameters and Connectivity


If the definition of your Connectivity Data Set includes any of the “(Ask)” settings
for filter criteria (see page 569), or if it uses custom SQL statements that include
Replaceable Parameters (as explained under Using Replaceable Parameters with
Filter Criteria in SQL Statements on page 573), then you will be prompted for
filter criteria each time you CONNECT to that database (just as you would if you
were to open the Data Set in the Quality Analyst Editor).

Example prompt resulting from an “Ask” setting in the definition of a


Connectivity Data Set

To avoid being prompted for input at run time, you can include SET commands in
your Run file to “pre-assign” values to the Replaceable Parameters in the SQL.
Pre-assigning filter criteria is illustrated under Setting Filter Criteria within Run
files on page 578. But you can also pre-assign other Replaceable Parameters, as
illustrated in the last example below.
Read more about Replaceable Parameters starting on page 484.

Examples
In the following Run file, the data for the Data Set named DIAMETER is
downloaded before it is used to create an IR chart:

CHAPTER 12: Database Connectivity • 585


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

CONNECT DIAMETER.DAT
IR DIAMETER.DAT DIAM I R G
CHART

In the following Run file, the data for the Data Set named PLATES, which
contains calculated variables, is downloaded and calculated before it is used to
create an IR chart:
CONNECT PLATES.DAT
CALC PLATES.DAT
IR PLATES.DAT THICK I R G
CHART

In the following Run file, four different Data Sets are used. Three of them
(LINE1.DAT, LINE2.DAT, and LAB.DAT) are Connectivity Data Sets and one
(TEST.DAT) is a standard Quality Analyst Data Set. Note that the CONNECT
command for LAB.DAT could have appeared at the top of the file:
CONNECT LINE1.DAT
CONNECT LINE2.DAT
XRS LINE1.DAT WEIGHT X R G
CHART
XRS LINE2.DAT WEIGHT X R G
CHART
IR TEST.DAT PH I R G ONE.NWG
PCAP TEST.DAT PH G TWO.NWG
CONNECT LAB.DAT
IR LAB.DAT VISC I R G THREE.NWG
PCAP LAB.DAT VISC G FOUR.NWG
CHART GROUP 2V2H ONE.NWG TWO.NWG THREE.NWG FOUR.NWG

Let’s say you have a Run file named WTTASK.RUN that connects to a
Connectivity Data Set named WEIGHT.DAT. If the pertinent section of the Run
file contains the lines:
SET ^Prod1 = "PRODUCT"
SET ^Prod2 = "WT"
SET ^Date = "10/1/99"
CONNECT WEIGHT.DAT

and the SQL statement in the definition of the Connectivity Data Set contains the
statement:
SELECT ^Prod1, ^Prod2 FROM DB WHERE DATE>=#^Date#

and you start the Run File Interpreter with the command line:
QARFI.EXE $RUN=WTTASK.RUN

586 • CHAPTER 12: Database Connectivity


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

then Quality Analyst will take “PRODUCT” and “WT” and “10/1/99” from the
SET commands, substitute them for “^Prod1” and “^Prod2” and “^Date” in the
SQL statement, and pass the SQL statement to the database as:
SELECT PRODUCT, WT FROM DB WHERE DATE>=#10/1/99#

Configuring and Troubleshooting


Quality Analyst with Connectivity was designed to connect to a wide variety of
data sources under many circumstances. Setting up the initial connection can be a
complex task that may require some trial and error. Quality Analyst with
Connectivity is highly configurable and lets you meet the requirements of many
different data sources and connection techniques.
Quality Analyst with Connectivity uses the same database “engine” (named “Jet”
by Microsoft) as Microsoft Access. This provides a number of distinct advantages
in flexibility and performance, but also affects configuration (see Microsoft
Access / Jet Database Engine on page 593).
You can configure most of the parameters that control and help debug external
database connections on the External Database tab of the Quality Analyst Settings
dialog box. These are explained in the next section.

Configuring Connectivity
To configure Connectivity, click Settings on the main Quality Analyst start-up
screen. In the Quality Analyst Settings dialog box, select the External Database tab.

CHAPTER 12: Database Connectivity • 587


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Database Options
When connecting to an external database, Quality Analyst can either open the
database, or attach the external database tables to a temporary database created by
Quality Analyst. It may seem roundabout for Quality Analyst to create a
temporary database and attach tables, but there can be advantages depending on
the particular database and type of connection used.

Note: You can override these global Database Options settings for an individual
Data Set. See Setting External Database Access Options on page 557 for
details.

Opening Databases
To open the external database select Open Database. If you choose this option,
select Pass SQL to Database for Processing if you want to pass Structured Query
Language (SQL) queries to the external database for evaluation. Clear this check
box if you want the Jet Database Engine to evaluate SQL queries.
Despite (or perhaps because of) many SQL “standards,” each database has its own
unique SQL syntax. Jet Database Engine SQL matches Microsoft Access SQL. If

588 • CHAPTER 12: Database Connectivity


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

the Jet Database Engine interprets the query, Microsoft Access can be used to
create the SQL statement.
If the query is passed on to the external database for evaluation, functions unique
to its SQL can be used. You can also use the pass-through setting when the table
or field names of the external database don’t match the Jet Database Engine
naming restrictions.

Attaching Databases
To attach external tables to a temporary database, select Attach Tables to
Temporary Databases.
Table and field names in remote databases don’t always match the Microsoft Jet
Database Engine syntax. In some databases, the table name has a prefix consisting
of an “owner” name and a period. Whereas the Jet Database Engine expects
database field names in the form “table.field”, these databases return
“owner.table.field.” If you select Modify Table Names for Jet Engine, Quality
Analyst will try to modify the internal table names so they are acceptable to the Jet
Database Engine (“owner.table” is changed to “owner_table”). If an SQL query is
used, it is also modified.

Saving the Password with a Data Set


If your external database is password-protected, select Save Password with Data
Set if you want to save your user name and password in the Header file of the
Data Set. When you subsequently open the Data Set, Quality Analyst will retrieve
the user name and password from the Header file rather than ask you to enter it
each time. This applies to normal use and in Run files containing commands that
access the external database.
This setting can be a time-saving convenience but can also pose a security risk
since Header files are XML files which contain plain text. You can mitigate this
risk by having Quality Analyst encode the user ID and password before storing
them. To do this, select the Encode User ID and Password check box. (This setting
has no effect if the Save Password with Data Set check box is cleared.)

Blocking Records From Non-Data Queries


Select the Block Records from non-data Queries checkbox to speed up the process
of defining the connection to a specialized database. This prevents Quality Analyst
from retrieving data records when all it needs is field names. This checkbox is
selected by default; you should leave it checked unless you encounter problems
while defining the connection.

CHAPTER 12: Database Connectivity • 589


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Confirming Database Queries


Select the Ask user if Database should be Queried check box to have Quality
Analyst ask if you want to query the database to refresh the data each time you
open the Data Set. If you select No when asked, Quality Analyst will use the data
currently in the Data file. This is convenient if the database is large (and takes a
relatively long time to query) and all you want to do is modify the configuration
parameters of the Data Set. If you select Yes when asked, Quality Analyst will
refresh the Data Set with the data in the database, just as if this check box were
clear. Note: You can force Quality Analyst to query the database by opening the
Data menu and selecting Query Database.

Handling Semicolons in SQL


Select the Remove Semicolons from SQL check box if you want Quality Analyst to
remove semicolons from the SQL statements it creates behind the scenes before
sending the SQL commands to the external database. Clear this check box to send
all semicolons to the database. You will probably need to use this setting only if
asked to do so by NWA technical support staff while troubleshooting your
connection.

Handling Date-and-Time Fields


Select the Retrieve Time Portion of DateTime Fields check box if you want Quality
Analyst to retrieve the time portion of date-and-time fields from the external
database when the field is assigned to a DateTime (type D) Data Set variable.
Clear this check box to retrieve only the date portion. You may want to clear this
check box if you are using an existing Data Set in which date and time are defined
as separate variables. When this check box is clear, Quality Analyst will still read
the time portion of the DateTime field if it is assigned to a time (type T) variable.

Note: Clearing this check box allows Quality Analyst to mimic the behavior of
earlier releases of Quality Analyst in which date (type D) variables
contained only the date portion of a date-and-time field.

Data Retrieval
In the area labeled Data Retrieval, select Snapshot to return actual data records
from an external database to Quality Analyst. Select Dynaset to return keys to
database records instead of the actual records.
Either setting will work with any access method. Which technique is fastest
depends on factors outside the scope of Quality Analyst. Only by experimenting

590 • CHAPTER 12: Database Connectivity


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

with both can you determine the fastest technique. The results may, in fact, be
nearly identical.

Note: You can override these global Data Retrieval settings for an individual
Data Set. See Setting External Database Access Options on page 557 for
details.

Database Debugging
In the area labeled Database Debugging, select Debug Window if you want Quality
Analyst to display a dialog box containing details of each database command
before the command is issued. This method is tedious to use, but provides
immediate feedback on each step of database connectivity.
Select Debug Logging if you want Quality Analyst to write details of each database
command to a log file.
See Debug and Message Logging on page 597 for more information.

Note: To view the log file, open the Help menu of the Quality Analyst Editor,
select About Quality Analyst, then click the Show Debug Log button. You
can print the log or copy it to the Clipboard. Northwest Analytical
technical support will often ask that you fax or e-mail them a copy of the
log (an Email button is provided for the latter). The log file is cleared
when you exit Quality Analyst.

ODBC Settings
In the area labeled ODBC Settings, enter timing parameters for ODBC (Open
DataBase Connectivity) connections.
In the Login Timeout box, enter the number of seconds Quality Analyst should
wait for the ODBC database to respond before canceling the attempt to connect to
the database.
In the Query Timeout box, enter the number of seconds Quality Analyst should
wait for the ODBC database to respond to a query before canceling the query.
In the Connection Timeout box, enter the number of seconds Windows should
keep the ODBC connection open after Quality Analyst requests it to close. The
default setting is 1 second. If you enter 0, the ODBC connection will remain open
until you close Quality Analyst. Windows does this because it’s more “efficient”
if the connection is reopened a second time. During the time Quality Analyst has

CHAPTER 12: Database Connectivity • 591


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

an open ODBC connection, applications that require exclusive use of the external
database cannot run. Setting this parameter to one second reduces the potential for
conflict.

MS Jet Database Engine


The area labeled MS Jet Database Engine contains several settings that manage
how Microsoft Access security affects Quality Analyst connectivity.
If you select Use Access Security File, Quality Analyst will instruct the Jet
Database Engine to use the Access System Database (often named
SYSTEM.MDW). This file contains the permissions for all user identifications
and passwords. The user’s identification and password can only be verified if this
file is available.
The Access System Database file may be in the NWA Quality Analyst directory
where the Jet Database Engine can find it, but generally it is in a different
directory. Select Always Ask for Access Security File if you want Quality Analyst
to prompt you for the location of the Access System Database each time you
connect to the database. If you leave this setting cleared, Quality Analyst will ask
you once for its location the next time you connect to the database. After you enter
its location, Quality Analyst stores it for subsequent use. (To change the location
of this file later, return to this tab, select Always Ask for Access Security File,
connect to the database, enter the location of the file when prompted, close the
connection to the database, return to this tab, and clear the Always Ask for Access
Security File check box again.)
If you clear the Use Access Security File check box, user identifications and
passwords cannot be verified, so you should clear the Access Logon check box
(see below). No Access security will be used.
It might seem that, by clearing the Use Access Security File and Access Logon
check boxes and hiding SYSTEM.MDW, the entire security system can be
circumvented. While this will allow the Microsoft Jet Database Engine to be used
without a user identification and password, Microsoft Access databases that were
created with password security will not be directly accessible.
Select Access Logon if you want Quality Analyst to send a user name and
password to the Jet Database Engine. Enter the User Name and Password in the
adjacent boxes. If you select Ask for Access Logon, Quality Analyst will prompt
you for a username and password each time you connect to an external database.
The current settings for User Name and Password, if any, will appear as defaults in
that prompt.
Before entering a User Name and Password here on the External Database tab, you
should consider the security risk. Anyone using the computer can view these

592 • CHAPTER 12: Database Connectivity


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

settings. If strict security is vital, leave Password (and maybe even User Name)
blank and select Ask for Access Logon.
The user name and password are used whenever the Jet Database Engine is
started. Jet uses them with all external databases. In addition, with password-
protected Microsoft Access databases, the user identification and password must
have “read” permission for the database.
If you clear the Access Logon check box, the Jet Database Engine will use
“Admin” for User Name and nothing for Password.

Microsoft Access / Jet Database Engine


NWA Quality Analyst uses the Microsoft Access / Jet Database Engine to connect
to all external databases. Whether Quality Analyst is connected directly to desktop
databases or remote corporate databases, the Jet Database Engine handles all
database communications. Most of the Database Connectivity parameters affect
how the Jet Database Engine is initialized and run. Microsoft Access need not be
installed on the user’s system to use the Jet Database Engine; all necessary Jet
Database Engine files are installed with Quality Analyst with Connectivity.
The Jet Database Engine is also used in Microsoft Access, so settings and
procedures used in Access usually apply to Quality Analyst Connectivity. For
example:
Structured Query Language (SQL) queries created in Microsoft Access can be
pasted directly into Quality Analyst. Since Microsoft Access uses
sophisticated Query-By-Example (QBE) technology to easily generate SQL
statements, even users with little SQL knowledge can use this technique.
The security system used in Microsoft Access is also applied to the Jet
Database Engine. This can be an advantage if Access databases are used; one
security system handles everything. However, if non-Access databases also
have security systems, the user may have to enter passwords for both systems.
Jet Database Engine security can be disabled; see the following section.

Microsoft Access / Jet Database Engine Security


The Microsoft Jet Database Engine is used by Quality Analyst whenever an
external database is accessed. As its name implies, the Microsoft Access / Jet
Database Engine is also used by Microsoft’s Access Database. If Microsoft
Access security is enabled, a legitimate user identification and password are
required to connect to any database. All external databases, whether they are
Access, ODBC, Paradox, Oracle, SQL Server, or any other data source, will
trigger Jet Database Engine security.

CHAPTER 12: Database Connectivity • 593


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Microsoft Access must be used to assign user identification and passwords; this
cannot be done from Quality Analyst. Once Quality Analyst has initialized the Jet
Database Engine with the user identification and password, they stay in effect
through the entire Quality Analyst session. To change the Jet Database Engine
user identification and password, you must exit and restart Quality Analyst.
External databases accessed through ODBC may have their own security systems.
Generally ODBC drivers will query you for a user identification and password. If
Microsoft Access security is used and an external database also has security, you
may be queried for several passwords before a database is available. In this
situation, the Jet engine can be run without any security so only the external
database security must be satisfied.
You can configure several security parameters to manage how Microsoft Access
security affects Quality Analyst connectivity. (See the section on MS Jet
Database Engine on page 592.) The tradeoffs between ease of use and security
should be considered for each situation.

Open Database Connectivity (ODBC)


Quality Analyst lets you connect to many external databases (such as those created
by Oracle or SQL Server) using ODBC drivers. ODBC drivers are available from
several sources. Usually, when a database is installed, the ODBC driver for the
database can be installed as well. Microsoft Office for Windows includes several
ODBC drivers. ODBC drivers can also be purchased directly from several
different companies.
When you install Quality Analyst, ODBC drivers for Oracle and SQL Server are
installed. The installation program will not, however, replace any ODBC drivers
that are already installed on your system.
ODBC data sources are configured using the Data Sources (ODBC) program in
the Administrative Tools folder of the Windows XP Control Panel. (Versions of
Windows before XP have no Administrative Tools folder.) When setting up
databases for use by Quality Analyst, be sure to use the 32-bit ODBC Control
Panel program. Depending on what drivers are installed on your system, it may be
labeled “Data Sources (ODBC),” “ODBC,” or “32-bit ODBC.” If your Control
Panel includes a “32-bit ODBC” icon (shown at left with “32”), use it.

Database Access Methods


Using Quality Analyst’s External Database Setup dialog and the External Database
tab of the Quality Analyst Settings dialog box. several different Database access
methods and options are available:

594 • CHAPTER 12: Database Connectivity


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

1 NWA Quality Analyst may connect directly to the database, or ODBC can be
used (see the “Connection” list box in the External Database Setup dialog).
2 The entire database may be opened, or individual data tables may be attached
to a temporary database created by Quality Analyst (see the Open Database
setting on the External Database tab of the Quality Analyst Settings dialog
box).
3 Data tables attached to a temporary database can be renamed to match Jet
Database Engine naming restrictions (see the Modify Table Names for Jet
Engine setting on the External Database tab of the Quality Analyst Settings
dialog box).
4 Data can be retrieved from a single database table, or a user-defined SQL
query can be executed (see Specifying a Data Table on page 547).
5 A user-defined SQL query may be evaluated by the Jet Database Engine, or
passed to the external database for evaluation (see the Pass SQL to Database
for processing setting on the External Database tab of the Quality Analyst
Settings dialog box).
6 Results can be returned as keys to the data, or as the actual data records (see
the Dynaset and Snapshot settings on the External Database tab of the Quality
Analyst Settings dialog box).

Which Options Are Best?


Not all options are available for all of the databases. This makes finding the “best”
options challenging.
If Microsoft Access is available, it can be used to define a database that attaches
the tables of external databases. This allows Microsoft Access to handle all the
details of connecting to remote databases; Quality Analyst need only connect to
the Access database.
If Microsoft Access is used to connect external databases, tables from separate
databases can be joined in a single Quality Analyst Data Set through Access, even
if different kinds of databases are used. Also, if an Access database is used, SQL
queries can be created in Microsoft Access using its Query-By-Example (QBE)
technology and pasted into the SQL text box on Quality Analyst’s External
Database Setup dialog box. Not only is this an easy way to generate SQL queries,
but Microsoft Access optimizes the query using its “Rushmore” data-access
technology.

CHAPTER 12: Database Connectivity • 595


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

The disadvantage of using Microsoft Access is that Access must be available to


each user, and Access must be used to initially establish the connections to the
other databases.
Assuming that Microsoft Access is not used as an intermediary to connect to other
databases, the following paragraphs discuss which options can be used with
various databases.

Remote Databases (SQL Server, Oracle, etc.)


ODBC is the only valid type of connection for these databases.
Table and field names in these databases don’t always match Jet Database Engine
restrictions; each table name has a prefix consisting of an owner name and a
period. Whereas Jet expects database field names in the format “table.field”, these
databases return “owner.table.field”. This conflict can be resolved in the following
ways:
If a single table is attached to a temporary database (Open Database setting
cleared), Quality Analyst can modify the internal table name (Modify Table
Names for Jet Engine setting selected) so it is acceptable to Jet. In this case,
“owner.table” is changed to “owner_table”.
If an SQL query is used and the database is opened directly (Open Database
setting selected), the SQL query must be passed through to the database for
evaluation (Pass SQL to Database for Processing setting selected). It is not
possible to write the query in a form that Jet can interpret. The query must be
expressed in the database’s native SQL dialect.
If an SQL query is used and the database tables are attached to a temporary
database created by Quality Analyst (Open Database setting cleared), Quality
Analyst can modify the internal table names and SQL query (Modify Table
Names for Jet Engine setting selected) to a form that Jet will understand. In the
SQL query, “owner.table” is automatically changed to “owner_table”.

Microsoft Access Databases


Microsoft Access databases can only be connected directly through the Jet
Database Engine—not through ODBC.

Paradox, dBase, and FoxPro Databases


Quality Analyst connects to Paradox, dBase, and FoxPro databases only directly
through the Jet Database Engine—not through ODBC. This requires that you clear
the Pass SQL to Database for Processing check box.

596 • CHAPTER 12: Database Connectivity


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Other Desktop Databases


Other desktop databases such as Lotus Approach may be used if an appropriate
ODBC driver is available. With the 16-bit version of Quality Analyst, ODBC may
not function with the Jet 2.0 / Visual Basic 3.0 compatibility layer. SQL pass-
through (Pass SQL to Database for Processing selected) will only function if the
database is opened (Open Database selected).

Debug and Message Logging


When you encounter problems in setting up or using an external database
connection, logging the commands sent by Quality Analyst and the messages
returned by the different database components can help troubleshoot the problem.
When Debug Window is selected on the External Database tab of the Quality
Analyst Settings dialog box (see page 591), Quality Analyst displays, in a message
box, all commands it sends and any replies it receives from the various external
database components. The user must acknowledge each message by selecting OK.
In this dialog box, you can also Print the log and set up the Printer.

When Debug Logging is selected on the External Database tab of the Quality
Analyst Settings dialog box (see page 591), all debug information is saved to a log
file. This is true even if Debug Window is not selected. In the single-user version of
Quality Analyst, the log file is named LOG.TMP and is located in the Quality
Analyst folder. In the LAN version, the log file is named LOGnnnnn.TMP (where
nnnnn is the user number) and is located in the Temporary File Path (see File
Paths and Permissions on page 269).
The debug log file is an ASCII text file and may be read by any editor or word
processor. To display the debug log file in Quality Analyst, first open the Help
menu and select About Quality Analyst.

CHAPTER 12: Database Connectivity • 597


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Note: You can print the information in this dialog box or copy it to the
Clipboard by clicking Print or Copy respectively. Or you can click the
Email button to send this information directly to NWA Technical
Support.

If Debug Logging is selected, this dialog box will include a Show Debug Log
button. Click it to display the debug log file.

598 • CHAPTER 12: Database Connectivity


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

To print the debug information, click Print. To copy the information to the
Clipboard, click Copy. If you need technical assistance from NWA, faxing or
e-mailing this information to us may help us resolve your problem. An Email
button is provided for the latter.

Getting Technical Support for Connectivity


Quality Analyst with Connectivity lets you connect to a wide variety of external
databases using any of several techniques. Though it makes establishing these
connections relatively easy, because of the large number of possible types of
connections, establishing and maintaining those connections may not always
proceed trouble-free.
If you encounter problems connecting Quality Analyst to an external database, try
the following, in this order:

1 Refer to the section Configuring and Troubleshooting which begins on


page 587.
2 Consult your Information Systems support staff.
3 Select Debug Window or Debug Logging on the External Database tab of the
Quality Analyst Settings dialog box, restart Quality Analyst, and retry. See if
the debug messages indicate a solution. (Refer to the section Debug and
Message Logging on page 597 for more information.)
4 Print the debug log and call NWA Technical Support with the print-out in
hand. We may ask you to fax us the print-out.

CHAPTER 12: Database Connectivity • 599


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

APPENDIX A

Missing-Data Techniques in
Control Charts
When creating control charts, Quality Analyst recognizes and automatically
adjusts for missing data, using as much of the data as possible. Because they deal
with data in subgroups, the control-chart functions and the process-capability
functions can treat missing data in several ways.
When Quality Analyst encounters missing data, it uses one of five “missing-data
modes” to determine how to handle missing data in the control-chart and process-
capability routines. These modes are summarized in the table below. The default
missing-data mode for Quality Analyst is set in the Missing & Tagged Data tab of
the Quality Analyst Configuration dialog box as explained under Missing and
Tagged Data on page 271.

Missing Data Modes

Missing Data Mode


1 2 3 4 5
Eliminate Missing Data Before No No No No Yes
Creating Subgroups
Ignore Subgroups Containing Yes No Yes No —
Missing Data
Leave Space on Chart for Yes Yes No No —
Ignored or Empty Subgroups

The following two sections explain how Quality Analyst handles missing data in
each mode for different subgroup types, and provides samples of each.

600 • APPENDIX A: Missing-Data Techniques in Control Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Missing Data with Rowwise Subgroups


The table below shows a short example Data file with missing data. In this file,
each line of the Data file is a subgroup. Measurement 3 of subgroup 2 is missing
and all measurements of subgroup 4 are missing. This data will be used to
illustrate how Quality Analyst handles missing data in files with rowwise
subgroups.

Data File for Illustrating Missing-Data Handling with Rowwise Subgroups

Data Data File Contents


File Measurement Number
Row
1 2 3
1 1.1 1.2 1.3
2 2.1 2.2 *
3 3.1 3.2 3.3
4 * * *
5 5.1 5.2 5.3

APPENDIX A: Missing-Data Techniques in Control Charts • 601


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Mode 1 with Subgroup in Every Row


In missing-data mode 1, if any measurements in a subgroup are missing, the entire
subgroup is eliminated from all calculations, but space is reserved on the control
chart to show where the subgroup would have been plotted. The table and chart
below illustrate the effect of missing-data mode 1.

Data Data File Contents X-bar


Subgroup
File Measurement Number Chart
Number
Row Value
1 2 3
1 1.1 1.2 1.3 1 1.2
2 2.1 2.2 * 2 missing
3 3.1 3.2 3.3 3 3.2
4 * * * 4 missing
5 5.1 5.2 5.3 5 5.2

602 • APPENDIX A: Missing-Data Techniques in Control Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Mode 2 with Subgroup in Every Row


In missing-data mode 2, all available measurements in all subgroups are used,
even if some measurements are missing. For subgroups where all measurements
are missing, space is reserved on the control chart to show where the subgroup
would have been plotted.
The following table and control chart illustrate the effect of missing-data mode 2.
Notice in the control chart that Quality Analyst adjusts control limits for the
subgroup with missing data.

Data Data File Contents X-bar


Subgroup
File Measurement Number Chart
Number
Row Value
1 2 3
1 1.1 1.2 1.3 1 1.2
2 2.1 2.2 * 2 2.15
3 3.1 3.2 3.3 3 3.2
4 * * * 4 missing
5 5.1 5.2 5.3 5 5.2

APPENDIX A: Missing-Data Techniques in Control Charts • 603


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Mode 3 with Subgroup in Every Row


In missing-data mode 3, if any measurements of a subgroup are missing, the entire
subgroup is eliminated from all calculations. Unlike mode 1, space is not reserved
on the control chart to show where the subgroup would have been plotted.
The following table and control chart illustrate the effect of missing-data mode 3.

Data Data File Contents X-bar


Subgroup
File Measurement Number Chart
Number
Row Value
1 2 3
1 1.1 1.2 1.3 1 1.2
2 2.1 2.2 *
3 3.1 3.2 3.3 2 3.2
4 * * *
5 5.1 5.2 5.3 3 5.2

604 • APPENDIX A: Missing-Data Techniques in Control Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Mode 4 with Subgroup in Every Row


In missing-data mode 4, all of the available measurements in all subgroups are
used, even if some measurements are missing. Unlike mode 2, space is not
reserved on the control chart to show where a subgroup with all missing
measurements would have been plotted.
The following table and control chart illustrate the effect of missing-data mode 4.

Data Data File Contents X-bar


Subgroup
File Measurement Number Chart
Number
Row Value
1 2 3
1 1.1 1.2 1.3 1 1.2
2 2.1 2.2 * 2 2.15
3 3.1 3.2 3.3 3 3.2
4 * * *
5 5.1 5.2 5.3 4 5.2

APPENDIX A: Missing-Data Techniques in Control Charts • 605


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Mode 5 with Subgroup in Every Row


Missing-data mode 5 does not apply to rowwise subgroups.

Summary Overview—Rowwise Subgroups


The following table below summarizes the effect of each of the four applicable
missing-data modes on the sample Data file with rowwise subgroups in three
columns of the file.

Summary of the Effect of Missing-Data Modes on a Sample Data File with Rowwise Subgroups

Mode 1 Mode 2 Mode 3 Mode 4


Data File Contents
Data Sub- X-bar Sub- X-bar Sub- X-bar Sub- X-bar
Measurement
File group Chart group Chart group Chart group Chart
Number
Row Number Value Number Value Number Value Number Value
1 2 3
1 1.1 1.2 1.3 1 1.2 1 1.2 1 1.2 1 1.2
2 2.1 2.2 * 2 * 2 2.15 2 2.15
3 3.1 3.2 3.3 3 3.2 3 3.2 2 3.2 3 3.2
4 * * * 4 * 4 *
5 5.1 5.2 5.3 5 5.2 5 5.2 3 5.2 4 5.2

Missing Data with Columnwise Subgroups


When a variable occupies only one column in a Data file, the effect of missing
data and missing-data mode is similar to that in rowwise subgroups. There are two
ways of creating subgroups with this type of data:
create one subgroup every N Data file rows, and
use a moving window N rows long to produce subgroups.

The following table shows a short example Data file with missing data. This data
will be used to illustrate the effect of missing data and missing data mode on both
types of columnwise subgroup organization.

606 • APPENDIX A: Missing-Data Techniques in Control Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Data File for Illustrating Missing-Data Handling


with Columnwise Subgroups

Data File Row Data File Contents


1 5.5
2 4.8
3 5.0
4 3.7
5 4.7
6 *
7 3.6
8 3.7
9 3.5
10 *
11 *
12 *
13 5.4
14 4.7
15 5.9

The first set of examples below explain the effect of missing data on the analysis
and charting of subgroups comprising every three rows of data in a file. The
examples after that explain the effect of missing data on subgroups created from a
“moving window” of three rows of data.

Mode 1 with Subgroup Every 3 Rows


In missing-data mode 1, if a subgroup has any missing measurements, the entire
subgroup is eliminated from all calculations, but space is reserved on the control
chart to show where the subgroup would have been plotted.
The following table and control chart illustrate the effect of missing-data mode 1.

Data Data X-bar


Subgroup
File File Chart
Number
Row Contents Values
1 5.5 1

APPENDIX A: Missing-Data Techniques in Control Charts • 607


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

2 4.8 1
3 5.0 1 5.10
4 3.7 2
5 4.7 2
6 * 2 *
7 3.6 3
8 3.7 3
9 3.5 3 3.60
10 * 4
11 * 4
12 * 4 *
13 5.4 5
14 4.7 5
15 5.9 5 5.33

608 • APPENDIX A: Missing-Data Techniques in Control Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Mode 2 with Subgroup Every 3 Rows


In missing-data mode 2, all available measurements in all subgroups are used,
even if some measurements are missing. For subgroups where all measurements
are missing, space is reserved on the control chart to show where the subgroup
would have been plotted.
The following table and control chart illustrate the effect of missing-data mode 2.
Notice in the control chart that Quality Analyst adjusts control limits for the
subgroup with missing data.

Data Data X-bar


Subgroup
File File Chart
Number
Row Contents Values
1 5.5 1
2 4.8 1
3 5.0 1 5.10
4 3.7 2
5 4.7 2
6 * 2 4.20
7 3.6 3
8 3.7 3
9 3.5 3 3.60
10 * 4
11 * 4
12 * 4 *
13 5.4 5
14 4.7 5
15 5.9 5 5.33

APPENDIX A: Missing-Data Techniques in Control Charts • 609


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Mode 3 with Subgroup Every 3 Rows


In missing-data mode 3, if any measurements of a subgroup are missing, the entire
subgroup is eliminated from all calculations. Unlike mode 1, space is not reserved
on the control chart to show where the subgroup would have been plotted.
The following table and control chart illustrate the effect of missing-data mode 3.

610 • APPENDIX A: Missing-Data Techniques in Control Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Data X-bar
Data File Subgroup
File Chart
Row Number
Contents Values
1 5.5 1
2 4.8 1
3 5.0 1 5.10
4 3.7
5 4.7
6 *
7 3.6 2
8 3.7 2
9 3.5 2 3.60
10 *
11 *
12 *
13 5.4 3
14 4.7 3
15 5.9 3 5.33

APPENDIX A: Missing-Data Techniques in Control Charts • 611


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Mode 4 with Subgroup Every 3 Rows


In missing-data mode 4, all of the available measurements in all subgroups are
used, even if some measurements are missing. Unlike mode 2, space is not
reserved on the control chart to show where a subgroup with all missing
measurements would have been plotted.
The following table and control chart illustrate the effect of missing-data mode 4.
Notice in the control chart that Quality Analyst adjusts control limits for the
subgroup with missing data.

Data X-bar
Data File Subgroup
File Chart
Row Number
Contents Values
1 5.5 1
2 4.8 1
3 5.0 1 5.10
4 3.7 2
5 4.7 2
6 * 2 4.20
7 3.6 3
8 3.7 3
9 3.5 3 3.60
10 *
11 *
12 *
13 5.4 4
14 4.7 4
15 5.9 4 5.33

612 • APPENDIX A: Missing-Data Techniques in Control Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Mode 5 with Subgroup Every 3 Rows


Missing-data mode 5 can only be used when a variable occupies only one column
in the Data file. In mode 5, Quality Analyst eliminates missing data before it
creates subgroups. Because missing data is eliminated completely, subgroups
never contain any missing data.
The following table and control chart illustrate the effect of missing-data mode 5.

APPENDIX A: Missing-Data Techniques in Control Charts • 613


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Data X-bar
Data Subgroup
File Chart
File Row Number
Contents Values
1 5.5 1
2 4.8 1
3 5.0 1 5.10
4 3.7 2
5 4.7 2
6 *
7 3.6 2 4.00
8 3.7 3
9 3.5 3
10 *
11 *
12 *
13 5.4 3 4.20
14 4.7
15 5.9

614 • APPENDIX A: Missing-Data Techniques in Control Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Summary Overview—
Columnwise Subgroups Every 3 Rows
The following table summarizes the effect of each of the five missing-data modes
on the sample Data file with columnwise subgroups comprising every three rows
of the file.

Summary of the Effect of Missing-Data Modes on a


Sample Data File with Columnwise Subgroups Every 3 Rows

Mode 1 Mode 2 Mode 3 Mode 4 Mode 5

Data Data
Subgroup

Subgroup

Subgroup

Subgroup

Subgroup
Number

Number

Number

Number

Number
Values

Values

Values

Values

Values
File File
X-bar

X-bar

X-bar

X-bar

X-bar
Chart

Chart

Chart

Chart

Chart
Row Contents

1 5.5 1 1 1 1 1
2 4.8 1 1 1 1 1
3 5.0 1 5.10 1 5.10 1 5.10 1 5.10 1 5.10
4 3.7 2 2 2 2
5 4.7 2 2 2 2
6 * 2 * 2 4.20 2 4.20
7 3.6 3 3 2 3 2 4.00
8 3.7 3 3 2 3 3
9 3.5 3 3.60 3 3.60 2 3.60 3 3.60 3
10 * 4 4
11 * 4 4
12 * 4 * 4 *
13 5.4 5 5 3 4 3 4.20
14 4.7 5 5 3 4
15 5.9 5 5.33 5 5.33 3 5.33 4 5.33

The preceding examples explain the effect of missing data on the analysis and
charting of subgroups comprising every three rows of data in a file. The following
examples explain the effect of missing data on subgroups created from a “moving
window” of three rows of data (moving average).

APPENDIX A: Missing-Data Techniques in Control Charts • 615


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Mode 1 with Subgroup in Moving Window of 3


Rows
In missing-data mode 1, if a subgroup has any missing measurements, the entire
subgroup is eliminated from all calculations, but space is reserved on the control
chart to show where the subgroup would have been plotted.
The following table and control chart illustrate the effect of missing-data mode 1.

Data Data X-bar


File File Subgroup Number Chart
Row Contents Values
1 5.5 1
2 4.8 1 2
3 5.0 1 2 3 1 5.10
4 3.7 2 3 4 2 4.50
5 4.7 3 4 5 3 4.47
6 * 4 5 6 4 *
7 3.6 5 6 7 5 *
8 3.7 6 7 8 6 *
9 3.5 7 8 9 7 3.60
10 * 8 9 10 8 *
11 * 9 10 11 9 *
12 * 10 11 12 10 *
13 5.4 11 12 13 11 *
14 4.7 12 13 12 *
15 5.9 13 13 5.33

616 • APPENDIX A: Missing-Data Techniques in Control Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Mode 2 with Subgroup in Moving Window of 3


Rows
In missing-data mode 2, all available measurements in all subgroups are used,
even if some measurements are missing. For subgroups where all measurements
are missing, space is reserved on the control chart to show where the subgroup
would have been plotted.
The following table and control chart illustrate the effect of missing-data mode 2.
Notice in the control chart that Quality Analyst adjusts control limits for the
subgroups with missing data.

APPENDIX A: Missing-Data Techniques in Control Charts • 617


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Data Data X-bar


File File Subgroup Number Chart
Row Contents Values
1 5.5 1
2 4.8 1 2
3 5.0 1 2 3 1 5.10
4 3.7 2 3 4 2 4.50
5 4.7 3 4 5 3 4.47
6 * 4 5 6 4 4.20
7 3.6 5 6 7 5 4.15
8 3.7 6 7 8 6 3.65
9 3.5 7 8 9 7 3.60
10 * 8 9 10 8 3.60
11 * 9 10 11 9 3.50
12 * 10 11 12 10 *
13 5.4 11 12 13 11 5.40
14 4.7 12 13 12 5.05
15 5.9 13 13 5.33

618 • APPENDIX A: Missing-Data Techniques in Control Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Mode 3 with Subgroup in Moving Window of 3


Rows
In missing-data mode 3, if any measurements of a subgroup are missing, the entire
subgroup is eliminated from all calculations. Unlike mode 1, space is not reserved
on the control chart to show where the subgroup would have been plotted.
The following table and control chart illustrate the effect of missing-data mode 3.

Data Data X-bar


File File Subgroup Number Chart
Row Contents Values
1 5.5 1
2 4.8 1 2
3 5.0 1 2 3 1 5.10
4 3.7 2 3 2 4.50
5 4.7 3 3 4.47
6 *
7 3.6 4
8 3.7 4
9 3.5 4 4 3.60
10 *
11 *
12 *
13 5.4 5
14 4.7 5
15 5.9 5 5 5.33

APPENDIX A: Missing-Data Techniques in Control Charts • 619


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Mode 4 with Subgroup in Moving Window of 3


Rows
In missing-data mode 4, all of the available measurements in all subgroups are
used, even if some measurements are missing. Unlike mode 2, space is not
reserved on the control chart to show where a subgroup with all missing
measurements would have been plotted.
The following table and control chart illustrate the effect of missing-data mode 4.
Notice in the control chart that Quality Analyst adjusts control limits for the
subgroups with missing data.

620 • APPENDIX A: Missing-Data Techniques in Control Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Data Data X-bar


File File Subgroup Number Chart
Row Contents Values
1 5.5 1
2 4.8 1 2
3 5.0 1 2 3 1 5.10
4 3.7 2 3 4 2 4.50
5 4.7 3 4 5 3 4.47
6 * 4 5 6 4 4.20
7 3.6 5 6 7 5 4.15
8 3.7 6 7 8 6 3.65
9 3.5 7 8 9 7 3.60
10 * 8 9 8 3.60
11 * 9 10 9 3.50
12 * 10 11
13 5.4 10 11 12 10 5.40
14 4.7 11 12 11 5.05
15 5.9 12 12 5.33

APPENDIX A: Missing-Data Techniques in Control Charts • 621


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Mode 5 with Subgroup in Moving Window of 3


Rows
In missing-data mode 5, Quality Analyst eliminates missing data before it creates
subgroups. Because missing data is eliminated completely, subgroups never
contain any missing data.
The following table and control chart illustrate the effect of missing-data mode 5.

Data Data X-bar


File File Subgroup Number Chart
Row Contents Values
1 5.5 1
2 4.8 1 2
3 5.0 1 2 3 1 5.10
4 3.7 2 3 4 2 4.50
5 4.7 3 4 5 3 4.47
6 *
7 3.6 4 5 6 4 4.00
8 3.7 5 6 7 5 4.00
9 3.5 6 7 8 6 3.60
10 *
11 *
12 *
13 5.4 7 8 9 7 4.20
14 4.7 8 9 8 4.53
15 5.9 9 9 5.33

622 • APPENDIX A: Missing-Data Techniques in Control Charts


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

APPENDIX A: Missing-Data Techniques in Control Charts • 623


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

APPENDIX B

Alternative Statistical
Calculation Methods

EPA Control Limits


The EPA Handbook for Analytical Quality Control in Water and Wastewater
Laboratories uses a method for calculating control limits for the Individual
Measurements chart that is different from the Quality Analyst default. In the EPA
method, the standard deviation of the data is calculated using the same default
method that is used in process capability calculations and control limits are set at
±3 standard deviations from the mean. Many industries and agencies also use this
method.
This method treats all of the data as one large subgroup. Any trends in the data
will be counted as part of process standard deviation and used to set control limits.
The more common method of using average range is less sensitive to trends in the
data, so the control limits calculated using the default method will generally be
closer to the center line than the EPA method. If the process is in control the two
methods give about the same results.

To configure Quality Analyst to use the EPA subgroup method:


1 Click Settings on the Quality Analyst start-up screen. The Quality Analyst
Settings dialog box will appear.
2 Click the Chart Parameters tab.
3 In the area labeled Calculate Control Limits for X-bar, I, Cusum, and Median
Charts using, select Individual measurements.

624 • APPENDIX B: Alternative Statistical Calculation Methods


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Ford Process Capability Indices


Ford Motor Company and other manufacturers sometimes specify that process
capability indices be based on a method of estimating standard deviation that is
different from the default Quality Analyst method. In the Ford method, process
standard deviation is estimated using the average range of subgroups. This method
matches the way control limits are calculated on the variable control charts.
Since this method uses only within-subgroup variation to calculate standard
deviation and ignores between-subgroup variation, the estimated standard
deviation will be smaller and the capability indices will be larger.

To configure Quality Analyst to use this method:


1 Click Settings on the Quality Analyst start-up screen. The Quality Analyst
Settings dialog box will appear.
2 Click the Capability Parameters tab.
3 In the area labeled Standard Deviation Calculation Method, select Average
Subgroup Range.

APPENDIX B: Alternative Statistical Calculation Methods • 625


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Control Chart Limits Based on Probability


In the United Kingdom, Australia and other countries, control chart limits are set
at 0.001 and 0.999 probability levels rather than ±3 standard deviations from the
center line. The two methods give similar results for the X-bar chart—0.001 and
0.999 probability limits occur at ±3.08 standard deviations (sigma) from the mean.
Since the sampling distribution of Range and Standard Deviation are
asymmetrical, for Range and Standard Deviation charts the two types of control
limits can be quite different. For a subgroup size of four, control limits at three
sigma would be set at 0 and 2.28 times the average Range. The 0.001 and 0.999
probability limits would be set at 0.10 and 2.57 times the average Range.
Probability Limits for the attribute control charts (p, np, u, and c) also differ from
three sigma limits. Not only are the distributions used asymmetrical, but the
distributions are discrete since the number of defects or defectives can only be
integers.
Because of the discrete nature of the distributions, exact probability limits are not
possible with attribute control charts. Control limits are set midway between steps
in the distribution so the probability of exceeding the limit is at least as large as
the desired probability level. For example, for a number of defectives (np) control
chart with a sample size of 100 and a standard proportion defective of 2%, the

626 • APPENDIX B: Alternative Statistical Calculation Methods


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

three sigma limits are 0 and 6.2, while the 0.001 and 0.999 probability limits
would be set at 0 and 7.5.

To use probability control limits:


1 Click Settings on the Quality Analyst start-up screen. The Quality Analyst
Settings dialog box will appear.
2 Click the Chart Parameters tab.
3 In the area labeled Base Control Chart Limits on, select Probability Levels.

With this setting, control limits will be set at the 0.001 and 0.999 probability
levels for all control charts. Warning limits will be set at the 0.025 and 0.975
probability levels for all control charts.

Standard Deviation Calculation Methods


Quality Analyst functions can estimate process standard deviation using any of
four methods. Quality Analyst default settings use one method for the control
charts (Cumulative Sum, Exponentially Weighted Moving Average, Individual
and Range charts, Median and Range charts, and X-bar and Range charts) and
another for the rest of the package (ANOVA, correlation, normal probability plots,

APPENDIX B: Alternative Statistical Calculation Methods • 627


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

process capability, summary statistics (on formatted reports), and descriptive


statistics).
To change the method used by the control charts, see Standard Deviation
Calculation Method on page 267. See also APPENDIX F: Equations for details.

Variable Control Charts


The variable control charts can use any of the four methods for estimating process
standard deviation. By default, the companion control chart (Range or Standard
Deviation) determines the method of calculating process standard deviation for the
X-bar, Individual Measurement, Median, CUSUM, and EWMA charts. If one of
these charts appears with a Range chart, the average range method is used. If they
are paired with a Standard Deviation chart, then the average standard deviation
method is used.
By default, if an X-bar, Individual Measurement, Median, or EWMA chart
appears without a companion chart (Range or Standard Deviation), the average
standard deviation method will be used.
If the individual measurements method is chosen for control chart calculations,
then the variable control chart (CUSUM, EWMA, Individual and Range, Median
and Range, and X-bar and Range) will always use the individual measurement
method.
Average subgroup range is always used for the Range control chart and average
subgroup standard deviation is always used for the Standard Deviation control
chart. Subgroup standard deviation can be calculated using the population rather
than the sample method; this will cause Standard Deviation control chart points to
shift. However, the control limits will also shift to match the method used, so the
same subgroups will be in or out of control.

Process Capability
The Process Capability function can use any of the four methods for estimating
process standard deviation. The standard deviation is then used to estimate process
capability. The default method is to calculate sample standard deviation using
individual measurements.

Statistical Routines
The statistical routines in Quality Analyst (ANOVA, correlation, normal
probability plot, descriptive statistics, and summary statistics on formatted reports)

628 • APPENDIX B: Alternative Statistical Calculation Methods


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

use sample standard deviation. The Descriptive Statistics functions can also use
population standard deviation if requested.

Practical Differences Between Methods


When process variation is estimated with average subgroup Range or Standard
Deviation, only the within-subgroup variation is used; between-subgroup variation
is ignored. Control limits calculated in this manner are good at detecting between-
subgroup changes in the process. Since this is the main purpose of control charts,
it is the default method.
If the individual measurements are used to estimate process variation on an out-of-
control process, especially one that has trends, the control limits may be much
wider. The control chart will then be less sensitive to changes between subgroups.
If the process is in control, and subgroups adequately capture process variability,
the results will be very similar for all methods.
Process Capability should be estimated only for in control processes (out of
control processes are unpredictable), so the different methods should all give
about the same result. If a process is out of control, using average Range or
average Standard Deviation will result in a better estimated process capability.
Process capability in this case represents the process capability if between
subgroup variation can be eliminated.
Various companies and government agencies require that different methods be
used for control charts and process capability analysis. The default methods are
the most common, but may not be correct for specific applications.

APPENDIX B: Alternative Statistical Calculation Methods • 629


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

APPENDIX C

The ASCII Standard


The following discussion of the ASCII code is provided in order to describe
explicitly what it is and is not. ASCII, like many other terms, is often used loosely,
and this should help explain the variations you will find.
ASCII (American Standard Code for Information Interchange) is a
communications code much like Morse Code. ASCII is the result of an effort of
the National Bureau of Standards begun in 1960 to build a universal method of
moving data using the best features of existing codes. The standard became
official in 1968, and has served well with minor modifications since then.
ASCII was developed for the same reasons that Morse Code was invented—to
provide a method for coding electrical pulses so that numbers, letters, and other
characters could be transmitted and received. Morse Code is from the world of
analog electrical systems—it consists of long and short pulses. ASCII is a product
of digital systems where a “bit” (an abbreviation of “binary digit”) is the
fundamental unit of information.
The bit has only two (hence “binary”) values (on/off; high/low; 0/1; etc.) and by
itself can not transfer much information. Therefore, eight bits are grouped together
to make a byte. There are 256 possible combinations of eight binary states. The
first 128 of these are used to define the standard ASCII character set. The extra bit
is sometimes used as an error-checking or “parity” bit.
Many systems use the 128 nonstandard values for additional codes such as
graphics characters or, as in the case of many word processors, “soft” or “hard”
hyphens, carriage returns, and spaces. Since these are not standard, and can cause
problems in Data files, you should make sure your Data files include only the
lower 128 ASCII characters. Quality Analyst will try to alert you if you have a file
with nonstandard characters.
The table below shows the ASCII table. The first 32 codes are “control”
characters that are used to control the transfer of data in the context of digital
communication. Many use old teletype conventions (for example, Control G rings
the bell on the teletype). Modern terminals use some of these conventions. The
other characters define punctuation, numbers, and letters. These codes are
produced each time you press a key on your keyboard.

630 • APPENDIX C: The ASCII Standard


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

The ASCII Character Set

Code Character Code Character Code Character Code Character


00 Control @ 32 space 64 @ 96 `
01 Control A 33 ! 65 A 97 a
02 Control B 34 " 66 B 98 b
03 Control C 35 # 67 C 99 c
04 Control D 36 $ 68 D 100 d
05 Control E 37 % 69 E 101 e
06 Control F 38 & 70 F 102 f
07 Control G 39 ' 71 G 103 g
08 Control H 40 ( 72 H 104 h
09 Control I 41 ) 73 I 105 i
10 Control J 42 * 74 J 106 j
11 Control K 43 + 75 K 107 k
12 Control L 44 , 76 L 108 l
13 Control M 45 - 77 M 109 m
14 Control N 46 . 78 N 110 n
15 Control O 47 / 79 O 111 o
16 Control P 48 0 80 P 112 p
17 Control Q 49 1 81 Q 113 q
18 Control R 50 2 82 R 114 r
19 Control S 51 3 83 S 115 s
20 Control T 52 4 84 T 116 t
21 Control U 53 5 85 U 117 u
22 Control V 54 6 86 V 118 v
23 Control W 55 7 87 W 119 w
24 Control X 56 8 88 X 120 x
25 Control Y 57 9 89 Y 121 y
26 Control Z 58 : 90 Z 122 z
27 Control [ 59 ; 91 [ 123 {
28 Control \ 60 < 92 \ 124 |
29 Control ] 61 = 93 ] 125 }
30 Control ^ 62 > 94 ^ 126 ~
31 Control _ 63 ? 95 _ 127 DEL
Note: The code numbers are in decimal notation.

APPENDIX C: The ASCII Standard • 631


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

APPENDIX D

Numeric Limits and


Precision

Accuracy and Precision


Most computer languages store numbers in fixed formats which place limits on the
size and precision of numbers. Quality Analyst’s computational routines are
written in Microsoft Visual Basic, which has three types of numbers, each with its
own limits. These are:

Number Type Range Precision


Integer -32768 to +32767 Not applicable
Single-precision 10-38 to 1038 7 digits
-38 38
Double-precision 10 to 10 16 digits

(1038 is a 1 followed by 38 zeros, and would be expressed in scientific notation as


1.0 × 1038 or 1.0E38.)
These limits are comparable to those found in any microcomputer language. It is
important to note that a double-precision number cannot be any larger than a
single-precision number; it can only be represented more precisely.

Significant Digits
One of the most troublesome areas of scientific and technical computation is the
idea of “significant digits,” or how many digits of a given number are meaningful.
Most people manage to complete their education without gaining a working
understanding of significant digits. While it is beyond the scope of this manual to
offer a detailed tutorial, we will discuss the subject as it relates to Quality Analyst.

632 • APPENDIX D: Numeric Limits and Precision


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Unless a special effort is made to round or format the numeric output of a


computer program, the result will often be carried out to the limit of the language
and processor’s capability. This will cause numbers that might normally have two
or three significant digits to display with as many as seven (single-precision) or 16
(double-precision) digits. This is often misunderstood in one of two ways. A
number such as 0.345623 may be viewed by the user as:
exceptionally accurate, especially if the input data contained numbers with
fewer decimal places; or
potentially or actually inaccurate because of the obvious use and presentation
of non-significant digits.

Both impressions are incorrect. The number is represented to the limits of the
language because of the potential loss of information if rigid output formats were
used. It is your responsibility to determine the number of truly significant digits in
the output, based on the nature of your data. Some Quality Analyst routines format
certain output, when enough is known about the valid numeric range. For
example, correlation coefficients are less than or equal to 1.00, and have no more
than three significant digits. As a result, these statistics are usually limited to the
format X.XXXX when printed or displayed.

Computational Considerations
Single- and double-precision are “real” or “floating-point” number representation
systems, but they cannot take on every value in the real number continuum.
Therefore, floating-point calculations in computers are subject to round-off errors.
This is not usually critical, since errors in sequential calculations tend to cancel
each other out. However, in some cases, floating-point errors can be critical.
As you might expect, division represents the most difficult problem, since a
simple “1/3,” for example, is a repeating decimal number (0.333333...etc.).
Multiplication, which consists of repeated additions, can also generate more digits
than there were in either of the original terms. Subtracting two numbers of vastly
different size can create problems too. Finally, adding a very small number to a
very large one might produce a result identical to the initial large number.
Another possible problem involves subtracting two numbers which, if precision
were greater, would generate a zero difference, but which instead generates a very
small negative number. This can occasionally cause a subsequent computation to
fail; for example, a square root of the difference will yield the error statement
ILLEGAL FUNCTION CALL if the number is less than zero. This will usually
happen when there is a major problem with the input data, such as that which
produces a singularity in regression analysis. At any rate, you should call

APPENDIX D: Numeric Limits and Precision • 633


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Northwest Analytical if you can not find the source of the error. In most cases,
Quality Analyst will trap the most common computational problems and let you
interpret the results properly, or adjust the input data (transforming or scaling data
is a common solution).

Quality Analyst Internal Numeric Data Types


Most computations in Quality Analyst are performed in single-precision. This
form uses less memory and allows faster execution than double-precision, and
provides acceptable accuracy. Quality Analyst uses double-precision in one very
important application—the multiple regression calculations where the increased
accuracy is essential.
Quality Analyst uses integers only for internal counters, for example, numbers of
rows, column numbers, and so on. For these applications, there is little or no
danger of overflow, and using integers dramatically reduces calculation time.

634 • APPENDIX D: Numeric Limits and Precision


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

APPENDIX E

References
There are many very good articles and books on statistics. There are even more
bad ones. The following list is not intended to be complete; however, we have
actually read and used these references, and like them.

Citations
ASTM. Manual on Presentation of Data and Control Chart Analysis: 6th Edition
(ASTM Manual Series: MNL 7). Philadelphia: American Society for Testing and
Materials 1989 (ISBN 0-8031-1289-0).
This manual presents the equations and procedures to use in developing
control charts. Includes examples, with data, of all of the charts and
calculations discussed. Also contains the table of control chart factors that
virtually all other textbooks refer to and explains how the factors are
calculated. Use this book if someone challenges your method of setting
control limits.
Burr, I.W. Engineering Statistics and Quality Control. New York: McGraw-Hill,
1953.
A good general text covering engineering statistics and control charts.
Chan, Lai K., Smiley W. Cheng, and Frederick A. Spiring. “A New Measure of
Process Capability: Cpm.” Journal of Quality Technology vol. 28 (no. 3), pp. 162-
175, July 1988.
This article explains the Cpm index used in the process capability function.
DeVor, Richard E., Tsong-how Chang, and John W. Sutherland. Statistical
Quality Design and Control: Contemporary Concepts and Methods. New York:
Macmillan Publishing Company, 1992 (ISBN 0-02-329189-X).
A good book covering control charts, process capability, and design of
experiment. Takes a more modern view of SPC with capability indices,
EWMA, and Taguchi techniques explained. Some of the more advanced
techniques are applied in an unusual fashion.

APPENDIX E: References • 635


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Duncan, A.J. Quality Control and Industrial Statistics 5th ed. Homewood, Illinois:
Richard D. Irwin, 1986 (ISBN 0-256-03535-0).
A very complete text that covers the statistics in detail. It tends to be more
technical than the other references.
Grant, E.L. and R. S. Leavenworth. Statistical Quality Control 6th ed. New York:
McGraw-Hill, 1988 (ISBN 0-07-024114-7).
A good working manual that concentrates on Shewhart control charts. Written
for non-statisticians, it includes many case studies. This book gives the
technical detail necessary to understand why control charts work, without
being overly dense.
Huff, Darrell How to Lie with Statistics. New York: W. W. Norton & Company,
Inc. 1954.
A somewhat irreverent classic, continuously in print since 1954 and never
revised. Covers issues important to all statistical analysis. The book’s intent is
to prevent the reader from being taken in by statistical lies, but the reverse
also works.
Hunter, J. Stuart. “The Exponentially Weighted Moving Average.” Journal of
Quality Technology vol. 18 (no. 4), pp. 203-210, October 1986.
This article explains the generation and use of the Exponentially Weighted
Moving Average (EWMA) chart. The author adds some non-standard details
such as plotting the EWMA one time position ahead, and a method for
choosing lambda. The article is complete and well written.
Ishikawa, K. Guide to Quality Control. Tokyo: Asian Productivity Organization,
1986 (ISBN 92-833-1036-5).
A simple guide to most of the control charting techniques, oriented toward the
person on the factory floor.
Johnson, N.L. and F. C. Leone. Statistics and Experimental Design in Engineering
and the Physical Sciences Vol. 1. New York: John Wiley & Sons, 1964.
Covers a wide variety of statistics useful in engineering, including control
charts. It is fairly detailed, and includes engineering examples.
Juran, J.M. (ed.) Juran’s Quality Control Handbook 4th ed. New York: McGraw-
Hill, 1988 (ISBN 0-07-033176-6).
A large (1500+ pages) collection of quality-related articles, including many
real examples from specific industries.

636 • APPENDIX E: References


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Oakland, J. S. Statistical Process Control. London, England: William Heinemann,


1986.
This book uses probability-based control limits.
Sloan, M. Daniel and Jodi B. Torpey. Success Stories on Lowering Health Care
Costs by Improving Health Care Quality. Milwaukee, Wisconsin: ASQC Quality
Press. Copyright Quality Health Systems of America, Inc., 1995 (ISBN 0-87389-
262-3).
Examples with data and charts on how four health care organizations
dramatically lower costs by increasing quality.
Sloan, M. Daniel. Using Designed Experiments to Shrink Health Care Costs.
Milwaukee, Wisconsin: ASQC Quality Press. Copyright Quality Health Systems
of America, Inc., 1997 (ISBN 0-87389-367-0).
Using designed experiments (not control charts) to improve health care and
reduce costs. George Box says of this book: “Many have believed that
statistical experimentation was applicable only to scientific research and
engineering. Daniel Sloan has proved them wrong in this remarkably lucid
book which shows how the use of simple experimental designs can catalyze
the improvement of health care.”
Snedecor, G.W. and W. G. Cochran. Statistical Methods 8th ed. Ames, Iowa:
Iowa State University Press, 1980 (ISBN 0-8138-1560-6).
A general statistics book, covering a wide range of techniques. Also explains
“Geary’s a” used in the process capability function. If you could only have
one reference book, this would be a good choice.
Spiring, Fred A. “The Cpm Index,” Quality Progress vol. 24 (no. 2), pp. 57–61,
February 1991.
This article explains the Cpm index used in the process capability function.
Walker, Esteban, John W. Philpot, and James Celment. “False Signal Rates for the
Shewhart Control Chart with Supplementary Runs Tests.” Journal of Quality
Technology vol. 23 (no. 3), pp. 247-252, July 1991.
The authors examine the effects of various Pattern Rules (run tests) on false
signal rates of the X-bar chart. The effect of too many rules (or the wrong
rules) can be dramatic: using eight common rules on an in-control process, an
X-bar chart with thirty subgroups falsely signals out-of-control conditions
over one third of the time.
Western Electric. Statistical Quality Control Handbook 2nd ed. Indianapolis,
Indiana: Western Electric, 1958.

APPENDIX E: References • 637


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

A handbook on using Statistical Quality Control. Includes extensive


discussions of Shewhart control charts and process capability studies, plus
several case studies, covering the interpretation of control chart patterns in
detail.
Wheeler, Donald J. Advanced Topics in Statistical Process Control. Knoxville,
Tennessee: SPC Press Inc., 1995 (ISBN 0-945320-45-0).
Goes beyond standard control charts to evaluate advanced control charts
(CUSUM, EWMA, Zone Charts, Multivariate charts), capability indices,
autocorrelation, pre-control, and others. Also examines more deeply the
theory and meaning of control charts and quality control statistics.
Wheeler, Donald J. Short Run SPC. Knoxville, Tennessee: SPC Press, Inc. 1991
(ISBN 0-945320-12-4).
Explains how to set up and use short run control charts.
Wheeler, Donald J. Understanding Variation, The Key to Managing Chaos.
Knoxville, Tennessee; SPC Press, Inc., 1993 (ISBN 0-945320-35-3).
This short book teaches how to think about variation and quality. Filled with
examples based on typical management reports, the author takes the reader
through the process of discovering what’s really going on. A good book for
someone who has never been exposed to control charts or SPC.
Wheeler, Donald J. and David S. Chambers. Understanding Statistical Process
Control. Knoxville, Tennessee: SPC Press, Inc., 1986.
An excellent, practical book that concentrates on what control charts really
mean. Explains how to use statistics for control, process capability,
continuous improvement, and other purposes. Uses real data to explain
concepts and doesn’t gloss over difficulties.
Wheeler, Donald J. and Richard W. Lyday, Evaluating the Measurement Process
2nd ed. Knoxville, Tennessee; SPC Press, Inc., 1989 (ISBN 0-945320-06-X).
How to determine what the measurements are really telling you (if anything).
In contrast to the AIAG book on the same subject, this book explains what’s
really happening when measurements are made and how the results can be
used.

Where to Buy Books


Besides your local bookseller, a good source for statistics books is the ASQC
Quality Press Publications Catalog. The catalog uses several paragraphs to
describe the contents of each book, and rates the book level (basic, intermediate,

638 • APPENDIX E: References


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

advanced). ASQC members receive discount prices. You should not assume,
however, that all books listed in the ASQC Catalog are worthwhile.
The ASQC toll-free order line is (800) 952-6587. The mailing address is ASQC
Quality Press, Customer Service Department, P.O. Box 3066, Milwaukee, WI
53201-3066. Their web site is at www.asqc.org.
The SPC Press, Inc. toll-free number is (800) 545-8602. Their address is
5908 Toole Drive, Suite C, Knoxville, TN 37919. Their web site is at
www.spcpress.com.

APPENDIX E: References • 639


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

APPENDIX F

Equations

One-way ANOVA, Completely Randomized


Source of Variation Statistic Equation

SS t = ∑ ni (X i − X )
Treatments Variation Sum of Squares t
2

i =1

Degrees of Freedom t −1
Variance: Mean S. S. (MSS) SS t
MSS t =
t −1
F ratio MSS t
F=
MSS e

SS e = ∑∑ (X ij − X i )
Error Variation Sum of Squares t ni
2

i =1 j =1

Degrees of Freedom t

∑ (n
i =1
i − 1)

Variance: Mean S. S. (MSS) SS e


MSS e = t

∑ (n
i =1
i − 1)

SS = ∑∑ (X ij − X )
Total Variation Sum of Squares t ni
2

i =1 j =1

640 • APPENDIX F: Equations


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Source of Variation Statistic Equation

Degrees of Freedom t

∑n
i =1
i −1

Where:
t = number of treatments
ni = number of observations for treatment i
ni

∑X
j =1
ij

Xi = = mean of treatment i
ni
t ni

∑∑ X
i =1 j =1
ij

X = t
= grand mean
∑n
i =1
i

One-way ANOVA, Randomized Block Design


Source of Variation Statistic Equation

SS t = b∑ ( X i − X )
Treatments Variation Sum of Squares t
2

i =1

Degrees of Freedom t −1
Variance: Mean S. S. (MSS) SS t
MSS t =
t −1
F ratio MSS t
Ft =
MSS e

APPENDIX F: Equations • 641


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Source of Variation Statistic Equation

SS b = t ∑ ( X i − X )
Blocks Variation Sum of Squares b
2

i =1

Degrees of Freedom b −1
Variance: Mean S. S. (MSS) SS b
MSS b =
b −1
F ratio MSS b
Fb =
MSS e

SS e = ∑∑ (X ij − X i − X j + X )
Error Variation Sum of Squares t b
2

i =1 j =1

Degrees of Freedom (t − 1)(b − 1)


Variance: Mean S. S. (MSS) SS e
MSS e =
(t − 1)(b − 1)
SS = ∑∑ (X ij − X )
Total Variation Sum of Squares t b
2

i =1 j =1

Degrees of Freedom tb − 1

Where:
t = number of treatments
b = number of blocks
b

∑X
j =1
ij

Xi = = mean of treatment i
b

642 • APPENDIX F: Equations


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

∑X ij
Xj = i =1
= mean of block j
t
t b

∑∑ X
i =1 j =1
ij

X = = grand mean
tb

Chi-square Statistics
Bartlett’s Chi-square Statistic
M
χ2 =
C
Degrees of Freedom = (n − 1)

⎡ n 2 ⎤
⎢ ∑ f i si ⎥ n
( )
n
M =∑ f i ⋅ ln ⎢ i =1n ⎥ − ∑ f i ⋅ ln s i2
i =1 ⎢
⎢⎣ ∑ f i ⎥⎥ i =1
i =1 ⎦
⎡ ⎤
1 ⎢ n
1 1 ⎥
C = 1+ ⎢∑ − n ⎥
3(n − 1) ⎢ i =1 f i
⎢⎣ ∑ f i ⎥⎥
i =1 ⎦

Differences Among Proportions

χ2 = ∑
k
( X i − niα )2
i =1 niα (1 − α )

APPENDIX F: Equations • 643


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

∑X i
α= i =1
k

∑n
i =1
i

Equal Expected Frequencies

χ2 = ∑
k
(X i − X)
2

i =1 X

Unequal Expected Frequencies

χ2 = ∑
k
( X i − Ei )2
i =1 Ei

Control Charts: Center Line and 3-Sigma


Limits
Control Chart Center Line Control Limits

Mean X X ± A1σ
or

X ± A2 R
or

X ± Aσ ′
Standard Deviation σ′ B3σ and B4σ
or or
c2σ ′ B1σ ′ and B2σ ′

644 • APPENDIX F: Equations


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Control Chart Center Line Control Limits

Range R D3 R and D4 R
or or
d 2σ ′ D1σ ′ and D2σ ′
Individual measurements X σ
X ±3
c2
or

R
X ±3
d2
or

X ± 3σ ′
~
Median X X ± A1σ
or
~
X ± A2 R
or
~
X ± Aσ ′
Fraction defective p p (1 − p )
p±3
n
Number defective np np ± 3 np (1 − p )
Defects per unit u u
u ±3
n
Number of defects c c ±3 c

APPENDIX F: Equations • 645


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

The A , A1 , A2 , B3 , B4 , D1 , D2 , D3 , D4 , c 2 , and d 2 factors for subgroup


sizes of 25 or less can be found in “ANSI Z 1.3-1958 Control Chart Method of
Controlling Quality During Production”, American National Standards Institute,
Inc. Factors for subgroup sizes larger than 25 are approximated by formula.

If the sample method ( N − 1) is used to calculate σ , the A1 , B1 , B2 , and c 2


factors are automatically adjusted.
~ ~ ~
A , A1 , and A2 were derived from ASTM STP-15D Data and Efficiency Tables.

Correlation
∑ (X − X )(Yi − Y )
n

i
rxy = i =1

∑ (X − X) ∑ (Y −Y )
n n
2 2
i i
i =1 i =1

Cumulative Sum Control Schemes


Cumulative Sum above
target
[
S H (i ) = max 0, xi − (target + k ) + S H (i −1) ]
Cumulative Sum below
target
[
S L (i ) = max 0, (target − k ) − xi + S L (i −1) ]

where:

xi = an individual point (single or averaged reading)


k = reference value (allowable slack)
i = time period
max[a, b ] is the maximum of a and b
S H (0 ) = S L ( 0 ) = 0

646 • APPENDIX F: Equations


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

S H (i ) or S L (i ) are out of control when greater than ‘h’, the decision


interval.

Descriptive Statistics
Arithmetic Mean (first moment n
about origin) ∑X i
X = i =1

n
Standard Deviation (sample
∑ (X − X)
n
2
statistics) i
s= i =1

n −1
Standard Deviation (population
∑ (X − X)
n
2
statistics) i
s= i =1

∑ (X − X)
Variance (sample statistics) n
2
i
s2 = i =1

n −1

∑ (X − X)
Variance (population statistics) n
2
i
s2 = i =1

n
Coefficient of Skewness m3
γ1 =
m12.5
Coefficient of Kurtosis m4
γ2 =
m22
Standard Error s
SX =
n

APPENDIX F: Equations • 647


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Coefficient of Variation (%) s


CV = 100
X
Harmonic Mean n
H= n
1
∑x
i =1 i

Quadratic Mean (second moment n


about origin) ∑X i
2

Q= i =1

n
Geometric Mean G = n X 1 ⋅ X 2 ⋅ ... ⋅ X n

∑ (X − X)
3rd moment about the Mean n
3
i
m3 = i =1

∑ (X − X)
4th moment about the Mean n
4
i
m4 = i =1

Exponentially Weighted Moving Average


(
EWMAt = Zˆ t = λX t + (1 − λ )Zˆ t −1 = Zˆ t −1 + λ X t − Zˆ t −1 )
λ
σ Zˆ = σ X
t
2−λ
CL = Zˆ 0 = X

UCL = X + 3σˆ Zˆ
t

LCL = X − 3σˆ Zˆ
t

648 • APPENDIX F: Equations


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Kruskal-Wallis Statistic
k
R2
⋅ ∑ i − 3(n + 1)
12
H=
n(n + 1) i =1 ni
k
n = ∑ ni
i =1

Multiple Linear Regression


The matrix formulation of the model is:
Y = Xβ + ε
where:
Y = N × 1 column vector of dependent variable observations
X = N × k matrix of independent variable observations
β = k × 1 column vector of unknown parameters
ε = N × 1 column vector of errors
Residual (unexplained) sum of squares

N
ESS = ∑ εˆi2 = εˆ ′εˆ
i =1

εˆ = Y − Yˆ
Yˆ = Xβ

Regression Coefficients

β̂ = ( X ′X )−1 X ′Y
Standard Deviation of the Coefficients

APPENDIX F: Equations • 649


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

s βi = s ( X ′X )ii−1
Estimate of variance

εˆ ′εˆ
s2 =
N −k
t-statistic for coefficients

βˆ i
t N −k =
s ( X ′X )ii−1
ANOVA Table

TSS = RSS + ESS


TSS = total sum of squares
RSS = residual (explained) sum of squares
ESS = residual (unexplained) sum of squares

Multiple Correlation Coefficient ( R 2 )

ESS εˆ ′εˆ βˆ ′X ′Xβˆ


R2 = 1− = 1− =
TSS Y ′Y Y ′Y

Corrected Multiple Correlation Coefficient ( R ′ 2 )

(
R′2 = 1 − 1 − R 2 ) NN −− k1
k = number of coefficients in model
Regression F-test

650 • APPENDIX F: Equations


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

R2 N − k
Fk −1, N − k =
1− R2 k −1
Standardized (Beta) Coefficients

sX j
βˆ ∗j = βˆ j
sY
j = 2,3,..., k

Durbin-Watson Statistic

∑ (εˆ − εˆt −1 )
2
t
DW = t =2
T

∑ εˆ
t =1
t
2

Normal Probability Plot


The horizontal axis contains the ordered observations X 1′ ≤ X 2′ ≤ ... ≤ X n′ and
the vertical axis contains the inverse of the cumulative of the standard normal
distribution:
i − 0.5
Φ −1 (qi ) where qi =
n

Process Capability Report


Index Estimation Equation Usage

Cp USL − LSL Process potential for two-sided


specification limits
6s
CPU USL − X Process performance relative to
upper specification limit
3s

APPENDIX F: Equations • 651


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Index Estimation Equation Usage

CPL X − LSL Process performance relative to


lower specification limit
3s
k 2m− X Deviation of process mean
from midpoint (m) of
USL − LSL specification limits

C pk min[CPL, CPU ] = C p (1 − k ) Process performance for two-


sided specification limits
CR % 6s Capability ratio for two-sided
100 specification limits
USL − LSL
ZUSL USL − X Standardized upper
specification limit
s
ZLSL LSL − X Standardized lower
specification limit
s
Z min min[ZUSL,− ZLSL ] Minimum standardized
distance to specification limit

USL − LSL
C pm =
6σˆ ′
where :

⎛ n ⎞
σˆ ′ = σˆ 2 + (x − m )2 ⋅ ⎜ ⎟
⎝ n −1⎠
and m = midpoint of specifications or target
When both specification limits and target are set, and the target is not at the
midpoint of the specification limits, then use:
min[T − LSL, USL − T ]
Cp =

652 • APPENDIX F: Equations


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

T −μ
k=
min[T − LSL,USL − T ]
C pk = min[CPL, CPU ]
where:

T − LSL ⎛ T −μ ⎞
CPL = ⎜1 − ⎟

3σ ⎝ T − LSL ⎟⎠

USL − T ⎛ T −μ ⎞
CPU = ⎜1 − ⎟
3σ ⎜ USL − T ⎟
⎝ ⎠
Geary’s a

n xi − x
∑ n
a= i =1
n

∑ (x − x)
2
i
i =1

n
Process Capability Distribution Types

You can use several probability distributions with the process capability functions
in Quality Analyst. The probability distribution determines the shape of the
distribution curve that appears on the histogram output, and estimate of percent
outside of specifications. With all of the distribution types, Quality Analyst
assumes that the data is from a single, unimodal distribution.

APPENDIX F: Equations • 653


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Normal Distribution

If you choose the Normal (Gaussian)


distribution, the distribution curve will
match the mean and standard deviation
of the data.

Lognormal Distribution (skewness adjusted)

When you choose the Lognormal


distribution, the distribution will match
the mean, standard deviation, and
skewness of the data. However, the
kurtosis (flatness) of the data will not be
considered.

Skewness and Kurtosis adjusted Distribution

With this distribution, Quality Analyst


tries to match the mean, standard
deviation, skewness, and kurtosis
(flatness) of the data. If this cannot be
done with a unimodal distribution, then
the Lognormal distribution is used.
Because so many parameters are
estimated, a large sample size is
recommended when using this
distribution.

654 • APPENDIX F: Equations


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Truncated Normal Distribution

When you choose the truncated normal


distribution, Quality Analyst assumes the
data was originally normal but that all
data above or below the truncation point
has been discarded. The truncation point
must be known, and it is better to have a
large sample size when using this
distribution.

Folded Normal Distribution

With the Folded Normal distribution,


Quality Analyst assumes the data would
be normally distributed, but all data
beyond the fold point has been “folded”
over onto the rest of the data. This
sometimes occurs with data that is
recorded without a plus or minus sign,
such as flatness or camber. Data is
usually positively folded at zero, but the
fold point may occur anywhere and in
either direction. The fold point must be
known and the sample size should be
large when using this distribution.

Normal Distribution

1 ⎛ x−μ ⎞
2
− ⎜ ⎟
p(x ) =
1 2⎝ σ ⎠
e
σ 2π
Two Parameter Lognormal Distribution

1 ⎛ ln ( x )− μ ⎞
2
− ⎜ ⎟
p(x ) =
1 2⎝ σ ⎠
e
xσ 2π
Three Parameter Lognormal Distribution

APPENDIX F: Equations • 655


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

1 ⎛ ln ( x −θ )− μ ⎞
2

1 − ⎜ ⎟
σ
p ( x) = e 2⎝ ⎠

(x − θ )σ 2π
Johnson Transformation

⎛ x −ε ⎞
S u system : p( x) = γ + η sinh −1 ⎜ ⎟
⎝ λ ⎠
⎛ x −ε ⎞
S l family : p( x) = γ + ηln⎜ ⎟
⎝ λ ⎠
⎛ x −ε ⎞
S b system : p ( x) = γ + η ⎜ ⎟
⎝ε +λ − x⎠
x = original data
γ , ε ,η, λ are estimated
Weibull Distribution

⎛ x −γ ⎞ β
β −⎜ ⎟
p(x ) = β (x − γ ) e ⎝
β −1 α ⎠
α
Rayleigh Distribution (Beta is set to 2)

2( x − γ )
⎛ x −γ ⎞
2
−⎜ ⎟
⎝ α ⎠
p ( x) = e
α2
Folded Normal Distribution

⎛ − 1 ⎛⎜ ψ ( x −γ )− μ ⎞⎟ 1 ⎛ ψ ( x −γ )+ μ ⎞ ⎞
2 2
− ⎜
p ( x) = ⎜
1
e 2⎝ σ ⎠
+ e 2⎝ σ ⎠


σ 2π ⎜ ⎟
⎝ ⎠
γ = fold point

656 • APPENDIX F: Equations


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

ψ = +1 if x ≥ γ

or
ψ = −1 if x ≤ γ

Truncated Normal Distribution

−1
⎡ 1 ⎛ t −μ ⎞ ⎤
2
1 ⎛ x−μ ⎞
2
− ⎜ ⎟
⎢ 1 ⎥
− ⎜ ⎟ b 2⎝ σ ⎠
p(x ) =
1
∫e
2⎝ σ ⎠
e ⎢σ 2π dt ⎥
σ 2π ⎢ a ⎥
⎣ ⎦
a,b = lower or upper truncation point, otherwise ∞

Normal Distribution, No Target Used, Bilateral Specifications

USL − LSL
Cˆ p =
6σ̂
USL − x
Cˆ PU =
3σ̂
x − LSL
Cˆ PL =
3σ̂
USL + LSL
2 −x
2
k̂ =
USL - LSL
( )
Cˆ pk = min Cˆ PU , Cˆ PL = Cˆ p 1 − kˆ ( )
100
Cˆ R% =
Cˆ p

USL − x
Zˆ USL =
σ̂

APPENDIX F: Equations • 657


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

LSL − x
Zˆ LSL =
σ̂
(
Zˆ min = min Ẑ USL ,− Zˆ LSL )
USL − LSL
Cˆ p aiag =
R
6
d2

⎛ ⎞
⎜ ⎟
⎜ USL − x x − LSL ⎟
Cˆ pk aiag = min⎜ ,
R R ⎟
⎜⎜ 3 3 ⎟
⎝ d2 d 2 ⎟⎠

USL − LSL
Pˆ p =
n

∑ (x
i =1
i − x)
2

6
n −1
⎛ ⎞
⎜ ⎟
⎜ ⎟
⎜ USL − x x − LSL ⎟
Pˆpk = min⎜ , ⎟
⎜ n n

⎜ ∑ i ( x − x ) 2
∑ ( x i − x )2 ⎟
⎜ 3 i =1 3 i =1 ⎟
⎝ n −1 n −1 ⎠
USL − LSL
Cˆ pm =
6s ′
where:

s ′ = σˆ 2 + ( x − m )
2 n
n −1

658 • APPENDIX F: Equations


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

USL − LSL
m=
2

One Independent Variable Regression


Regression Postulated Linearized

Linear y = a + bx y = a + bx
Exponential y = a ⋅ e bx ln ( y ) = ln (a ) + bx
Logarithmic y = a + b ⋅ ln (x ) y = a + b ⋅ ln (x )
Power Law y = a ⋅ xb ln ( y ) = ln (a ) + b ⋅ ln ( x )

t-tests
Paired Samples t-Statistic
n (D − μ D )
t=
sD
μ D = μ X − μY
n

∑D i
D= i =1

n
Di = X i − Yi

∑ (D − D)
n
2
i
sD = i =1

n −1

APPENDIX F: Equations • 659


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Correlation Coefficient t-Statistic


R n−2
t=
1− R2

n − 3 ⎡ (1 + R )(1 − ρ 0 ) ⎤
z= ln ⎢ ⎥
2 ⎣ (1 − R )(1 + ρ 0 ) ⎦

Ordinary t-Statistic: Unpaired Samples


Equal Variance

t=
(X − Y ) − D
⎡1 1 ⎤
s 2pooled ⎢ + ⎥
⎣n m⎦

∑ (X − X ) + ∑ (Yi − Y )
n m
2 2
i
s 2pooled = i =1 i =1

n+m−2
Unequal Variance

t=
(X − Y ) − μ D
2 2
s s
+ x y

n m
μ D = μ X − μY
Welch’s Approximation of degrees of freedom for unequal Variance:

⎡ ⎤
⎢ 1 ⎥
d.f. = integer value of ⎢ ⎥
⎢ c
2
(1 − c)
2

⎢⎣ n − 1 + m − 1 ⎥⎦

660 • APPENDIX F: Equations


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

s x2
c= n
2
s x2 s y
+
n m

Single-sample t-Statistic
Known Variance

n (X − μ 0 )
t=
σ
Unknown Variance

n (X − μ 0 )
t=
s

Pearson Product-Moment Correlation

∑ (X − X )(Yi − Y )
n

s xy2 i
rxy = = i =1

∑ (X − X) ∑ (Y −Y )
sx s y n
2
n
2
i i
i =1 i =1

95% Confidence Interval:


1 1+ r 1
C1 = log − 1.96
2 1− r n−3
1 1+ r 1
C2 = log + 1.96
2 1− r n−3
e 2c1 − 1
Lower limit =
e 2c1 + 1

APPENDIX F: Equations • 661


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

e 2 c2 − 1
Upper limit =
e 2 c2 + 1

662 • APPENDIX F: Equations


Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

INDEX

Index

$ @
$ASKFILTERn (Replaceable Parameter), @ (Run file command-line option), 503
460, 488 example, 503
$COMMENT (Run file command), 431
$DATA (Run file command-line option), 503
$DATE (title parameter), 247, 249 A
$FILE (title parameter), 247
$FILEBASE (title parameter), 247 ABS function, 25, 65
$FILEn (Replaceable Parameter), 460, 488 ACCA (Run file command), 393
$FILTER (Run file command), 439 ACCAs. See assignable causes or corrective
$MATCHFILTERn (Replaceable Parameter), actions
460, 488 accuracy, 632
$PAGEWIDTH (report parameter), 467 actions to correct violations. See corrective
$PLOT (Run file command-line option), 503 actions
$QANWA (Run file command-line option), additional limits on process capability
503 histograms, 325
$RANGEFILTERn (Replaceable Parameter), AIAG capability indices, 264, 322, 425, 445
460, 488 alphabetic variables, 44
$REPORTDATE (Run file command-line alternative calculation methods, 624
option), 503 analysis of variance. See ANOVA
$RUN (Run file command-line option), 503 analyzing
$STRINGn (Replaceable Parameter), 460, assignable causes and corrective actions,
488 148
$TEMP (Run file command-line option), 503 angle
$TIME (title parameter), 247 for rotating X-axis labels, 225
$TITLE (Run file command-line option), 503 annotating charts, 203
$VARn (Replaceable Parameter), 460, 488 ANOVA, 340
completely randomized, 340
randomized block design, 342
/ ANOVA (Run file command), 396
ANOVAR (Run file command), 397
/CLOSE (CHART subcommand), 426 APPEND (Run file command), 397
/CONTINUE (CHART subcommand), 426 Append editor, 398
/DELAY (CHART subcommand), 426 ASCII characters, 630
/PRINT (CHART subcommand), 426 AskAlpha (Run file command), 399
/SAVEAS (CHART subcommand), 426 AskAlphaMatchFilter (Run file command),
401
AskAlphaRange (Run file command), 403
AskAlphaRangeFilter (Run file command),
405

INDEX • 663
Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

AskAlphaSelectFilter (Run file command), automating procedures. See Run files


408 Autotag, 84
AskDate (Run file command), 399 AVG function, 25, 65
AskDateMatchFilter (Run file command), 401 axis label, 57
AskDateRange (Run file command), 403
AskDateRangeFilter (Run file command), 405
AskDateSelectFilter (Run file command), 408 B
AskDATFile (Run file command), 411
AskInteger (Run file command), 399 background color, 221
AskIntegerMatchFilter (Run file command), balloons. See callouts
401 bars
AskIntegerRange (Run file command), 403 calculating location, 268, 325
AskIntegerRangeFilter (Run file command), fill patterns for charts, 222
405 process capability histogram, 324
AskIntegerSelectFilter (Run file command), Bartlett’s Chi-square statistic, 345
408 batch operation. See Run files
AskList (Run file command), 413 black and white, 222
AskNumber (Run file command), 399 blocking records from database queries, 589
AskNumberMatchFilter (Run file command), blue numbers in the Editor, 62
401 box plots, 180, 423
AskNumberRange (Run file command), 403 box type, 182
AskNumberRangeFilter (Run file command), breakdown, 333
405 creating, 179
AskNumberSelectFilter (Run file command), default variables, 333
408 parameters, 272, 332
AskOpenFile (Run file command), 416 statistics, 181, 274
AskSaveFile (Run file command), 418 type, 274
AskTime (Run file command), 399 units, 182, 274
AskTimeMatchFilter (Run file command), BOXPLOT (Run file command), 423
401 breakdown
AskTimeRange (Run file command), 403 box plots, 182, 333
AskTimeRangeFilter (Run file command), process capability reports, 139, 331
405 buttons
AskTimeSelectFilter (Run file command), toolbar, 74, 192
408
AskVariable (Run file command), 420
assignable causes C
analyzing, 148
analyzing in Run files, 393 CALC (Run file command), 425, 585
assigning to data points, 217 calculated variables
associating with variables, 59 and the Append editor, 398
defining lists of, 276 calculating, 585
overview, 275 calculation parameters, 63
Pareto diagrams of, 152 defining, 62, 540
plotting character, 226 errors in, 68
synchronizing with data, 59 examples, 67
associated file types, 14 recalculating, 98
ATN function, 25, 65 saving to a new Data file, 541
ATTRIBUT (Run file command), 422 calculating
attribute calculated variables, 98
control charts, 141 chart bar location, 268, 325
variables, 42 calculation methods
Autocopy, 89 alternative, 624

664 • INDEX
Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

for charts, 254 Chi-square statistic, 344


standard deviation, 267, 329, 627 Bartlett’s, 345
calculation parameters for calculated difference among proportions, 346
variables, 63 equal expected frequencies, 347
calculations unequal expected frequencies, 348
control limits, 254, 255 CHITEST (Run file command), 427
process capability, 328 CLEANUP (Run file command), 429
callouts Clipboard, 35, 220, 591
adding to charts, 212 and DDE link, 103, 110
background color, 222 and SQL statements, 556, 572, 579
content of, 211 copying and pasting data with, 522
overview, 210 copying charts and reports, 233
removing from charts, 213 colors
capability histograms. See process capability background, 221
histograms for charts, 223, 224
capability index, calculation assumptions, for graphics and text, 220
267, 329 for text reports, 224
capability parameters, 266 using black instead of, 221
capability reports. See process capability column mode, 77
reports Column Mode, 76
cascading chart windows, 192 columns
case sensitivity. See text comparisons defining, 35, 62
for text comparisons, 249 formatting for report, 116
category variables, 45 freezing, 87
causes of violations. See assignable causes rearranging, 69
c-charts, 141, 423 width, 57
example, 143 columnwise subgroups, 19
center line comma, using as decimal point, 249
calculating from data, 302 command-line options
calculating from process parameters, 302 Run file, 486, 502, 578
defining regions for, 304 commands, Run file. See Run file commands
set to default, 303 comma-separated-value files
set to none, 303 exporting to, 521
set to recalculate, 303 importing, 430, 510
specifying, 301 of assignable causes and corrective actions,
century, specifying, 248 155
characteristics. See variables of exception report data, 163, 437
characters comments
per description variable, 281 graphics, 292
plotting, 250, 309 moving, 205
CHART (Run file command), 426 Run file, 466
chart details comparisons, text, 249
detail window, 207 completely randomized ANOVA, 340
viewing, 206 composing formulas for calculated variables,
chart windows, 192 64
arranging, 192 computational considerations, 633
switching between, 192 confidence limits
charts. See also graphics multiple regression, 378
configuring, 236 polynomial regression, 383
copying to other programs, 233 process capability, 268, 330
customizing, 236 single-variable regression, 373
group layout, 196 Weibull analysis, 178
saving, 183, 230 configuring

INDEX • 665
Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

charts, 236 plotting character, 226


DDE (Dynamic Data Exchange), 104 synchronizing with data, 59
graphics and report appearance, 220 correlation, 349
Quality Analyst. See parameters CORVAR (Run file command), 433
confirming database queries, 590 COS function, 25, 65
CONNECT (Run file command), 432, 584 CreateHED (Run file command) \t, 677
connection type for external databases, 545 CreateNWH (Run file command), 433, 495
Connectivity Data Sets, 543, See also cross-tabulating. See denormalizing data
database connectivity, external databases CSV files. See comma-separated-value files
and limit regions, 307 cumulative sum charts, 129
control charts creating, 130
of attribute data, 141 example, 136
of variable data, 128 parameters, 314
parameters, 253, 295 process parameters, 315
control limits protractor, 316
adjusting, 23, 255, 287, 291 type of, 314
and filtered data, 97 cursor mode, 76
and tagged data, 26 in the Editor, 77
and V-mask type, 315 customizing. See also parameters
and zone rules, 256 charts, 236
based on probability, 626 CUSUM. See also cumulative sum charts
calculating from data, 302 CUSUM (Run file command), 435
calculating from process parameters, 302
calculations, 254, 255
default, 307 D
defining regions for, 304
EPA, 624 data
in Header files, 9 copying, 79
recalculation range, 286 entering, 56, 78
set to default, 303 filtering. See data filters
set to none, 303 finding, 85
set to recalculate, 303 importing, 510
specifying, 301 missing, 272, 287
splitting (defining regions for), 304 modifying, 78
converting printing, 113
subgroups from multiple to single column, replacing, 85
535 searching, 85
subgroups from single to multiple columns, sorting, 98
533 tagged, 26, 271, 287
COPY (Run file command), 432 tagging, 81
copying untagging, 85
charts and reports to other programs, 233 verifying, 100
data, 79, 89, See also Autocopy data definition
Data Sets, 10 modifying, 70
data to the Clipboard, 526 saving, 60, 69
corrective actions Data files (DAT)
analyzing, 148 definition, 8
analyzing in Run files, 393 of exception report data, 163
assigning to data points, 217 size limitations, 15
associating with variables, 59 structure, 15
defining lists of, 276 data filters, 90
overview, 275 defining, 91
Pareto diagrams of, 152 external databases, 563

666 • INDEX
Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

in Run files, 439 DELETE (Run file command), 436


multiple, 95 deleting
removing, 97 Data Sets, 11
saving filtered data, 98 rows, 35, 80
using, 97 denormalizing data, 548
data points description variables, 42, 229, 279
plotting characters, 226 in the detail window, 209
data ranges, 284 on exception reports, 160, 161
Data Sets variable parameter, 294
Connectivity. See Connectivity Data Sets X-axis, 281
creating, 29 descriptive statistics, 353
definition, 8 detail window, 207
extracting a subset from, 536 detail windows
inserting, 112 content of, 207
large, 178 difference among proportions Chi-square
managing, 9 statistic, 346
of assignable causes and corrective actions, direct connection to external databases, 543
155 directories, 269, 480
opening, 28 display interval, 282
rotating, 531 double-byte character sets, 249
saving, 112 double-clicking Quality Analyst files, 14, 497
title, 278 drag and drop, 232
using external databases, 543 Dynaset, 590
data type, 37, 62
internal, 634
database connectivity, 542, See also external E
databases
data-entry mask, 56 editing functions
date data definition form, 31
formats, 248 Editor, 73
report, 249 EPA control limits, 624
date-and-time equal expected frequencies Chi-square
database fields, 562, 590 statistic, 347
DATEONLY function, 65 error handling in Run files, 248
DateTime variables, 42 errors
wrapping X-axis labels, 229 in calculated variable formulas, 68
dBase databases, 596 Run files, 505
DDE (Dynamic Data Exchange), 102 EWMA. See exponentially weighted moving
commands, 108 average charts
configuring, 104 EWMA (Run file command), 436
example, 109 EXCEPT (Run file command), 437
decimal places displayed in Editor, 57 Exception Definition files (QXP), 13
decimal symbol, 249 creating, 158
for Graphics Viewer, 228 using in Run files, 437
default variables exception reporting, 437
box plots, 333 exception reports, 157
process capability reports, 331 generating, 160
definition files. See also Fixed-Field printing, 165
Definition files, Report Format files, saving, 163
Extraction Definition files, Variable using, 161
Definition files executing
definition, 13 other programs from Run files, 472
DEG function, 25, 65 Run files, 496

INDEX • 667
Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Executing message file parameters, 278


suppressing in Run file, 453 file paths, 269, 480
EXP function, 25, 65 file types. See Data files, definition files,
exponential distribution, 175 Header files, Run files, Summary files
exponentially weighted moving average filtering
charts, 129, 436 data, 90
example, 136 external databases, 563, 573
parameters, 318 finding and replacing data, 85
exporting Fixed-Field Definition files (FFD), 13, 430,
charts and reports, 233 513
Data Sets to comma-separated-value files, creating, 514
521 fixed-field files, importing, 430, 512
external databases FLIP (Run file command), 440
assigning database fields, 558 flipping. See rotating Data Sets
configuring, 587 folders, 269, 480
connection type, 545 fonts
data source, 546 for graphics and text, 225
data table, 547 for the Editor, 73
date-and-time fields, 562 footer lines
denormalizing, 548 adding or modifying, 205
direct connection, 543 on process capability histograms, 263, 321
direct-connection sources, 546 Ford process capability indices, 625
filtering, 563 formatting
in Run files, 583 date data, 248
modifying, 580 numeric data, 118
ODBC connection, 543 Pareto diagrams, 334
ODBC sources, 547 report columns, 116
preparing to use, 542 time data, 249
querying, 580, 590 formulas for calculated variables, 64
reading specifications from, 46 FoxPro databases, 596
refreshing data, 580, 590 freezing columns, 87
selecting new, 544 FromFilter (Replaceable Parameter), 574
synchronizing with SPC parameters, 570 functions
troubleshooting, 587 editing, 73
using, 542, 579 in calculated variable formulas, 65
using SQL, 555
EXTRACT (Run file command), 438
Extract Definition files (SEL), 13 G
creating and editing, 537
using, 438, 536 general parameters, 246
extracting a subset from a Data Set, 536 global settings. See system parameters
go to a data cell, 77
graphics. See also charts
F title, 246
graphics comments
FFD files. See Fixed-Field Definition files adding, 204
file deleting, 205
ranges, 279 editing, 205, 292
title, 278 synchronizing with data, 59
file names, 7 Graphics files
entering, 13 creating with Run files, 393
long, 392, 487 definition, 12
permanent for charts, 184 dragging and dropping, 232

668 • INDEX
Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

location of, 269


opening with the Graphics Viewer, 189 K
registration of, 15
key columns
saving, 183, 230, 339, 350, 354
and assignable causes/corrective actions,
viewing, 185
218
Graphics Viewer, 187
and graphics Comments, 204
GRD function, 25, 65
and limit regions, 299, 304, 307
GROUP (CHART subcommand), 426
and multi-key sort, 99
GROUP (Run file command), 440
and tagged data, 81
group layout, 196
for Connectivity Data Sets, 570
arranging, 198
specifying, 57
creating, 197
KRUSKAL (Run file command), 443
printing, 201
Kruskal-Wallis statistic, 351
grouped data variables, 45

H L
labels. See description variables
Header files
LANDSCAPE (CHART subcommand), 426
creating from a Run file, 433
LastDaysFilter (Replaceable Parameter), 574
creating new, 520
LastMonthsFilter (Replaceable Parameter),
creating with Run files, 495
574
definition, 9
LikeFilter (Replaceable Parameter), 574
registration of, 15
limit regions, 98, 255, 299
updating from a Run file, 478
and Connectivity Data Sets, 307
using an existing, 519
defining, 304
histograms. See process capability histograms
synchronizing with data, 59
limits
I confidence, 178
inner, 308
importing specifying, 250
comma-separated-value files, 430, 510 warning, 308
fixed-field files, 430, 512 line thicknesses, 220
individual measurement variables, 40 for charts, 224
individuals and range charts, 129 for text reports, 224
example, 134 LN function, 25, 65
individuals charts, 129 LOG.TMP file, 597
example, 134 LOGn function, 25, 65
inner limits, 308 long file names, 392, 487
input mask Lotus Approach databases, 597
defining, 56 lower specification limit, 46
overriding, 87 LSL. See lower specification limit
inserting
data from another Data Set, 112
rows, 35, 80 M
INT function, 25, 65
managing
IR (Run file command), 442
charts, 187
Data Sets, 9
J margins
for printed charts, 195
JPEG files mask, input, 56
quality of, 228 MatchFilter (Replaceable Parameter), 574

INDEX • 669
Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

MatchFilter form of Ask command, 401 multiplier variables, 45


MAX function, 25, 65 MULTREG (Run file command), 450
maximum
failure lifetime, 177
for even distributions, 102 N
number of footer lines, 321
scale value, 178, 217, 298, 328 NEWVAR (Run file command), 451
subgroup size, 289 nonconformities charts. See c-charts
summary statistic, 118 nonconformities per unit charts. See u-charts
variables on X axis, 281 NONE (CHART subcommand), 426
MCAPREP (Run file command), 443 nonscrolling columns. See freezing columns
measurement variables, 40 normal probability plots
median creating, 171, 452
box plots, 180, 425 example, 172
capability reports, 445 normalized data, 548
distribution midpoint, 268, 330 NORMPLOT (Run file command), 452
median and individuals charts, 129 NoWorkingMessage (Run file command),
example, 135 453
median and range charts, 129 np-charts, 141, 423
example, 135 example, 143
MERGE (Run file command), 445 number defective charts. See np-charts
MIN function, 25, 65 number of footer lines, 321
minimum numeric description variables, 44
for even distributions, 102 numeric formats for reports, 118
scale value, 178, 217, 298, 328 NWG files. See Graphics files
summary statistic, 118 NWH files. See Header files
missing data
entering, 80
handling, 24, 287 O
mode, 272
missing-data symbol, 24 ODBC, 542, 545, 594, 595, 597
changing, 431, 530 connection, 543
defining, 272 settings, 591
missing-data techniques, 25, 600 sources, 547
in columnwise subgroups, 606 using with remote databases, 596
in rowwise subgroups, 601 opening
MOD function, 25, 65 a Data file without a Header file, 518
modifying Data Sets, 28
data, 78 operators in calculated variable formulas, 64
data definition, 32, 70 options. See parameters
moving Oracle databases, 596
Data Sets, 9 order of evaluation in calculated variable
rows, 35 formulas, 66
to a specific data cell, 77 order of polynomial, 380
moving around ordinary unpaired sample t-statistic, 356
data definition form, 31 other parameters
in the Editor, 75 control chart, 316
moving-average subgroups, 21 variable parameters, 293
MPCAP (Run file command), 447 other variables, 46
MR (Run file command), 448
MSORT (Run file command), 449
multiple regression, 374 P
multiple-variable Pareto, 335
paired sample t-statistic, 358

670 • INDEX
Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Paradox databases, 596 POLREG (Run file command), 457


parameters polynomial regression, 378
box plots, 332 precision, 632
capability, 266 preferences. See parameters
control charts, 253, 295 previewing printed output, 201
cumulative sum chart, 314 PRINT (Run file command), 459
file, 278 printing
general, 246 a data listing, 113
Pareto diagrams, 333 a formatted data report, 115
preventing changes to, 270 borders around charts, 230
process, 293 charts, 194
process capability histogram, 323 data, 113
process capability histograms, 318 layout for charts, 195
process capability reports, 331 text reports, 194
replaceable. See Replaceable Parameters probability distribution, for process capability
Run file, 386 histograms, 326
short run, 336 probability, control limits based on, 626
system (global), 242 process capability
variable, 283 calculations, 328
PARETO (Run file command), 453 confidence limits, 268, 330
Pareto diagrams Ford indices, 625
creating, 126, 144 process capability histograms
example, 146, 147, 148 additional limits, 325
file range, 335 bars, 324
formatting, 334 chart bars, 268, 325
multiple-variable, 335 creating, 137, 457
of assignable causes and corrective actions, example, 137
152 features displayed, 325
parameters, 333 parameters, 318, 323
ParseFileName (Run file command), 454 probability distrubution, 326
passwords statistics, 262, 320
for external databases, 589 process capability reports
paths. See file paths breakdown, 331
pattern rules, 256, See also zone rules, run creating, 137
rules default variables, 331
changing, 262 example, 140
defining new, 259 parameters, 272, 331
deleting, 262 selecting statistics to display, 139
specifying, 258 statistics, 273
using, 317 process parameters, 293
PAUSE (Run file command), 455 calculating center line and limits from, 302
PCAP (Run file command), 457 cumulative sum charts, 315
p-charts, 141, 423 PROMPT (Run file command), 460
example, 142 protractor, cumulative sum, 316
units, 317
Pearson product moment correlation t-
statistic, 362 Q
percent defective charts. See p-charts
permissions, 269 QA.NWA pre-6.1 configuration file, 245
plotting characters, 250 quantile plots
for specific variables and charts, 309 creating, 126, 172, 452
specifying, 226 example, 173
staggering, 309 querying external databases, 580, 590

INDEX • 671
Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

quotation marks passing from command line, 486


around file names, 392 prompting for at run time, 486
around Replaceable Parameters, 487 setting within Run files, 486
in exported CSV files, 522 replacing (and finding) data, 85
in imported CSV files, 511 report
in Run file command parameters, 503 date, 249
QXP files. See Exception Definition files REPORT (Run file command), 466
report format
selecting, 115
R specifying, 116
Report Format files (RPT), 13, 467
rainbow zones using, 115
colors for, 223 reports
configuring, 252 assignable causes and corrective actions,
for specific charts, 317 148
suppressing display of, 224 configuring appearance of, 224
random numbers, generating, 101 copying to other programs, 233
randomized block design, ANOVA, 342 exception, 157, See exception reports
range charts, 129 process capability, 137, See process
example, 133 capability reports
Range form of Ask command, 403 saving, 230
RANGE function, 25, 65 title, 246
RangeFilter form of Ask command, 405 rotating
ranges Data Sets, 531
analysis and display, 285 X-axis labels, 225
control limit recalculation, 286 ROW function, 65
data, 284 row mode, 77
file, 279, 335 Row Mode, 76
filter, 460, 488 rowwise subgroups, 18
recalculating calculated variables, 98 RPT files. See Report Format files
REDUCE (Run file command), 462 rule violations, 256
reduced data variables, 41 rules
refresh data from database, 580, 590 pattern, 256
regions. See limit regions run, 257
registered file types, 14 zone, 256
REGRESS (Run file command), 463 RUN (Run file command), 467
regression, 366 run charts, 468
multiple, 374 creating, 126, 166
polynomial, 378 example, 168, 169
single variable, 366 Run file commands, 386
REM (Run file command), 466 $COMMENT, 431
RENAME (Run file command), 466 $FILTER, 439
renaming Data Sets, 11 ACCA, 393
Replaceable Parameters, 484, 488 ANOVA, 396
and (Ask) settings, 569 ANOVAR, 397
and connectivity, 585 APPEND, 397
converted to SQL, 579 AskAlpha, 399
example, 491, 493, 503 AskAlphaMatchFilter, 401
in file title, 279 AskAlphaRange, 403
in SQL statements, 569, 573 AskAlphaRangeFilter, 405
in the command line), 503 AskAlphaSelectFilter, 408
in titles of graphics and reports, 247 AskDate, 399
naming, 485, 488 AskDateMatchFilter, 401

672 • INDEX
Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

AskDateRange, 403 PARETO, 453


AskDateRangeFilter, 405 ParseFileName, 454
AskDateSelectFilter, 408 PAUSE, 455
AskDATFile, 411 PCAP, 457
AskInteger, 399 POLREG, 457
AskIntegerMatchFilter, 401 PRINT, 459
AskIntegerRange, 403 PROMPT, 460
AskIntegerRangeFilter, 405 Range form of Ask, 403
AskIntegerSelectFilter, 408 RangeFilter form of Ask, 405
AskList, 413 REDUCE, 462
AskNumber, 399 REGRESS, 463
AskNumberMatchFilter, 401, 408 REM, 466
AskNumberRange, 403 RENAME, 466
AskNumberRangeFilter, 405 REPORT, 466
AskOpenFile, 416 requirements, 392
AskSaveFile, 418 RUN, 467
AskTime, 399 RUNCHART, 468
AskTimeMatchFilter, 401 SAVE, 469
AskTimeRange, 403 SCATTER, 470
AskTimeRangeFilter, 405 SelectFilter form of Ask, 408
AskTimeSelectFilter, 408 SET, 470
AskVariable, 420 SetCurrentDir, 472
ATTRIBUT, 422 SHELL, 472
BOXPLOT, 423 SINGCOL, 473
CALC, 425, 585 SUMMARY, 474
CHART, 426 SUMSTAT, 475
CHITEST, 427 SYSTEM, 476
CLEANUP, 429 TITLE, 476
CONNECT, 432, 584 TTESTS, 476
COPY, 432 UpdateNWH, 478, 495
CORVAR, 433 USETEMPDIR, 480, 584
CreateNWH, 433, 495 WALDRUN, 481
CUSUM, 435 WEIBULL, 482
DELETE, 436 XRS, 483
EWMA, 436 Run File Interpreter, 2, 385
examples, 391 error messages, 505
EXCEPT, 437 executing, 496
EXTRACT, 438 halting on error, 249
FLIP, 440 interacting with, 504
general form, 391 Run files
GROUP, 440 and external databases, 578, 583
IR, 442 command-line options, 502
KRUSKAL, 443 converting old, 506
MatchFilter form of Ask, 401 creating, 385
MCAPREP, 443 definition, 12
MERGE, 445 error handling, 248
MPCAP, 447 errors, 505
MR, 448 examples, 490, 585
MSORT, 449 executing, 496
MULTREG, 450 how they work, 385
NEWVAR, 451 registration of, 15
NORMPLOT, 452 scheduling execution of, 498
NoWorkingMessage, 453 using old, 506

INDEX • 673
Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

run rules, 257 in calculated variable formulas, 66


defining, 261 in file names, 392, 487
RUNCHART (Run file command), 468 specifications
entering, 46
reading from database, 46
S show or suppress, 318
specifying, 250
sample size SQL
attribute data, 290 and (Ask) filter options, 569
specifying, 129 and Replaceable Parameters, 573, 585
SAVE (Run file command), 469 entering commands, 555
saving passing commands to database, 588
calculated variables to a new Data file, 541 semicolons in commands, 590
charts, 183 viewing generated commands, 572, 579
charts and reports, 230 SQL Server databases, 596
data definition, 60, 69 SQR function, 25, 65
Data Sets, 112 standard deviation
filtered data, 98 calculation method, 329
scale standard deviation calculation method, 267,
for Weibull analysis plots, 178 627
process capability histogram, 326 standard deviation charts, 129
X-axis, 216 example, 133
Y-axis, 216, 297 starting. See also executing
SCATTER (Run file command), 470 Quality Analyst Editor, 27
scatter diagrams, 171, 172, 470 Quality Analyst Graphics Viewer, 188
creating, 126, 169 statistical analysis, 338
example, 170 output, 339
scheduling Run files, 498 statistics
SEL files. See Extract Definition files box plots, 181, 274
SelectFilter form of Ask command, 408 process capability histogram, 320
semicolons in SQL, 590 process capability histograms, 262
SET (Run file command), 470, 570 process capability reports, 139, 273
SetCurrentDir (Run file command), 472 selecting (histogram), 264
settings. See parameters status bar
SHELL (Run file command), 472 toggling display of, 191
short run charts STDDEV function, 25, 65
creating, 183 sticky notes on charts. See callouts
parameters, 336 structure of Data files, 15
shortcuts, program, 14, 486, 498 subgroup measurement variables, 40
show subgroup size for variable data, 288
minor tick marks, 282 subgroup type for variable data, 288
specifications, 318 subgroup/sample size and type, 287
target, 318 subgroups, 17
sigma factor, 268 columnwise, 19
significant digits, 632 converting from multiple to single column,
SIN function, 25, 65 535
SINGCOL (Run file command), 473 converting from single to multiple
single sample t-statistic, 360 columns, 533
single variable regression, 366 moving-average, 21
SMY files. See Summary files rowwise, 18
Snapshot setting, 590 variable-size, 23
sorting data, 98 SUM function, 25, 65
spaces SUMMARY (Run file command), 474

674 • INDEX
Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

Summary files (SMY), 474 troubleshooting external databases, 587


creating with Run files, 393 t-statistic, 356
definition, 12 ordinary unpaired sample, 356
SUMSTAT (Run file command), 475 paired sample, 358
surviving units, 177 Pearson product moment correlation, 362
synchronizing single sample, 360
SPC parameters with data, 57, 570 TTESTS (Run file command), 476
SYSTEM (Run file command), 476 typeface. See fonts
system parameters, 242 typographical conventions, 3
preventing changes to, 270

U
T
u-charts, 141, 423
tagged data, 26 example, 144
handling, 287 units, 318
mode, 271 unequal expected frequencies Chi-square
tagging data, 81 statistic, 348
Autotag, 84 units
TAN function, 25, 65 box plots, 182, 274
target p-charts, 317
show or suppress, 318 surviving, 177
specification, 46 u-charts, 318
Task Scheduler and Run files, 498 untagging data, 81, 85
template for data entry, 56 UpdateHED (Run file command). See
temporary folders, 480 UpdateNWH
text comparisons, 249 UpdateNWH (Run file command), 478, 495
text files upper specification limit, 46
of exception report data, 163 user IDs for external databases, 589
Text Output files (obsolete), 507 USETEMPDIR (Run file command), 480,
tick marks, show minor, 282 584
tiling chart windows, 192 USL. See upper specification limit
time
database fields, 562
formats, 249 V
variables, 43
time element (in DateTime variables) variable control charts, 128
filtering, 92 examples, 131
sorting, 99 Variable Definition files (VDF), 13, 452, 538,
title 541
file, 278 creating, 539
for graphics, 246 variable description, 46
for reports, 246 variable names, 36, 62
TITLE (Run file command), 476 in calculated variable formulas, 64
title bar variable parameters, 283
variable name in, 229 variables
titles alphabetic, 44
for charts, 203 attribute, 42
ToFilter (Replaceable Parameter), 574 axis label, 57
toolbar calculated, 62
button size, 74, 192 category, 45
toggling display of, 191 data type, 37
transposing. See rotating Data Sets DateTime, 42

INDEX • 675
Northwest Analytical, Inc. NWA Quality Analyst User’s Manual

defining, 35
description, 279, 294 X
description (data type), 42
X-axis
description of, 46
labels, 281, See description variables
grouped data, 45
scale, 216
individual measurement, 40
zooming in, 214
measurement, 40
X-axis labels
multiplier, 45
rotating, 225
numeric description, 44
x-bar and range charts, 129
other, 46
example, 132
reduced data, 41
x-bar and standard deviation charts, 129
selecting for charting, 121
example, 132
selecting for report, 116
x-bar charts, 129
specifications, 46
example, 131
specifying, 284
XML files, 437
subgroup measurement, 40
Graphics files, 12
time, 43
Header file format, 113
variable-size subgroups, 23
of exception report data, 163
VDF files. See Variable Definition files
XRS (Run file command), 483
verifying data, 100
viewing
Y
chart details, 206
Graphics files, 185
V-mask, 130, 315, 435 Y-axis
scale, 216
zooming in, 214
W year 2000, 248
WALDRUN (Run file command), 481
Z
Wald-Wolfowitz runs test, 364
warning limits, 308
Weibull zone rules, 256
analysis, 174 defining, 259
and large Data Sets, 178 zones
distribution, 174 rainbow. See rainbow zones
plots, 178 zooming in on charts, 214
WEIBULL (Run file command), 482
wild cards, 9, 566
Working message
suppressing in Run file, 453

(7316)

676 • INDEX

You might also like