quick start ncss 2004

96
Quick Start & Self Help Manual NCSS Statistical System for Windows Published by NCSS Dr. Jerry L. Hintze Kaysville, Utah August, 2001

Upload: lindsay-reeves

Post on 07-Feb-2016

234 views

Category:

Documents


0 download

DESCRIPTION

Ncss 2004

TRANSCRIPT

Page 1: Quick Start Ncss 2004

Quick Start&

Self HelpManual

NCSSStatistical System for Windows

Published byNCSS

Dr. Jerry L. HintzeKaysville, UtahAugust, 2001

Page 2: Quick Start Ncss 2004

NCSS Quick Start & Self Help ManualCopyright 2001Dr. Jerry L. HintzeKaysville, Utah 84037

All Rights ReservedPrinted in the United States of America

Direct inquiries to:NCSS329 North 1000 EastKaysville, Utah 84037Phone (801) 546-0445Fax (801) 546-3907Email: [email protected]

Number Cruncher Statistical Systems is a trademark of Dr. Jerry L. Hintze.

Warning:This software and manual are both protected by U.S. Copyright Law (Title 17 UnitedStates Code). Unauthorized reproduction and/or sales may result in imprisonment of up toone year and fines of up to $10,000 (17 USC 506). Copyright infringers may also besubject to civil liability.

Page 3: Quick Start Ncss 2004

About this manualCongratulations on your purchase of the NCSS statistical package! The NCSS statisticalpackage offers:• Easy data entry.• Statistical routines that provide high quality and accuracy yet are quick and easy to

learn and use.• Straightforward procedures for creating paper printouts and file copies of both the

results of the statistical analyses and graphical representations of those results.

Our goal is that with the help of this NCSS Quick Start booklet, you will be up andrunning on the system in less than one hour. Specifically, you will quickly andsuccessfully complete the following tasks:• Enter a small set of data into NCSS (that is, create a database), label the variables, and

print a hard copy of your data.• Compute descriptive statistics on the data in the database which you created. Also,

run a t-test and a regression analysis on your data.• Print copies of the descriptive statistics reports and the other reports which you

generate. Also, print graphical representations of those analyses. Also, export yourtext and graphic material to a word processing program such as Microsoft Word orWordPerfect.

I believe you will find that this NCSS Quick Start booklet provides a quick, easy,efficient, and effective way for first-time NCSS users to get up and running. NCSS usersneeding details on how to execute particular tasks should find the self-help chapters in thesecond half of this booklet very useful.

I look forward to any suggestions you have to improve the usefulness of this manualand/or the NCSS system. Meanwhile, good computing!

Jerry Hintze, Author

Page 4: Quick Start Ncss 2004
Page 5: Quick Start Ncss 2004

Table of Contents

Quick Start1. Installation 12. Creating a Database 5

Starting NCSS 5Entering a column of data 6Labeling a variable 8Saving your database 10Printing your database 11Clearing the database 14The NCSS windows 15Moving among the windows 16

3. Data Transformation 17Loading a database 17Creating a percent variable 19Recoding a variable 23Saving the changes 24

4. Running Descriptive Stats 25Running Descriptive Statistics 25Saving the output 29Printing the output 30

5. Running a T-Test 31Running a two-sample t-test 31

6. Running a Regression 35Running a regression 35Creating a scatter plot 36Create logarithmic variables 39Run the regression 40

Self Help7. Data Window 43

Loading a database 43Copying and pasting data 45Changing column widths 46

8. Procedure Window 47Navigating a procedure window 47Changing an option 49Notes on modifying options 50Saving a template 51Loading a template 52The default template 52

9. Output Window 53Viewing output 53Printing output 56Saving output to file 57Saving output to log 58

10. Filters 59Setting up a filter 59Disabling a filter 62

11. Writing Transformations 63Recoding 63Basic indicator 64Compound indicators 64Using indicators for if - then 65

12. Importing Data 67How import ASCII.TXT 67

13. Value Labels 71POLITIC Database 71Adding value labels 72Attaching value labels 72Using value labels 73

14. Database Subsets 77Sort the database 77Copy the subset 78Copy the variable info 80Copy the value labels 82

15. Simulation 85Uniform random numbers 85Simulating a t-test 87

16. Cross Tabs on Table Data 89Cross tabs on summarized data 89

Page 6: Quick Start Ncss 2004

1

CHAPTER 1

InstallationBefore you install

Check system requirementsNCSS can run on any system that can run 32-bit Windows applications. This includes Windows 98,Windows ME, Windows NT 4.0, or Windows 2000. The recommended minimum system is aPentium PC with 32 MB of memory. NCSS has been tested on systems with only 16 MB of memory.

NCSS takes up about 25 MB of disk space. If space is tight, you can reduce this by deleting its help(*.hlp) files. Once installed, NCSS requires about 5 MB of temporary disk space while it is running.

Find a home for NCSSBefore you start installing, decide on a directory where you want to install NCSS . By default, thesetup program will install NCSS in the NCSS97 (or NCSS2000) directory of your C drive. You maychange this during the installation, but not after, so make sure you have the required disk space onthe drive you will install NCSS on.

What install doesWhen you insert the CD into your computer, it will automatically load and run the installationprogram SETUP.EXE contained in the NCSS97 directory on the CD. If you have previous installed acopy of NCSS, the installation program will replace all outdated files with their current versions.

This version of NCSS contains PASS within it. If you have not purchased PASS, you will be able totry it out for 30 days from the date you first use it. After the trial period, you will need to purchase aseparate license to continue using PASS.The installation procedure (Setup) creates the necessary directories and copies the NCSS and PASSprograms from the CD to those directories. The files on the CD are compressed, so Setupdecompresses these files as it copies them to your hard disk.

The directories created by Setup are (either NCSS97 or NCSS2000 may be substituted below):

\NCSS2000 (or your substitute directory) contains most of the program files.

\NCSS2000\DATA contains all of the database files used by the tutorials. We recommend creating asub-directory of this directory to contain your data.

\NCSS2000\JUNK contains temporary files used by the program while it is running. Under normaloperation, NCSS will automatically delete temporary files. After finishing NCSS , you can delete anyfiles left in this directory.

\NCSS2000\REPORT is the default directory in which to save your output.

Page 7: Quick Start Ncss 2004

Installation2

\NCSS2000\SETTINGS contains the files used to store your program options. These files are used bythe NCSS Template system which is described later.

\NCSS2000\STS contains all labels, text, and online messages. The text in these files may becustomized. For example, you may want to modify report headings or help messages. You may evenwant to translate this text into languages other than English.

Setup places a file called NCSS97.INI in your Windows directory. This file contains all defaultsettings, paths, and constants that are used by the system. This file is documented in README.WRI.

If you have a previous version of NCSSIf you are upgrading from a previous version of NCSS, instruct the Setup program to install the newversion in the same directory as your previous version (usually \NCSS97). All appropriate files willbe replaced. This includes your template files in the SETTINGS directory. If you want to keep these,you must copy them to a separate directory before you begin the installation and copy them backafter completing the installation.

Installing NCSSThis section gives instructions for installing NCSS on your computer system. You must use theNCSS Setup program to install NCSS. The files on the CD are compressed, so you cannot simply copythe diskettes to your hard drive.

After you run Setup, you should read the NCSS README.WRI file for late-breaking informationbefore starting NCSS.

Follow these basic steps to install NCSS on your computer system.

Step Notes

1. Make sure that you are using a 32-bit version of Windows such as Windows ME or Windows2000.

2. Insert the CD in the CD drive. On the Start menu, select the Run command. Enter D:Setup(You may have to substitute the appropriate letter for your CD drive if it is not D.).

3. Once Setup starts, simply follow the instructions on the screen. NCSS will be installed in thedrive and directory you designate.

If something goes wrong during installationThe installation procedure is automatic. You simply put the appropriate diskettes in the floppy drivewhen directed. If something goes wrong during installation, delete the \NCSS97 directory and startthe installation process at the beginning. If trouble persists, contact our technical support staff asindicated below.

