The Case Selection Dialog is used to compose a set of criteria to choose specific records from the database. A selection statement is made up of multiple selection lines, each of which specifies a variable and it's required values.
Using the controls described below, create selection statements to define criteria on the Selection tab, groupings in a merged variable, or cause of death in a Survival session.
Selection Construction
The Selection Construction section is composed of lines, groups, and connectors. Each box with text in it is a line. A group is a box which holds multiple line boxes. The connectors indicate how that lines will be combined - "And", "Or", "And Not", "Or Not". All the lines in a section, or in a group, have the same connecting conjunction. The conjunction can be changed by selecting the combo box and picking a new one.
The purpose of these items is to create a new selection statement. As you add or changes lines, you will see the text in Selection Statement section change to reflect the final result. In essence, you are building a text selection statement using graphical elements to represent the relations between lines.
Main Tool Bar
- Delete Items - This command will delete all of the selected items below. Lines or Groups can be selected by clicking on them. Selected items show with a blue background.
- Group Items - This command will take all of the selected items and put them into a new group.
- Copy Items - This command will copy all of the selected items to the Windows clipboard.
- Paste - This command will paste any copied items on the Windows clipboard into the main group. Pasted items will always show at the end after all other items.
- New Line - This command will create a new line item at the bottom of the main group. The Case Selection Line dialog will be displayed to have you fill in the line text.
+ New Line Button
This command will create a new line item at the bottom of the main group. This is the same as using the New Line button in the Main Tool Bar. To fill in the new line, the Case Selection Line dialog will be displayed automatically to have you fill in the line text.
Lines
Lines are single selection statement lines within the entire selection statement. Each line is composed of a variable, an operator, and a collection of values. All modifications of a line are done in the Case Selection Line dialog.
- Edit - This command will edit this line item by displaying the Case Selection Line dialog.
- Copy Line - This command will copy the current line to the Windows clipboard.
- Delete Line - This command will delete this line from the selection statement.
Groups
Groups are collections of lines and groups. They are a way to group together like elements and have them share a specific conjunction. Groups can contain lines or other groups which themselves contain items. Groups are a way to have SEER*Stat evaluate lines together first, before being used with other lines.
- Ungroup Items - This command will remove this group but keep all of its contents. The group box around them will merely be removed. Keep in mind that the conjunction which binds the lines together may change.
- Copy Group - This command will copy the current group to the Windows clipboard.
- Paste Items - This command will paste any copied items on the Windows clipboard into this group. Pasted items will always show at the end after all other items in this group.
- New Line - This command will create a new line item at the bottom of this group. The Case Selection Line dialog will be displayed to have you fill in the line text.
- Delete Group - This command will delete this group and all of the items within it.
Groups Are Parenthesis
When the graphical items are converted to a text selection statement in the Selection Statement section, groups are interpreted as parenthesis. Parentheses around a group of lines tell SEER*Stat to evaluate those lines first when processing the selection statement (to give them the highest precedence). By grouping lines together and defining the order of operation, groups can provide a large degree of flexibility when building a selection statement. It is possible to have multiple and nested groups (parentheses) in the same selection statement. By using groups, you cannot create an invalid grouping of elements.
Connecting Lines and Groups
Each line of a selection statement after the first is joined to the line preceding it with a Boolean conjunction. SEER*Stat uses the conjunction "AND" by default, but you can change this using the Conjunction drop-down list.
The "Or" operator will evaluate the pair of lines as true if the record being considered matches either or both of the lines. The "And" operator will evaluate the pair of lines as true only if the record being considered matches both lines.
Operators are evaluated in a standard order of precedence. Pairs of lines that have already been evaluated form a logical block that is considered as a single true or false statement when being evaluated in conjunction with the remaining lines or logical blocks in the statement. You can alter the order of precedence and define your own logical blocks using groups.
Besides "And" and "Or", there is also "And Not" and "Or Not". A "Not" applies to the logical block that follows it, inverting the truth or falsehood of that block. The "Not" operator is not available when you are creating a merged variable grouping.
Drag and Drop
You can move lines and groups around to new locations by dragging and dropping selected items. First select the item you would like to move. The Left-click with the mouse and hold the click down. Drag the item to a new location and let go of the mouse button. Using this technique you can move a single line or multiple lines to a new location. You can also move items out of or into groups. Dragging and dropping will only move those items that you select first.
Selection Statement
This section shows the text equivalent of the criteria you specified in the lines above. The following is an example of a finished selection statement:
- {Race, Sex, Year Dx, Registry, County.Year of diagnosis} = '1973','1974','1975','1976', '1977','1978','1979' AND {Race, Sex, Year Dx, Registry, County.Sex} = ' Male'
The first line of the above statement is selecting records with a year of diagnosis equal to 1973 or 1974 or 1975 or 1976, etc. The full statement is selecting male records with a year of diagnosis from 1973 through 1979.
See Using Correct Full Boolean Logic to Build a Selection Statement to learn more about the logic used in selection statements.
Copy
This button will copy the text of the selection statement to the Windows clipboard.
Paste
This button will copy text from the clipboard into the selection statement. The text will be parsed as it is required to be a valid SEER*Stat selection statement. If it is valid, the text will be displayed above, and the display will change to represent the new selection statement.
You can paste lines that you have copied from your selection statement into other Windows applications. You can also copy selection statements from other applications and Paste them into SEER*Stat, as long as they have the correct syntax. If you paste in lines that refer to nonexistent variables, you will have to delete or correct them before you save your selection statement. If you paste lines that refer to invalid variable values, SEER*Stat will delete those values automatically.
OK / Cancel
If you do not want to keep your changes, press the Cancel button. If you'd like to keep the changes press the OK button. The selection statement will be validated and if acceptable, you will be returned to the Selection tab you started from (or whichever starting location).