 Purpose of SCalc

This Windows program is designed to accompany Peter Tryfos, Sampling for Applied Research: Text and Cases, John Wiley & Sons, 1996. Its objective is to assist the calculation of complicated expressions for the examples, exercises and cases of the text. Please refer to this text for additional information regarding the terminology and formulas used.

Windows SCalc replaces a DOS program of the same name that is included in the diskette attached to the text.

The functionality of the two programs is same. There are two main differences:

1. Windows SCalc has a better graphical interface. Menus and dialogs guide the user to make the desired selections and provide the required information.

2. The input data for and the results of all calculations are now stored in a journal-style document, which can be scrolled, printed, or saved in a file for future reference.


Examples of using SCalc
The use of the program is straightforward. The following illustrations show how to verify the calculations of Examples 3.1 and 3.3, and Section 3.4 (the same examples are used in the text to demonstrate the use of the DOS version of SCalc (see Appendix C, pp. 428-31).

Example 3.1: Click on the Select Approach menu. Then from the unfolding cascading menus, select the Random sampling approach, the Simple method, the Proportion/number in category target, the Sample size objective, and the Simple estimator. The following dialog will appear.

Fill in the input boxes as shown above. Press OK.

The results of the calculations will appear in the main SCalc window, as follows:

Example 3.3  From the Select approach menu, click on the Random sampling approach, then on the Simple method, the Mean/total of variable target, the Interval estimate objective and the Simple estimator. The following dialog will appear:

Input the required information as shown above, then press OK. The results will be added to the previous ones in the main window of SCalc as follows:

Section 3.4: Select the Random sampling approach, the Simple method, the Mean/total of variable target, the Th.Std.Dev. of estimator objective, and the Simple method. The following dialog will appear and should be filled in as shown:

Click on OK. The following results are added to the journal (document):

The document may now be printed, saved, or processed by the other commands of the File menu.


Menus

Select approach

File menu

View menu

Help menu


Avoiding Input Errors

Like its DOS version, SCalc expects correct input. Minor input errors may be corrected by repeating the calculation. More serious errors may cause the program to crash. In this case, restart the program and reenter the data.

Do not include commas (for example, enter 3000, not 3,000), or special characters or letters when entering numbers (for example, do not enter 300O). Make sure the sample does not exceed the population size when sampling without replacement. Standard deviations cannot be negative. Check that all the required information is entered.


Select approach
Select approach, method or model, target population characteristic, objective of calculations, and estimator. Bear in mind that not all combinations of these selection elements are feasible.

Approach

Method

Model

Target

Objective

Estimator


Sampling method
Under the random sampling approach, the sampling methods are

•	Simple (Chapter 3)

•	Stratified (Chapter 4)

•	Cluster (Chapter 5)

•	Two-stage (Chapter5)

•	Unequal probabilities, with replacement (Chapter 8)

•	Unequal probabilities, without replacement (Chapter 8)


Approaches
One of two approaches may be selected:

•	Random sampling (Chapters 3 to 8)

•	Prediction (Chapter 9)


Prediction apporach
Under the prediction approach, one of five models (Models A to E, see Chapter 9) may be selected.


Target population characteristics
Target population characteristics are:

•	the population mean or total of a variable

•	the population proportion or number of elements in a category

•	the population ratio of means or totals of two variables (Section 7.2)


Objective of calculations
The objective of calculations may be:

•	point estimates

•	interval estimates (confidence intervals)

•	the theoretical standard deviation (or variance) of the estimator

•	sample size determination

•	optimal percentage allocation of sample to groups (stratified sampling only, Section 4.6)

•	minimum cost allocation (stratified sampling only, Section 4.6)

Not all objectives are feasible for all methods or targets.

It is worth keeping in mind the two stages of any sampling study:

Before a sample is actually taken (the design stage) the principal questions are: By which method should the sample be taken? How large should the sample be (and in stratified sampling, how should it be allocated to the groups)? The theoretical standard deviation or variance of the estimator under different methods and sample sizes may assist answering the first question. Sample size calculations may assist answering the second question.

After the sample is taken (the estimation stage), the principal questions are: How should the population characteristics of interest be estimated? How reliable are these estimates? Point estimation is an answer to the first, and interval estimation one to the second question.


Estimators
For all methods and models except simple random sampling, only one estimator is available (for example, the stratified estimator in stratified sampling, the HTE in sampling with unequal probabilities and without replacement, etc.). Under simple random sampling, the simple, ratio, or regression estimator may be used to estimate the population mean or total of a variable, or the population proportion or number in a category.


File menu commands

The File menu offers the following commands:

New	Creates a new document.
Open	Opens an existing document.
Save	Saves an opened document using the same file name.
Save As	Saves an opened document to a specified file name.
Print	Prints a document.
Print Preview	Displays the document on the screen as it would appear printed.
Print Setup	Selects a printer and printer connection.
Exit	Exits SCalc.


View menu commands

The View menu offers the following commands:

Toolbar	Shows or hides the toolbar.
Status Bar	Shows or hides the status bar.


Help menu commands

The Help menu offers the following commands, which provide you assistance with this application:

Help Topics	Offers you an index to topics on which you can get help.
About	Displays the version number of this application.


File New command
New command (File menu)

Use this command to create a new document in SCalc.

You can open an existing document with the Open command.

Shortcuts

Toolbar:

Keys:	CTRL+N


File Open command
Open command (File menu)

Use this command to open an existing document in a new window.

You can create new documents with the New command.

Shortcuts

Toolbar:

Keys:	CTRL+O


File Open dialog box

The following options allow you to specify which file to open:

File Name

Type or select the filename you want to open.  This box lists files with the extension you select in the List Files of Type box.

List Files of Type

Select the type of file you want to open:

<< List your application's file types here. >>

Drives

Select the drive in which SCalc stores the file that you want to open.

Directories

Select the directory in which SCalc stores the file that you want to open.

Network...

Choose this button to connect to a network location, assigning it a new drive letter.


File Save command
Save command (File menu)

Use this command to save the active document to its current name and directory.  When you save a document for the first time, SCalc displays the Save As dialog box so you can name your document.  If you want to change the name and directory of an existing document before you save it, choose the Save As command.

Shortcuts

Toolbar:

Keys:	CTRL+S


File Save As command
Save As command (File menu)

Use this command to save and name the active document.  SCalc displays the Save As dialog box so you can name your document.

To save a document with its existing name and directory, use the Save command.


File Save As dialog box

The following options allow you to specify the name and location of the file you're about to save:

File Name

Type a new filename to save a document with a different name.  A filename can contain up to eight characters and an extension of up to three characters.  SCalc adds the extension you specify in the Save File As Type box.

Drives

Select the drive in which you want to store the document.

Directories

Select the directory in which you want to store the document.

Network...

Choose this button to connect to a network location, assigning it a new drive letter.


File 1, 2, 3, 4 command
1, 2, 3 command (File menu)

Use the numbers and filenames listed at the bottom of the File menu to open the last four documents you closed.  Choose the number that corresponds with the document you want to open.


File Exit command
Exit command (File menu)

Use this command to end your SCalc session.  SCalc prompts you to save documents with unsaved changes.

Shortcuts

Mouse:	Double-click the application's Control menu button.

Keys:	ALT+F4


View Toolbar command
Toolbar command (View menu)

Use this command to display and hide the Toolbar, which includes buttons for some of the most common commands in SCalc, such as File Open.  A check mark appears next to the menu item when the Toolbar is displayed.

See Toolbar for help on using the toolbar.


Toolbar

The toolbar is displayed across the top of the application window, below the menu bar.  The toolbar provides quick mouse access to many tools used in SCalc,

To hide or display the Toolbar, choose Toolbar from the View menu (ALT, V, T).

Click	To

Open a new document.

Open an existing document.  SCalc displays the Open dialog box, in which you can locate and open the desired file.

Save the active document or template with its current name.  If you have not named the document, SCalc displays the Save As dialog box.

Print the active document.


View Status Bar Command
Status Bar command (View menu)

Use this command to display and hide the Status Bar, which describes the action to be executed by the selected menu item or depressed toolbar button, and keyboard latch state. A check mark appears next to the menu item when the Status Bar is displayed.

See Status Bar for help on using the status bar.


Status Bar

The status bar is displayed at the bottom of the SCalc window.  To display or hide the status bar, use the Status Bar command in the View menu.

The left area of the status bar describes actions of menu items as you use the arrow keys to navigate through menus.  This area similarly shows messages that describe the actions of toolbar buttons as you depress them, before releasing them.  If after viewing the description of the toolbar button command you wish not to execute the command, then release the mouse button while the pointer is off the toolbar button.

The right areas of the status bar indicate which of the following keys are latched down:

Indicator	Description

CAP	The Caps Lock key is latched down.

NUM	The Num Lock key is latched down.

SCRL	The Scroll Lock key is latched down.


Index command (Help menu)

Use this command to display the opening screen of Help.  From the opening screen, you can jump to step-by-step instructions for using SCalc and various types of reference information.

Once you open Help, you can click the Contents button whenever you want to return to the opening screen.


Using Help command (Help menu)

Use this command for instructions about using Help.


About command (Help menu)

Use this command to display the copyright notice and version number of your copy of SCalc.


Help Using Help Command
Context Help command

Use the Context Help command to obtain help on some portion of SCalc.  When you choose the Toolbar's Context Help button, the mouse pointer will change to an arrow and question mark.  Then click somewhere in the SCalc window, such as another Toolbar button.  The Help topic will be shown for the item you clicked.

Shortcut

Keys:	SHIFT+F1


Title Bar

<< Show your application's title bar here. >>

The title bar is located along the top of a window.  It contains the name of the application and document.

To move the window, drag the title bar.  Note: You can also move dialog boxes by dragging their title bars.

A title bar may contain the following elements:

Application Control-menu button

Document Control-menu button

Maximize button

Minimize button

Name of the application

Name of the document

Restore button


Scroll bars

Displayed at the right and bottom edges of the document window.  The scroll boxes inside the scroll bars indicate your vertical and horizontal location in the document.  You can use the mouse to scroll to other parts of the document.

<< Describe the actions of the various parts of the scrollbar, according to how they behave in your application. >>


Size command (System menu)

Use this command to display a four-headed arrow so you can size the active window with the arrow keys.

After the pointer changes to the four-headed arrow:

1.	Press one of the DIRECTION keys (left, right, up, or down arrow key) to move the pointer to the border you want to move.

2.	Press a DIRECTION key to move the border.

3.	Press ENTER when the window is the size you want.

Note:  This command is unavailable if you maximize the window.

Shortcut

Mouse:	Drag the size bars at the corners or edges of the window.


Move command (Control menu)

Use this command to display a four-headed arrow so you can move the active window or dialog box with the arrow keys.

Note:  This command is unavailable if you maximize the window.

Shortcut

Keys:	CTRL+F7


System Minimize Command
Minimize command (application Control menu)

Use this command to reduce the SCalc window to an icon.

Shortcut

Mouse:	Click the minimize icon [image] on the title bar.

Keys:	ALT+F9


Maximize command (System menu)

Use this command to enlarge the active window to fill the available space.

Shortcut

Mouse:	Click the maximize icon [image] on the title bar; or double-click the title bar.

Keys:	CTRL+F10 enlarges a document window.


Next Window command (document Control menu)

Use this command to switch to the next open document window.  SCalc determines which window is next according to the order in which you opened the windows.

Shortcut

Keys:	CTRL+F6


Previous Window command (document Control menu)

Use this command to switch to the previous open document window.  SCalc determines which window is previous according to the order in which you opened the windows.

Shortcut

Keys:	SHIFT+CTRL+F6


Close command (Control menus)

Use this command to close the active window or dialog box.

Double-clicking a Control-menu box is the same as choosing the Close command.

Note:  If you have multiple windows open for a single document, the Close command on the document Control menu closes only one window at a time.  You can close all windows at once with the Close command on the File menu.

Shortcuts

Keys: 	CTRL+F4 closes a document window

ALT+F4 closes the <<YourType>> window or dialog box


Restore command (Control menu)

Use this command to return the active window to its size and position before you chose the Maximize or Minimize command.


Switch to command (application Control menu)

Use this command to display a list of all open applications.  Use this "Task List" to switch to or close an application on the list.

Shortcut

Keys:	CTRL+ESC

Dialog Box Options

When you choose the Switch To command, you will be presented with a dialog box with the following options:

Task List

Select the application you want to switch to or close.

Switch To

Makes the selected application active.

End Task

Closes the selected application.

Cancel

Closes the Task List box.

Cascade

Arranges open applications so they overlap and you can see each title bar.  This option does not affect applications reduced to icons.

Tile

Arranges open applications into windows that do not overlap.  This option does not affect applications reduced to icons.

Arrange Icons

Arranges the icons of all minimized applications across the bottom of the screen.


No Help Available

No help is available for this area of the window.


No Help Available

No help is available for this message box.

<< If you wish to author help specific to each message box prompt, then remove the AFX_HIDP_xxx values from the [ALIAS] section of your .HPJ file, and author a topic for each AFX_HIDP_xxx value.  For example, AFX_HIDP_INVALID_FILENAME is the help topic for the Invalid Filename message box. >>


File Print command
Print command (File menu)

Use this command to print a document.   This command presents a Print dialog box, where you may specify the range of pages to be printed, the number of copies, the destination printer, and other printer setup options.

Shortcuts

Toolbar:

Keys:	CTRL+P


Print dialog box

The following options allow you to specify how the document should be printed:

Printer

This is the active printer and printer connection.  Choose the Setup option to change the printer and printer connection.

Setup

Displays a Print Setup dialog box, so  you can select a printer and printer connection.

Print Range

Specify the pages you want to print:

All	Prints the entire document.
Selection	Prints the currently selected text.
Pages	Prints the range of pages you specify in the From and To boxes.
Copies

Specify the number of copies you want to print for the above page range.

Collate Copies

Prints copies in page number order, instead of separated multiple copies of each page.

Print Quality

Select the quality of the printing.  Generally, lower quality printing takes less time to produce.


Print Progress Dialog

The Printing dialog box is shown during the time that <<YourApp>> is sending output to the printer.  The page number indicates the progress of the printing.

To abort printing, choose Cancel.


File Print Preview command
Print Preview command (File menu)

Use this command to display the active document as it would appear when printed.  When you choose this command, the main window will be replaced with a print preview window in which one or two pages will be displayed in their printed format.  The print preview toolbar offers you options to view either one or two pages at a time; move back and forth through the document; zoom in and out of pages; and initiate a print job.


Print Preview toolbar

The print preview toolbar offers you the following options:

Print

Bring up the print dialog box, to start a print job.

Next Page

Preview the next printed page.

Prev Page

Preview the previous printed page.

One Page / Two Page

Preview one or two printed pages at a time.

Zoom In

Take a closer look at the printed page.

Zoom Out

Take a larger look at the printed page.

Close

Return from print preview to the editing window.


File Print Setup command
Print Setup command (File menu)

Use this command to select a printer and a printer connection.  This command presents a Print Setup dialog box, where you specify the printer and its connection.


Print Setup dialog box

The following options allow you to select the destination printer and its connection.

Printer

Select the printer you want to use.  Choose the Default Printer; or choose the Specific Printer option and select one of the current installed printers shown in the box.  You install printers and configure ports using the Windows Control Panel.

Orientation

Choose Portrait or Landscape.

Paper Size

Select the size of paper that the document is to be printed on.

Paper Source

Some printers offer multiple trays for different paper sources.  Specify the tray here.

Options

Displays a dialog box where you can make additional choices about printing, specific to the type of printer you have selected.

Network...

Choose this button to connect to a network location, assigning it a new drive letter.