Obtaining the DocumentationA complete set of documentation is contained on this CD in the directory /NCSS97/DOCS. Thisdirectory contains Adobe Acrobat PDF files that can be easily browsed and printed. Acomprehensive table of contents is contained in the text file _READ_ME.TXT. You can access thisfile by double-clicking on it from Windows Explorer or by loading it into your word processor.

Page 8: Quick Start Ncss 2004

Installation 3

The DOCS directory also contains a free copy of Adobe Acrobat Reader 4.0. You can install thereader by double-clicking on the file Acrd4enu.exe. Note that this is a copyrighted program fromAdobe. You should read their licensing agreement that says that you can not sell the Reader program.

Note that to access the CD, you insert it and wait for the installation window to appear. Instead ofinstalling the software, select Cancel Installation. Now you can use Windows Explorer to browse theCD.

Starting NCSSNCSS may be started using your keyboard or your mouse using the same techniques that you use tostart any other Windows application.

Starting NCSS using your mouseYou can start NCSS by selecting NCSS from your Start menu using standard mouse operations.

Starting NCSS using your keyboardYou can start NCSS by selecting NCSS from your Start menu using standard keyboard operations.

Obtaining HelpOnline HelpTo help you learn and use NCSS efficiently, most of the material in this manual is included in theonline Help. The online Help is started from the Help Menu.

Page 9: Quick Start Ncss 2004

Installation4

Since the Help information is stored electronically, it can be changed more quickly than the printedmanual. Hence, you should always look to the online Help for information on procedures that is notcontained in this manual. Also, whenever you notice differences between the online instructions andthe printed instructions, you should assume that the online instructions are more current and followthem.

Using HelpThere are a few key features of our help system that, if you understand, will let you use the onlinehelp more efficiently.

First, the Contents button brings up the table of contents of the help system. Use the Contents buttonto quickly navigate through the Help system.

Second, each chapter was designed to be easily navigated. You can then proceed through a chaptersection by section using the period and comma keys on your keyboard.

Finally, you can use the Index and Find buttons to bring up an index of subjects.

Technical SupportTo help us answer your questions more accurately, we may need to know about your computer system.Please have pertinent information about your computer and operating system available. Also, many helpcalls will require us to have an understanding of your data. Be prepared to provide background on yourdata.

You can contact our technical support by calling (801) 546-0445 between 8 a.m. and 5 p.m. (MST).You can contact us by email at [email protected] or by fax at (801) 546-3907. Our goal is torespond to Email within 24 hours and to faxes within 3 days, so please use Email whenever possible.

Page 10: Quick Start Ncss 2004

5

CHAPTER 2

Creating adatabaseAbout this chapter (Time: 21 minutes)This chapter will show you how to enter, label, save, and print a database. You will find completecoverage of these subjects in the first four chapters of the NCSS Users Guide.

Starting NCSSSelect Programs - NCSS from the Start menu to start NCSS. After starting, the NCSS spreadsheetprogram appears with an empty datasheet. We will begin by entering data into this datasheet.

Page 11: Quick Start Ncss 2004

6 Creating a database

Brain Weight DataThe following data give the body weight in kilograms and the brain weight in grams of variousmammals. This chapter will show how to enter these data into an NCSS database and perform basicdatabase operations such as saving and printing.

Mammal Body BrainName Weight WeightAfrican Elephant 6654 5712Asian Elephant 2547 4603Giraffe 529 680Horse 521 655Cow 465 423Gorilla 207 406Pig 192 180Jaguar 100 157Man 62 1320Chimpanzee 52 440Gray Wolf 36 120Kangaroo 35 56Baboon 11 179Red Fox 4 50Cat 3 26

Entering a column of dataTake the following steps to enter the brain weight data into NCSS :

1 Position the cursor in theupper-left cell.

This is done by clicking in thecell just below the C1.

2 Type African Elephant.

Notice that as you type, thecharacters appear in twoplaces: in the cell where youare typing and in the cell-editbox at the top of the sheet.

Page 12: Quick Start Ncss 2004

Chapter 2 Creating a database 7

3 Press Enter.

The text is entered andthe cell cursor (the darkborder around the cell)moves down to the nextcell.

4 Type Asian Elephant.Press Enter.Type Giraffe.And so on until youfinish entering thenames.

5 Using the vertical scrollbar or the Page Up key,reposition the screen sothat you can beginentering data in thesecond column.Click in the first row ofcolumn two. This willhighlight this cell.

6 Type in the second andthird columns ofnumbers. Thecompleted table shouldappear as shown.

To cancel an entry, you canpress the Esc key. If youhave already pressed Enter,you can choose Undo fromthe Edit menu.

Page 13: Quick Start Ncss 2004

8 Creating a database

Labeling a variableIn NCSS, a column of data is called a variable. Each variable has a number and a name. The number isits column number. The name is the label at the top of the column. The name of the variable will bedisplayed in all statistical reports and graphs that you generate, so it is important to name variables sothat they will be remembered.

In a new database, the variables receive the default names C1, C2, C3, etc. Hence, you have justentered data into variables C1, C2, and C3. We will now show you how to change the names of thesevariables.

1 Click on the Variable Info tab.

2 Click in the C1 cell.

This will position the cell cursorin that cell. (The cell cursormay already be there.)

3 Type Name.Press Enter.Type Body_Weight.(Use the underscore, not theminus sign in these names.)Press Enter.Type Brain_Weight.Press Enter.

4 Click on the Sheet1 tab.

This will return you to a viewof the data. The screen shouldappear like this.

Page 14: Quick Start Ncss 2004

Chapter 2 Creating a database 9

The final step is to widenthe columns so that thecomplete names andlabels are shown.

5 Drag the mouse from theName heading to theBrain_Weight heading.This is done by pressingthe left mouse on theheading Name and, without letting up, moving the mouse pointer to the heading Brain_Weight andfinally letting up on the mouse. All three columns (headings and data) will be darkened.

6 Now, position the mousebetween the two columns.The mouse pointer willchange to a twodirectional arrow.

7 Drag the mouse to theright until you are almostto the next border and letgo of the mouse button.

The columns will bewidened, showing thecomplete variable names(column headings) andanimal names.

Page 15: Quick Start Ncss 2004

10 Creating a database

8 Click on a cell in the body ofthe table to cancel the selection(the reverse video).

Variable names are used throughout the program to identify which columns of data to analyze. Avariable name must begin with a letter (not a number); should contain only letters, numbers, and theunderscore; and should not contain blanks. For correct formatting on reports, variable names should beless than fourteen characters, although there is no maximum length.

Saving your databaseAs you enter data, it is stored in your computer’s temporary memory but not on your hard disk. If thecomputer loses power, you lose your data. We will now show you how to save the data to your harddisk.

1 Select Save As from theFile menu of the Datawindow.

Page 16: Quick Start Ncss 2004

Chapter 2 Creating a database 11

2 Double-click the Datadirectory to open it.

3 Enter mydata.s0 in the FileName box.

4 Click Save.

An NCSS database name must end with the file extension s0 (that’s “s zero”). Hence, a valid file namewould have numbers, spaces, and letters followed by the extension “s0”. For example, you might useabc.s0.

The database is stored as two files on your hard disk. If you use Windows Explorer to view the Datadirectory, you will find that you have created two files: mydata.s0 and mydata.s1.

Printing your databaseYou will often want to create a printout of the data you have entered. We will now show you how thisis accomplished.

1 Select Data Report fromthe Data menu.

The Data Reportprocedure appears. Thiswindow allows you tocontrol the format of yourreport.

2 Click on the button to theright of the Data Variablesline.

Page 17: Quick Start Ncss 2004

12 Creating a database

3 Select the first three variablenames: Name,Body_Weight, andBrain_Weight.

Press Ok.

These variable names willappear in the Data Variablesbox.

4 Enter 2.0 in the First box ofthe Tabs section at thebottom of the window.

5 Press the Run button on theright of the toolbar at the topof the window.

Page 18: Quick Start Ncss 2004

Chapter 2 Creating a database 13

The final result will appear asshown.

6 Finally, select Print from the Filemenu of the Output window. Thiswill display the Print dialog boxfrom which you can print thereport.

