RANSEL: Randomly Select Group Membership

Last updated 19 Nov 97

RANSEL creates a new group membership mask by randomly selecting cases from any specified group membership mask. The user may specify either the number of cases to select or a percentage. A new title may be supplied for the created factor.

Program Invocation

The specific syntax for program invocation varies between operating systems. This document diplays the code for the AIX version.


@codap ransel <opt> <ssss> <TFf>

opt:  P   Select random sample based on a percentage
ssss:     The study number
TFf:      Input/output Task Factor file 

RANSEL Control Card


RANSEL <study> <title>

RANSEL:  cc 01-06  The literal 'RANSEL'
study:   cc 08-11  The study number for this run
title:   cc 13-72  The title for the output report

Selection Card(s)

The user may select as many groups as desired. The output group mask(s) will be GPnnnn/MBR, where nnnn is the next available sequence number in the GP series. For this reason, descriptive titles should be given to the output groups. These cards are terminated with an @EOF.


<gpid> <crit> <title>

gpid:   cc 01-06  The input group identifier
crit:   cc 08-12  The criterion for random selection (percentage of cases to
		  select if the P option is used, else the number of cases).
title:  cc 14-73  The title for the output group mask

Examples

@codap ransel - ssss tf100
RANSEL ssss Title for the output report
GP0001   100 Random selection of 100 cases from GP0001
GP0002    12 Random selection of 12 cases from GP0002
@EOF

This example will create two new membership masks using the input masks from the input file tf100.

@codap ransel - ssss tf100
RANSEL ssss Title for the output report
GP0001 50.00 Random 50% of cases from GP0001
GP0002   90. Random 90% of cases from GP0002
@EOF

This example will create two new membership masks using the input masks from the input file tf100. The number of cases to select is computed by multiplying the number of cases on the input mask by the percentage given, then dividing by 100.

Back to document index