Congratulations! You have successfully entered and printed a set of statistical data. Analyzing these datausing the various statistical procedures will not be much more difficult.

Page 19: Quick Start Ncss 2004

14 Creating a database

Clearing the databaseAs you move from analysis to analysis, you will often have to clear the datascreen so that new data maybe entered. This is done as follows. (Of course, you should save your data before clearing it!)

2 Click Ok.

This will clear the screen andpresent you with an empty filejust like when you start theprogram.

NCSS maintains two data formats. The spreadsheet (S0-type) format is for routine databases of under1000 rows. The database (S0Z-type) format is for databases with more than 1000 rows.

1 Select New from the Filemenu of the Data window.(Use the Windows menuto transfer from theOutput window to the Datawindow.)

(If you have notpreviously saved yourdata, choosing New willcause the program to askyou if you want to savethe current datasheetbefore it is cleared.)

Page 20: Quick Start Ncss 2004

Chapter 2 Creating a database 15

The three NCSS windowsAs you have just seen, NCSS is controlled by three windows: Data, Procedure, and Output. Eachwindow has its own menu bar. Be sure you are in the correct window when you use the menu. Forexample, the Save As command in the Data window saves your data, the Save Template command inthe Procedure window saves the procedures’s current settings, and the Save As command in the Outputwindow saves the current report. It is easy to forget which window you are in!

The NCSS Data window containsthe data that is currently beinganalyzed. This window lets youview, modify, and save your data.It has the look and feel of aspreadsheet.

Chapter 7 provides a closer look atthe Data window.

This is the main NCSS window.Closing this window will exit theprogram.

The NCSS Procedure windows letyou set the options for a particularanalysis. Whether you are runninga multiple regression, an ANOVA,or a scatter plot, you will set theoptions of this procedure in theProcedure window.

Chapter 8 provides a closer look atthe Procedure window.

Closing this window will not exitNCSS.

Page 21: Quick Start Ncss 2004

16 Creating a database

The NCSS Output window displaysthe output from the statistical andgraphics procedures. It serves as amini-word processor--allowing you toview, edit, save, and print youroutput.

Chapter 9 takes a closer look at theOutput window.

Closing this window will not exitNCSS.

Moving from window to windowThere are several ways of moving among the windows:

1 Remove the windows you are not currently using by minimizing them.

2 Arrange the windows on your screen so that all can be seen.

3 Use the task bar along the bottom of your screen.

4 Use the Windows menu.

5 Use the Navigator.

6 Use the toolbar (this is usually the quickest and easiest).

Page 22: Quick Start Ncss 2004

17

CHAPTER 3

DataTransformationAbout this chapter (Time: 13 minutes)This chapter continues the introduction to the NCSS system by taking you through examples of usingtransformations to create new variables. Specifically, you will be shown how to calculate percentagesand how to recode the values of a variable.

Starting NCSS and loading a databaseIf NCSS is not already running, start it up now by clicking on the NCSS icon (refer to the beginning ofChapter 2 for details). We will use the brain weight data that was entered in Chapter 2. These data arestored in the MAMMALS database in the \NCSS\DATA subdirectory. To begin this tutorial, take thefollowing steps to load the MAMMALS database.

2 Double click the Datasubdirectory to select it.

1 Select Open from the Filemenu of the Data window.

The File Open window willappear.

Page 23: Quick Start Ncss 2004

18 Data Transformation

3 Double click mammals.s0 in thelist of available files.

4 Click the Open button.

This will load the MAMMALSdatabase into the Data window.

Page 24: Quick Start Ncss 2004

Chapter 3 Data Transformation 19

Creating a percentage variable5 Click on the Variable Info tab.

This will position you in theVariable Info datasheet.

6 In the Transformationcolumn, click on the fourthcell down--the one in the C4row.

This will position thespreadsheet cursor in thiscell. This is where thetransformation will beentered.

Page 25: Quick Start Ncss 2004

20 Data Transformation

7 Type in the transformation expression:Brain_Weight/Body_Weight/10.(Be sure to type the underscores!)

Press Enter.

Notice that you edit the transformationin the edit bar at the top of thespreadsheet.

This step enters the new transformationexpression, but does not change thedata. The data are not generated untilthe spreadsheet is manuallyrecalculated.

8 Click on C4 in the Name column andtype Percent and press Enter.

This renames the variable from thedefault of C4 to a new value that betterdescribes the data in this column.

9 Double click on the cell in the fourth rowin the Format column.

This will display the Format window forediting the format of the Percentvariable. Note that this format will notinfluence the internal precision of thedata.

Page 26: Quick Start Ncss 2004

Chapter 3 Data Transformation 21

10 Select the two-decimal format: 0.00from the list.

Although it is not necessary toreformat the numbers, it will makeviewing them much easier.

The completed screen will appear likethis.

11 Click the Apply Transformationbutton on the toolbar.

This will cause all transformations tobe recalculated.

12 Click the Sheet1 tab.

Page 27: Quick Start Ncss 2004

22 Data Transformation

This is the final result.

Notice the new column of datain the Percent variable’scolumn.

You can see that the data isactually stored in doubleprecision.

If you change or add data to either Body_Weight or Brain_Weight, the Percent variable’s values willnot be automatically recalculated. You must recalculate the database using the Apply Transformationbutton or the Recalc All option of the Data menu.

Also remember that these changes are not automatically saved on your hard disk. If you want apermanent copy of a database with new transformations, you must save this modified version of thedatabase using the Save option of the File menu in the Data window.

Page 28: Quick Start Ncss 2004

Chapter 3 Data Transformation 23

Recoding a variableIt is often necessary to recode the values of a variable. As an example, we will recode the body weightsto form a new variable as follows. Animals with a body weight less than 100 kg will receive a value of1. Animals with a body weight greater than or equal to 100 kg will receive a value of 2. Thetransformation formula that will accomplish this is (Body_Weight>=100)+1. The expression inside theparentheses results in a “1” if it is true or “0” if it is false. We will call the new variable SizeGroup.

1 Click the Variable Info tab.

2 Click the C5 name.

3 Type SizeGroup and pressEnter.

4 Click in the cell in the fifth rowand third column.

5 Type (Body_Weight>=100)+1and press Enter.

6 Press the ApplyTransformations button togenerate the new values.

7 Click on the Sheet1 tab toreturn to the data.

Page 29: Quick Start Ncss 2004

24 Data Transformation

The final result appears like this.

Saving the changesIt is important to save changes to your database. Take the following steps to do this.

1 Choose Save from the File menu of theData window.

2 Click Yes.

The MAMMALS database on your hard disk will be replaced with the revised edition.

Page 30: Quick Start Ncss 2004

25

CHAPTER 4

RunningDescriptiveStatisticsAbout this chapter (Time: 8 minutes)This chapter continues the introduction to the NCSS system by taking you through an example ofusing NCSS to obtain descriptive statistics.

Running descriptive statisticsIn this section, you will generate descriptive statistics (mean, standard deviation, etc.) on theBody_Weight variable in the MAMMALS data. To begin, start NCSS and load the MAMMALSdatabase. Detailed instructions for doing this are at the beginning of Chapter 3. After the database isloaded, follow these steps to run the procedure:

1 From the Descriptive Statisticsmenu, select Descriptive Stats.

Page 31: Quick Start Ncss 2004

26 Descriptive Statistics

The Descriptive Statistics window willappear.

The next step is to select the variablesto be analyzed.

2 Double click in the Variables box orclick the small button to the right of thisbox.

This will cause the Select Variablesbutton to appear at the top of thewindow.

This will cause the Variables windowto appear.

4 Click on Body_Weight in the VariableSelection List box.

The variable will appear in theVariables Selected box.

5 Click Ok.

The procedure window reappears.Note that the Variables option now hasa value of Body_Weight. This is thename of the variable that was selected.

6 Press the Run button to run theprocedure and generate the followingoutput report.

Page 32: Quick Start Ncss 2004

Chapter 4 Descriptive Statistics 27

The results aredisplayed inNCSS’s wordprocessor.

You can scrollthrough theoutput usingthe scroll bars.You canenlarge thiswindow bydouble-clickingthe title bar--the blue bar atthe topcontaining thewords NCSSOutput.

Don’t beintimidated by the amount of output. The default descriptive statistics report contains much moreinformation than anyone person coulduse. Since NCSS isused by thousandsof people, it mustcontain output formany differentsituations. You cangenerate only thosereports you want bymaking appropriateselections on theReports panel of theDescriptiveStatistics window.

Page 33: Quick Start Ncss 2004

28 Descriptive Statistics

We will now show a special trick to use when you want to view the graphics in more detail.

7 Scroll down through the output untilreach the histogram.

8 Double-click the histogram to obtaina full-screen version of thehistogram.

9 After viewing the graph, close it byclicking the remove button.

Page 34: Quick Start Ncss 2004

Chapter 4 Descriptive Statistics 29

Saving the outputWe will now show you how to save the output so that it can be imported into your favorite wordprocessor.

1 Select Save As from the Filemenu of the Output window.

This will bring up the Save FileAs dialog box.

Switch the current directory tothe Report subdirectory whichwas provided as a convenientplace in which to save yourreports.

2 Type myreport.rtf in the Filename box.

3 Click Save to save the report.

Page 35: Quick Start Ncss 2004

30 Descriptive Statistics

Note that the three-character extension “rtf” is very important. RTF stands for rich text format. Otherprograms, such as Microsoft Word and WordPerfect, recognize files with this extension asimportable. Hence, using this extension makes sure that other programs will be able to import yourreport files.

As an exercise, run your word processor and load the myreport.rtf file.

Printing the outputWe will now show you how to print the output.

1 Select Print from the File menu.

This will bring up the Print dialogbox.

You can select which pages you wantto print.

2 Click OK to begin printing.

Page 36: Quick Start Ncss 2004

31

CHAPTER 5

Running a Two-Sample T-TestAbout this chapter (Time: 6 minutes)This chapter continues the introduction to the NCSS system by taking you through an example of usingNCSS to run a two-sample t-test.

Running a two-sample t-testIn this section, you will conduct a two-sample t-test on data in the MAMMALS1 database. To begin,start NCSS and load the MAMMALS1 database (be careful to load MAMMALS1, not MAMMALS).Detailed instructions for doing this are at the beginning of Chapter 3.

Remember to load the database from the Data window.

In this example,we will comparethe averagepercent brainweight of smallmammals (thoseunder 100 kg inweight) to thesame average forlarge mammals.That is, theresponse variablewill be Percentand the groupingvariable will beSizeGroup.

After the database is loaded, follow these steps to run the procedure:

Page 37: Quick Start Ncss 2004

32 Two-Sample T-Test

1 From the T-Tests submenu of theAnalysis menu, select Two-SampleT-Test.

The Two Sample Tests procedurewindow will appear.

2 Double click in the ResponseVariables box.

This will cause the ResponseVariables selection window toappear.

3 Click on the Percent item in theVariable Selection List box.

4 Click Ok.

Page 38: Quick Start Ncss 2004

Chapter 5 Two-Sample T-Test 33

The T-Test window reappears.Note that the Response Variableshas the entry Percent. This is thevariable that was selected.

6 Double click the top GroupVariable box.

This is the grouping variable. Theaverage percent of those rowswith a SizeGroup value of 1 (smallanimals) will be compared withthe average percent of those rowswith a SizeGroup value of 2 (largeanimals).

7 Select SizeGroup from the list ofavailable variables.

8 Click Ok.

9 Click the Run button to run theanalysis.

Page 39: Quick Start Ncss 2004

34 Two-Sample T-Test

The results are displayed in NCSS’s word processor.

The t-test compares themean percent of twogroups. Often, all you willneed is the t-value andassociated probabilitylevel. These are containedin the Equal-Variance T-Test Section. In this casethe t-value is 3.6560 andthe probability level is0.002904. Hence wereject the null hypothesisthat means are equal.

A quick glance at themeans of the two groupsshows that the meanpercent for small animalsis 1.03 and for largeanimals is 0.13. Hencethe two percentages arean order of magnitudeapart!

The t-test chapter of theUser’s Guide goes intomuch more detail on howto perform a t-testanalysis.

At this point, you couldsave or print the t-test report.

Page 40: Quick Start Ncss 2004

35

CHAPTER 6

Running aRegressionAnalysisAbout this chapter (Time: 10 minutes)This chapter continues the introduction to the NCSS system by taking you through an example ofregression analysis. Regression techniques analyze the relationship between a dependent (Y) variableand one or more independent (X) variables. NCSS has regression procedures for many differentsituations.

Running a regression analysisIn this section, you will conduct a regression analysis using the MAMMALS1 database. To begin, startNCSS and load the MAMMALS1 database. Detailed instructions for doing this are at the beginning ofChapter 3.

In this examplewe will investigatethe relationshipbetweenBrain_Weight(dependentvariable) andBody_Weight(independentvariable).

Page 41: Quick Start Ncss 2004

36 Regression Analysis

Creating a scatter plotThe first step in a regression analysis is to plotthe data.

1 From the Graphics menu, select ScatterPlots.

The Scatter Plot window will appear.

2 Click in the Horizontal Variable(s) box.

3 Enter Body_Weight.

4 Click in the Vertical Variable(s) box.

5 Enter Brain_Weight.

6 Click the Run button on the toolbar.

The scatter plot shown at the right willappear. In order for regression analysis tobe applied, the points in the plot should fallalong an imaginary straight line.

While studying the plot, notice that all buttwo of the point are clustered in the lowerleft-hand corner. You cannot tell whetherthe points fall along a straight line. Thissuggests that a logarithmic scale should beused to display the data. This will be donenext.

Page 42: Quick Start Ncss 2004

Chapter 6 Regression Analysis 37

7 Press the Horizontal tab to displaythe Horizontal panel.

8 Select Yes: Numbers from the LogScale pull-down list box.

9 Press the Vertical tab to display theVertical panel.

10 Select Yes: Numbers from the LogScale pull-down list box.

13 Press the Run button to run theprogram and generate the followingoutput.

Page 43: Quick Start Ncss 2004

38 Regression Analysis

The final result is the plot at the right.Notice that the points now appear to beevenly spread across the plot. Also notethat the points appear to fall along animaginary, upward-sloping straight line.This implies that a standard regressionanalysis should produce a reasonable modelof this data.

Because of the logarithmic scale, our nexttask will be to create logarithmic versions ofthe two variables.

Create the logarithmic variables1 Press the Data Window button on the

toolbar to bring the NCSS Datawindow to the front of your screen.

This will bring up the NCSS Datawindow.

2 Click on the Variable Info tab.

This will bring up the Variable Infoscreen.

3 In the sixth row of the Transformationcolumn enter Log(Body_Weight).

4 In the seventh row of theTransformation column enterLog(Brain_Weight).

5 In the sixth row of the Name columnenter LogBody.

6 In the seventh row of the Namecolumn enter LogBrain.

Page 44: Quick Start Ncss 2004

Chapter 6 Regression Analysis 39

7 Click on the Apply Transformationsbutton to create the tranformed data.

8 Click on the Sheet1 tab to return to yourdata. The datasheet will now appear as shown.

Run the regression1 Select Multiple Regression from the

Regression/Correlation submenu of theAnalysis menu.

Page 45: Quick Start Ncss 2004

40 Regression Analysis

2 Click on the Template tab.

This screen provides a list of previouslystored templates. Loading one of thesetemplates saves you from having to setthe options individually each time yourun an analysis. The STANDARDtemplate provides a set of commonlyused reports.

3 Select Standard and press the LoadTemplate button.

The final step is to select the variablesthat are being analyzed.

4 Click on the Variables tab.

5 Enter LogBrain for the Y:DependentVariable.

6 Enter LogBody for theX’s:Independent Variables.

7 Click the Run button on the toolbar.

This will generate the following output.

Page 46: Quick Start Ncss 2004

Chapter 6 Regression Analysis 41

The main statisticsof interest in aregression analysisare the regressioncoefficients and R-Squared. These areshown in theRegression EquationSection.

RegressionCoefficients

R-Squared

Scroll down to viewthe diagnostic plots.

Page 47: Quick Start Ncss 2004

42 Regression Analysis

Of course, a complete regression analysis would require the studying of several reports and plots. Acomplete discussion of this is found in the multiple regression chapter of the User’s Guide.

Page 48: Quick Start Ncss 2004

43

CHAPTER 7

Data WindowAbout this chapterData may be entered manually or imported from other files. The data are loaded in a spreadsheet fromwhich they may be viewed, changed, stored, or printed. This chapter will show you how to manipulateyour data using the spreadsheet.

Loading a databaseThe tutorial in Chapter 2 explained the mechanics of entering, storing, and printing a database, so thatmaterial will not be repeated here. Instead, this chapter will focus on manipulating the data with thespreadsheet after it has been loaded. Our first task will be to load in a previously saved database.

If NCSS is not already running, start it now by selecting NCSS from the Windows Start menu (refer tothe beginning of Chapter 2 for details). We will use the brain weight data that was entered in Chapter 2.These data are stored in the MAMMALS database in the \NCSS97\DATA subdirectory. To begin thistutorial, take the following steps to load the MAMMALS database.

2 Double click the Datasubdirectory to select it.

1 Select Open from the Filemenu of the Data window.

The File Open window willappear.

Page 49: Quick Start Ncss 2004

44 Data Window

3 Double click mammals.s0 in thelist of available files.

4 Click the Open button.

This will load the MAMMALSdatabase into the Data window.

The Data window will appear asshown to the right.

Page 50: Quick Start Ncss 2004

Chapter 7 Data Window 45

Copying and pasting dataWe will now take you through the steps to copy and paste the data.

1 Position the cursor in row onecolumn three (at the value5712).

2 Drag the mouse down to rowsix. This will select the first sixrows.

3 Press Ctrl-C. This will copy thedata to a temporary storagearea called the clipboard.

4 Position the cursor in the cell atrow one and column four.

5 Press Ctrl-V to paste the datafrom the clipboard. The resultingscreen will appear as shown.

Page 51: Quick Start Ncss 2004

46 Data Window

Changing column widthsOccasionally, you will want to change the width of one or more columns. This section will show youhow this is accomplished. We will resize the columns headed Body_Weight and Brain_Weight.

1 Click on the column heading:Body_Weight.

2 Drag the mouse into the nextcolumn to the right and let go of themouse button. This will select thesetwo columns.

3 Move the cursor between the thirdand fourth columns. The cursor willchange into a double-pointingarrow.

4 While holding down on the mousebutton, drag it to the left until youare almost to the next cell border.

5 Let go of the mouse button.

The resulting display will appearlike this.

6 Reverse this process to resetthese columns to their originalwidth.

Page 52: Quick Start Ncss 2004

47

CHAPTER 8

Procedure WindowAbout this chapterAll NCSS procedures (e.g., t-test, multiple regression, or scatterplot) are controlled by a procedurewindow. The Procedure window contains all the settings, options, and parameters that control aparticular procedure. These options are separated into groups called panels. A particular panel is viewedby pressing the corresponding panel tab that appears just below the toolbar near the top of the window.

The current values of all options available for a procedure are referred to as a template. By creating andsaving template files, you can tailor each procedure to your own specific needs.

Below is a picture of the Descriptive Statistics template. This chapter presents a brief tutorial of how tooperate the Procedure window.

Navigating a procedure windowThis section will show you how to move around a procedure window. The window is made up of twoor more panels (in this example there are five panels: Variables, Reports, Prob Plot, Histogram, andTemplate). You control a procedure by changing the settings on each of these panels. Hence, navigatinga procedure window simply means that you move from panel to panel.

1 From the Analysis menu,select Descriptive Statistics,then Descriptive Stats.

The Descriptive Statisticsprocedure window willappear.

2 Press the Prob Plot tab todisplay the Prob Plot panel.

Page 53: Quick Start Ncss 2004

48 Procedure Window

3 Press the Variables tab toredisplay the Variables tab.

Notice that many of the optionboxes have small buttons on theirright. These buttons may be usedto activate a separate inputwindow. For example, if you pressthe button to the right of theVariables box, the VariableSelection window will appear. Thiswindow will help you select thevariables to be used.

Page 54: Quick Start Ncss 2004

Chapter 8 Procedure Window 49

Changing an optionSuppose you want to change theExponent option from None to 3.

1 Press the drop-down button onthe right of the Exponent box.

This will activate the drop-downmenu.

2 Move the scroll bar thumb downuntil the 3.0 appears.

3 Move the cursor down so thatthe 3.0 is highlighted.

4 Select the 3.0 by clicking it (orby pressing the Enter key whilethe 3.0 is highlighted).

Another way to change thisoption is to select it and press 3.The program searches throughthe options for the first item thatbegins with a 3.

Page 55: Quick Start Ncss 2004

50 Procedure Window

Notes on modifying optionsMany of the option boxes have alternative methods of entering data. For example, when you need toselect a variable, you can type the variable name directly in the box or you can double click on the boxto bring up a variable selection window.

Entering textWhen an option needs text (such asthe title of a graph), type the textdirectly into the box. Note that whileyou are typing, if you decide to revertback to the original text, you can hitthe Escape (Esc) key.

Selecting variablesWhen you need to specify variables,you can type their names directly intothe box, you can enter their numbersdirectly into the box, or you canactivate the variable selectionwindow.

1 Double click in the Variablesbox.

This will display the variable selectionwindow. You can select the variablesof interest and press the Ok buttonwhen you are finished.

Press the Ctrl key when you want toselect several, noncontiguous,variables.

As you select variables in the VariableSelection List box, they will appear inthe Variables Selected box at thebottom.

It may be convenient to specifyvariables by number rather than byname. For example, when you usenumbers, you can use the samesettings on several databases, eventhough the variables have differentnames.

Page 56: Quick Start Ncss 2004

Chapter 8 Procedure Window 51

Saving a templateOnce you have filled out a procedure, you may want to save your choices so that you do not have toreset them again the next time you use the procedure. This is accomplished using the Template panel.

In this example, we will save the current settings to a file called TUTOR1.

1 Press the Template tab todisplay the Template panel.

2 Enter Tutor1 in the FileName box. This is the namewhere the template is stored.

3 Enter an identifying phrasein the Template Id box at thebottom of the screen.

4 Press the Save Templatebutton to store the templatefile.

Note that when you supply the template file name, you do not enter a three-character extension. NCSSadds the appropriate extension. This extension may be determined by looking at the TemplateDirectory. In our example, the extension is the number 24.

You should also note that you can delete these files using your Windows Explorer program.

Page 57: Quick Start Ncss 2004

52 Procedure Window

Loading a template fileIn this example, we will load the previously saved Tutor1 template file.

1 Select TUTOR1 from theavailable template files.

2 Press the Load Template button.

The settings are reset to howthey were when Tutor1 wassaved.

The default templateWhenever you close a procedure window, the current settings are saved in a template file namedDefault. When a procedure is loaded, NCSS checks to determine if the template file Default exists. Ifsuch a file exists, it is automatically loaded after the procedure window is loaded. Hence, the currentsettings of each procedure window are preserved between sessions. Because of this, you should avoidusing Default as a template file name.

Page 58: Quick Start Ncss 2004

53

CHAPTER 9

Output WindowAbout this chapterNCSS sends all statistics and graphics output to its built-in word processor from where they can beviewed, edited, printed, or saved. Reports and graphs are saved in rich text format (RTF). Since RTF isa standard Windows document transfer format, these files may be loaded directly into your wordprocessor for further processing. You can also cut data from the report and paste it into an NCSSdatasheet for further analysis. This chapter covers the basics of our built-in word processor.

This chapter will continue the analysis of the brain weight data that was begun in Chapter 3. If you havenot already done so, run the Descriptive Statistics reports as described in Chapter 4. Our analysis herewill pick up where that chapter ended.

Viewing the outputThe output of the Descriptive Statistics program is shown below. Usually, you will find it useful to putthe output window into full-screen mode.

1 Double click on the Output title bar.

This will put the word processorinto full-screen mode.

2 Double click on the document titlebar.

This will put the document in full-screen mode also.

Page 59: Quick Start Ncss 2004

54 Output Window

The screen will looksimilar to this. Notethat the actual sizeof your screendepends on theresolution of yourmonitor, so it willvary.

3 Select Show Allfrom the Viewmenu.

The screen will looksimilar to this.

Notice the standardword processingruler, tab bar, andbutton bar. Thesewill aid you inediting yourdocument.

Page 60: Quick Start Ncss 2004

Chapter 9 Output Window 55

We will now show you a quickway to move about a lengthydocument such as the current one.

1 Select Goto Section from theEdit menu.

This will load the Topic Searchwindow.

2 Select Skewness andKurtosis Section.

3 Press Ok.

This will position thereport so that thedesired section title isshowing.

At this point, youwould scroll down through your output, perusing the results. Once you determine that you want toretain your results, you have four choices:

1 Print the document.

2 Save the document to a file.

3 Add the document to the log. (The log holds the output from several analyses in one file.)

4 Copy the report to a temporary holding area (the Windows clipboard) and paste it into anotherapplication.

Note that you cannot just leave the output in the current window if you want to keep it because it willbe replaced by the next analysis that you run.

Page 61: Quick Start Ncss 2004

56 Output Window

Printing the outputBefore printing the report, you should scroll through it to determine if there are any portions that youwant to delete before printing. To print the report, take the following steps.

1 Select Print fromthe File menu.

This will bring upthe Print Dialogbox.

2 Click Ok to beginprinting yourreport.

Note that thisdialog box mayappear different indifferent versionsof Windows.However, thebasic functionalitywill be the same.

Page 62: Quick Start Ncss 2004

Chapter 9 Output Window 57

Saving the output to a fileYou can save the output to a file. The report is saved in rich text format (RTF) which is a standarddocument interchange format. This format may be read into commercial word processors such as Wordand Word Perfect. This will allow you to export the reports to your favorite word processor.

Take the following steps to save the output to a file.

1 Select Save As fromthe File menu.

This will bring upthe Save File Asdialog box. Note thatthis dialog box maylook different inWindows 95, but thebasic functionalitywill be the same.

2 Enter a file namesuch asmyreport.rtf.

Note that the filename must end withthe extension “rtf.”

3 Click Save to saveyour report.

Page 63: Quick Start Ncss 2004

58 Output Window

Saving the output to the log documentAn analysis of a set of data usually requires the running of several statistical procedures. The logdocument provides a convenient way to store the output from several procedures together in one file.When you have a report or graph that you want to keep, copy it from the output document to the logdocument.

The log document provides four main word processing functions: loading, editing, printing, and saving.When you load a file into the log document, you can add new output to it. In this way, you can recordyour work on a project in a single file, even though your work on that project is spread out over severaldays.

Take the following steps to add the current output to the log document.

1 Select Add Output toLog from the Filemenu.

This will copy thecurrent document tothe log file.

To view the logdocument, select Logfrom the Windowmenu.

The log document resides in memory until you store it. To store the log document, take the followingsteps:1 Select Log from the Window menu so that the log document is active.

2 Select Save As from the File menu and complete the Save File As dialog.

Warning: The log document is not automatically stored. You must store the contents of the logdocument to a file before exiting NCSS.

Page 64: Quick Start Ncss 2004

59

CHAPTER 10

FiltersAbout this chapterThis chapter explains how to use filters to limit which rows (observations) are used by a particularprocedure and which are skipped. For example, you might want to limit an analysis to those weighingover 200 pounds. You would use a filter to accomplish this.

Setting up a filterUsing the MAMMALS database (see Chapter 3), we will setup up a filter so that only those animalswith a body weight greater than 200 kilograms are used in the statistical calculations.

If the MAMMALS database is not currently loaded, select Open from the File menu, move to the\NCSS97\DATA subdirectory, and double click on the file MAMMALS.S0. Your display should appearas follows.

1 Select Filter from the Data menu.

This brings up the Filter template.

2 Check the Filter System Active box.

Page 65: Quick Start Ncss 2004

60 Filters

3 Enter the filter condition,Body_Weight>200, in the FilterStatements box.

4 Press the Run button toactivate the filter.

5 The Filter activated box will be displayed. Press OK.

The filter is now setup. Notice thatthe Filter button on the both theData and Filter toolbars has nowchanged to a green funnel with theword On below it. This is a reminderthat the filter system is active.

Page 66: Quick Start Ncss 2004

Chapter 10 Filters 61

We will now show you how to use it in a procedure by obtaining the mean and standard deviation of thefiltered database.

8 Press the Descriptive Statisticsbutton on the toolbar.

9 Enter Body_Weight in the Variablesbox.

10 Check the Filter Active box. Thisindicates that you want to use thecurrently defined filter with thisanalysis.

11 Press the Run button to run theprocedure.

Page 67: Quick Start Ncss 2004

62 Filters

12 Finally, view the output.

Notice that although fifteen rows were processed, only six rows were actually used in the computations.

Disabling the filterWhen you are finished using a filter, you can bring up the Filter procedure window, click the FilterSystem Active button so that it is not checked, and press the Run button to run the filter procedure.This will deactivate the filter.

Page 68: Quick Start Ncss 2004

63

CHAPTER 11

WritingTransformationsAbout this chapterThe basics of entering transformations were covered in Chapter 3. This chapter gives examples of howto write more advanced transformations.

RecodingBackgroundData recoding refers to replacing one set of values with another. For example, suppose you have eachindividual’s age stored in a variable called AGE. Suppose that you want to create a new variable calledAGEGROUP that classifies each individual into one of four age groups according to the following rule:

AGE Values AGEGROUP Value1 to 12 113 to 19 220 to 29 330 and above 4

Example of recodeRECODE(Age; (1:12 = 1) (13:19 = 2) (20:29 = 3) (Else = 4))

Notice the basic syntax of this function. The variable being recoding is given first (here Age). Next, a setof statements that define the recoding are given.

Example result

Page 69: Quick Start Ncss 2004

64 Writing Transformations

Basic indicatorBackgroundIndicator transformations are used in logic (if - then) situations. An indicator function evaluates to one ifthe condition is true or to zero if the condition is false. The basic syntax is two arguments betweenparentheses separated by a logic operator. The possible logic operators are <, >, <=, >=, <>, and =.

Example indicator(AGE > 20)

If AGE is greater than 20, the result will be a one. Otherwise, the result will be a zero.

Example Result

Compound indicatorsBackgroundSince indicator functions evaluate to a numeric value (either 0 or 1), they may be combined with otherfunctions--including other indicator functions. When combining several indicators, the logical AND isachieved by multiplying the indicators and the logical OR is achieved by adding.

Example of compound indicators(AGE > 20)*(AGE<=40)

If age is greater than 20 and less than or equal to 40, the result will be a one. Otherwise, the result willbe a zero.

Example results

Using

Page 70: Quick Start Ncss 2004

Chapter 11 Writing Transformations 65

indicators for if - thenBackgroundIndicator functions may be used in place of if - then statements. The following examples show how thisis done.

Example 1If Age is less than 20 set AdjIncome to 5000. Otherwise, set AdjIncome equal to Income.

Example 1 transformation(Age < 20)*5000+(Age>=20)*Income

Note that the indicator functions used here are opposites. When (Age<20) is 0, (Age>=0) will be 1.

Example 1 results

It may be helpful to look at how this expression works on the first two rows.

Calculation for the first row:

(23<20)*5000+(23>=20)*22000 = 0(5000) + 1(22000) = 22000

Calculation for the second row:

(15<20)*5000+(15>=20)*22000 = 1(5000) + 0(5500) = 5000

Page 71: Quick Start Ncss 2004

66 Writing Transformations

Example 2If Age is less than 20 set AdjIncome equal to Income + 1000. Otherwise, set AdjIncome to Income +2000.

Example 2 transformation(Age < 20)*(Income+1000)+(Age>=20)*(Income+2000)

Example 2 results

It may be helpful to look at how this expression works on the first two rows.

Calculation for the first row:

(23<20)*(22000+1000)+(23>=20)*(22000+2000) = 0(23000) + 1(24000) = 24000

Calculation for the second row:

(15<20)*(5500+1000)+(15>=20)*(5500+2000) = 1(6500) + 0(7500) = 6500

Page 72: Quick Start Ncss 2004

67

CHAPTER 12

Importing DataAbout this chapterThis chapter presents an example of importing data from a comma delimited ASCII (text) file intoNCSS.

The ASCII fileFollowing is a set of data contained in the file ASCII.TXT in your \NCSS97\DATA subdirectory. Wewill now go through the steps necessary to import the data from this file.

Bob,2,4,22,5Judy,5,44,22,4Sam,1,32,42,9Mary,4,1,22,23John,19,22,44,1Linda,3,11,2,14

How to import ASCII.TXT1 Press the New Database

button on the toolbar.

It is necessary to clear theprevious database.Otherwise, the imported datawould be added to it.

A dialog box, entitled Createa New Data File, will appear.

2 Indicate that you want aSpreadsheet-type data filesince this is a small set ofdata.

Since this is the default, justclick Ok.

Page 73: Quick Start Ncss 2004

68 Importing Data

3 Select Import from the Filemenu.

4 Select ASCII Delimited *.TXTfrom the Select the File Typeselection box.

5 Press the Select a File toImport button to specify the filename.

Page 74: Quick Start Ncss 2004

Chapter 12 Importing Data 69

6 Click on the Ascii.txt in the Datadirectory to specify the desiredfile.

7 Press the Open button to finishselecting the file.

8 Press the Next button to move onto the next import screen.

9 Since the correct delimiter (acomma) is specified, you areready to finish. Click the Finishbutton to begin the import.

Page 75: Quick Start Ncss 2004

70 Importing Data

The imported data will appear in the Data window.

Note that the imported database resides in your computer’s memory, not on the hard disk. If you wantto make a permanent copy of your data, you should select Save As from the File menu and save acopy of the imported data to your hard disk.

Page 76: Quick Start Ncss 2004

71

CHAPTER 13

Value LabelsAbout this chapterValue Labels provide a mechanism to attach labels to coded data. For example, in a questionnaire youmight have questions whose responses fall along a Likert scale. Perhaps you have entered the data asnumeric values from 1 to 5. Value labels may be attached to the responses so that the 1 shows up onyour printout as “Strongly Agree” and 5 is displayed as “Strongly Disagree.”

This chapter will provide you with a step by step outline of how to use value labels. The data for thisexample come from a four-item questionnaire that was given to twenty people as part of a political poll.The first three questions contain demographic information about the individual. The fourth question istheir opinion about a hot political issue. You will find these data in the POLITIC database. The datawere coded numerically for easy data entry as follows:

POLITIC DatabaseAgeGroup

1 = 25 and under2 = 26 to 343 = 35 to 554 = 56 and above

State1 = California2 = Virginia3 = Texas4 = Other

Party1 = Democrat2 = Republican3 = Other

Issue1 = Strongly agree2 = Agree3 = Neutral4 = Disagree5 = Strongly disagree

Page 77: Quick Start Ncss 2004

72 Value Labels

Adding the value labelsThe next step is to add the value labels to the database. This is done by entering the values andcorresponding labels in adjacent columns of the database. Leaving space for additional responsevariables, we put the value labels in columns 15 through 22. C15 contains the values of AgeGroup, C17contains the values of State, and so on.

Note that we have resized the column widths to make the display easier to read (C15, C17, C19, andC21 are narrower than usual).

Although in this example we are constructing value labels for each variable, you do not have to do this.You can label as many or as few variables as you like.

Attaching the value labels to the variablesThe final step is to attach the value-label columns to the appropriate variables. This is accomplished asfollows:

1 Click the Variable Info tab.

2 Use the vertical scroll baror the Page Up key toreposition the view to thetop of the Variable Infodatasheet.

3 Click in the first cell underValue Labels to set thespreadsheet cursor there.

Page 78: Quick Start Ncss 2004

Chapter 13 Value Labels 73

4 Type C15.Press Enter.Type C17.Press Enter.Type C19.Press Enter.Type C21.Press Enter.

This attaches each valuelabel column to theapproriate variable.Note that you may usethe value label morethan once.

Using the value labels in a reportWe will now show you how the value labels change the output of the Frequency Table procedure.

1 Select FrequencyTables from theDescriptiveStatistics menu.

Page 79: Quick Start Ncss 2004

74 Value Labels

2 Enter AgeGroup-Issue asthe Discrete Variables.

3 Run the procedure bypressing the Run button.

The output appears asshown.

Notice that the value labelshave not been used.

Page 80: Quick Start Ncss 2004

Chapter 13 Value Labels 75

4 Select Format tab todisplay the Format panel.

5 Select Both in the ValueLabels box.

6 Run the analysis again bypressing the Run button.

The output window appears as shown.

Note that the valuelabels are nowdisplayed.

Page 81: Quick Start Ncss 2004

76 Value Labels

Page 82: Quick Start Ncss 2004

77

CHAPTER 14

Database SubsetsAbout this chapterIt is often useful to store all of your data in one large database and then analyze various subsets of thedatabase as necessary. This can often be accomplished using the Filter mechanism. Sometimes you willfind it more convenient to create a subset of the original database that only contains those rows that youwant to analyze.

This chapter will take you through the steps necessary to create a subset of the POLITIC database(described in Chapter 13) which contains those individuals with AgeGroup equal to 2 (26 to 34).

If you have not already done so, please open the POLITIC database now by selecting Open from theFile menu of the Data window.

Step 1 - Sort the databaseThe first step is to sort the POLITIC database by the variable (or variables) that you want to subset on.This is done as follows.

1 Select Sort from the Datamenu.

Page 83: Quick Start Ncss 2004

78 Database Subsets

2 Select AgeGroup as thevariable to sort the databaseby. This may be done byusing the drop-down menuor by double clicking.

3 Click Ok to sort thedatabase by the selectedvariable.

Step 2 - Copysubset into new databaseThe next step is copy the selected data from the POLITIC database to the new database (which will benamed POLITIC2).

The database will be sorted byAgegroup.

1 Select the desired subset bydragging the mouse from row 5 ofcolumn 1 (AgeGroup) to row 11 ofcolumn 4 (Issue). Your selectionshould appear as shown.

2 Press Ctrl-C to copy the selecteddata to the Windows clipboard (theclipboard is the name of temporaryholding area used by Windows tostore information that has been cutor copied).

3 Select New from the File menu tocreate the subset database.

Page 84: Quick Start Ncss 2004

Chapter 14 Database Subsets 79

4 Select No from themessage box thatappears and asks if you want to savechanges.

It is important not to save the sorted database because the value labels have also been sorted--somethingwe do not want.

5 Click Ok to create aspreadsheet typedatabase.

6 Position the cursor inthe upper left cell ofthe new database byclicking in it.

7 Press Ctrl-V to pastethe clipboard data intothe new database.

Page 85: Quick Start Ncss 2004

80 Database Subsets

8 Select Save As from theFile menu to name andsave this new database.

9 Enter politic2.s0 as thename of the newdatabase.

Click Save.

Step 3 - Copy variable info to new databaseThe next step is to copy the variable information datasheet to the new database.

1 Open the POLITICdatabase by selecting itfrom the File menu.

Page 86: Quick Start Ncss 2004

Chapter 14 Database Subsets 81

2 Click on the Variable Infotab to move to theVariable Info datasheet.

3 Select the information tobe copied by dragging themouse across it.

4 Press Ctrl-C to copy theinformation to theclipboard.

5 Open POLITIC2.S0 byselecting it from the Filemenu.

6 Move to the Variable Infodatasheet by clicking theVariable Info tab.

Page 87: Quick Start Ncss 2004

82 Database Subsets

7 Position the cell cursor overthe cell containing C1.

8 Press Ctrl-V to paste the labelinformation into the subsetdatabase.

The result will appear asshown.

Step 4 - Copy value labels to the new databaseThe final step is to copy the value labels from the old database to the subset database.

1 Open the POLITIC.S0database by selecting itfrom the File menu.

2 Select Yes to save thechanges that youhave just made tothe POLITIC2database.

Page 88: Quick Start Ncss 2004

Chapter 14 Database Subsets 83

3 Enter politic2.s0 in the File Namefield of the Save File As dialogbox.

Click the Save button.

When asked, indicate that youwant to replace the previousversion of this file.

4 Reposition the datasheet so thatthe first column is C15. Drag the mouse across and down so that all of the value labels are selectedas shown below.

5 Press Ctrl-C to copy the selected information to the clipboard.

6 Open the POLITIC2.S0database by selecting itfrom the File menu.

Page 89: Quick Start Ncss 2004

84 Database Subsets

7 Reposition the datasheet so that variable C15 is at the left.

8 Click in the first row of variable C15 so that this is the active cell.

9 Press Ctrl-V to copy the information. The final result should appear as below.

10 Select Save from the File menu to save the database before you forget.

That’s it. Let’s briefly review the steps:

1 Sort the database by the variables on which you want to subset.

2 Copy the subset data to a new database.

3 Copy the variable info from the old database to the subset database.

4 Copy value label information from the old database to the subset database (if it exists).

Page 90: Quick Start Ncss 2004

85

CHAPTER 15

SimulationAbout this chapterThere are many situations in which you want to generate data that follow a known distribution. Forexample, you may want to generate 100 uniform random numbers as an aid in selecting a randomsample or you may want to generate five columns of normal random numbers to experiment with aparticular statistical test. This chapter will show you how to use transformations to generate simulateddata.

NCSS directly generates two types of random numbers: uniform and normal. Other types of randomnumbers may be generated by using their inverse probability function on a set of uniform randomnumbers.

Generating uniform random numbersIn this tutorial you will generate 100 uniform random numbers.

You should begin this tutorial with an empty database. If your database is not empty, follow theinstructions on page 14 to clear it.

1 Move to the Variable Infodatasheet by clicking theVariable Info tab.

Page 91: Quick Start Ncss 2004

86 Simulation

2 Enter 100 in the Number ofRows box.

This specifies the number ofrows to be generated.

3 Enter Uniform(3) as thetransformation for variable C1.

Note that the “3” in theparenthesis is ignored. Theprogram generates a random“seed” so that a different set ofrandom numbers will be usedeach time you recalculate thespreadsheet.

4 Press the Apply Transformation button to generate the random numbers.

5 Click the Sheet1 tab to view the data.

The data will appear as shown.However, the numbersthemselves will be differentsince each recalculation uses adifferent starting seed.

6 Press the ApplyTransformation button a fewmore times to generate newsets of random numbers.

Page 92: Quick Start Ncss 2004

Chapter 15 Simulation 87

Simulating the t-test with n = 5We will now run a simulation in which we generate 100 one sample t-test values with a sample size offive. Four of the values will come from a normal distribution with mean 50 and standard deviation 2.The fifth value will come from a normal distribution with mean 50 and standard deviation 15. The t-testwill test the null hypothesis that the population mean of the sample is 50.

It will be interesting to study the distribution of these t-values since the t-test makes the assumption thatall five data values follow identical distributions. This simulation will allow us to study the distortion thatoccurs when this assumption is not met.

1 Enter 100 for the number ofrows.

2 Enter the new variable names.

3 Enter the transformations.Notice that we multiply therandom normal by thestandard deviation (2 or 15)and then add the mean (50).

4 Enter 0.0000 as the format foreach of the variables. This willmake the data much easier toread.

5 Move to the empty spreadsheet by clicking Sheet1.

Page 93: Quick Start Ncss 2004

88 Simulation

6 Click the ApplyTransformation buttonto generate thesimulated data. Yourresults will be similar toours.

Note that if you havemade an error inentering thetransformationformulas, you will haveto go back to theVariable Info datasheetto make corrections.

There are many ways to analyze the results. One of the easiest is to sort the Tvalue column and countthe number of rows whose values are outside the theoretical bounds. If these data had come from anormal distribution with a mean of 50 and a standard deviation of 2, you can use the ProbabilityCalculator to determine the theoretical cut off values. The two-tail critical value for a t distribution withfour degrees of freedom and alpha = 0.05 is 2.78. Hence, you would expect that five of the onehundred values would be less than -2.78 or greater than 2.78.

Here’s how to sort the data:

4 Scroll from through your data, counting how many values are less than -2.78 or greater than 2.78.

In our case only one row is outside the range. We repeated this simulation several times and neverfound more than three values outside the range, much less than the five values that the null hypothesispredicted.

1 Select Sort from the Datamenu. This will bring upthe Sort window.

2 Select Tvalue as the sortvariable.

3 Click Ok to perform thesort.

Page 94: Quick Start Ncss 2004

89

CHAPTER 16

Cross Tabs onSummarized DataAbout this chapterThis chapter presents an example of how to enter and analyze a contingency table that has already beensummarized.

Sample DataThe following data are the results of a study that tested the impact of three drugs on a certain disease.

Drug

Disease Type 1 Type 2 Type 3Yes 15 28 44No 4 7 9

These data are entered into an NCSS database as follows.

Notice that we have created three variables:

1 One containing the columnidentification number (Drug).

2 One containing the row identificationnumber (Disease).

3 One containing the counts (Count).

Page 95: Quick Start Ncss 2004

90 Cross Tabs on Summary Data

Filling out the Cross Tabulation windowThe next step would be to fill out the Cross Tabulation window. This is done as follows.

1 Choose Cross Tabulation from the Descriptive Statistics submenu of the Analysis menu. This willload the Cross Tabulationwindow.

2 Enter Drug in the DiscreteVariables box under TableColumns heading.

3 Enter Disease in the DiscreteVariables box under TableRows heading.

4 Enter Count in the FrequencyVariable box.

5 Press the Run button to run theanalysis.

The final result will appear as follows.

Page 96: Quick Start Ncss 2004

91

Index—B—Brain Weight Data, 6

—C—Clipboard, 45Column width

changing, 9,46Copying data, 45Cross tabulation

summarized data, 89

—D—Data

entering, 5importing, 67printing, 11saving, 10

Data window, 15, 43Database

clearing, 14creating, 5loading, 43printing, 11s0 and s1 files, 11s0-type, 14subsets, 77ZDB-type, 14

Defaultstemplate, 52

Descriptive statistics, 25

—E—Esc key, 7

—F—Filter, 59Format

changing the data, 20

—H—Histogram, 28

—I—Importing data, 67Indicator transformation, 64

—L—Log document, 58Log Scale, 37Logarithmic transformation, 39

—M—MAMMALS data, 25MAMMALS database

loading, 17MAMMALS1 database, 31

—O—Output

printing, 56saving, 57viewing, 53

Output window, 15, 53

—P—Pasting data, 45Printing

data, 11output reports, 30

—R—Random numbers

normal, 87uniform, 85

Recalculate Sheet, 22Recode transformation, 23,63Regression analysis, 35Rich text format, 57RTF, 57Run Procedure, 27

—S—Saving

data, 10output, 57template, 51

Scatter plot, 36SETTINGS.ZIP, 51Simulation

data, 85Starting NCSS, 3, 5

Subset of a database, 77

—T—Technical support, 4Template

changing options on, 49default settings, 52entering text, 50loading, 41,52navigating, 47saving, 51selecting a variable, 50selecting variables, 50window, 47

Template window, 15Text

entering, 50, 52Topic Search, 55Transformations, 17

if-then, 64indicator, 64logarithmic, 39percentage example, 19recoding, 23,63simulation, 85

T-testsimulation of, 87

Two-sample t-test, 31

—V—Value labels, 71Variable Info, 8Variables

names, 8,10selecting, 26, 50

—W—Window

Data, 43Template, 47

Window menu, 16Windows

navigating, 15Word processor, 53