Creating Random Abstracting Samples

Creating Random Abstracting Samples

Generating Random Samples from CPDMS Database

This procedure is used to generate a random sample of cases from the KCR central registry.

  1. Make sure central is not being merged and if not, get copy of central (/kcr/bin/kcrimport.ram - copies central:/kcr/central to /kcr/ramdisk)
  2. Create login for user random (study groups already exist on mordor)
  3. Create working directory for random sample (if desired) under /kcr/audits/
  4. Create Study Group: Select All Cases where DiagDate 07/01/2011 thru 12/31/2011 and DiagState = KY and hosp in ... etc, etc.
  5. In CPDMS, ASCIIOut using random.fmt. (Generates random.out and random.rl)
  6. Sort records by random number: cat random.out | sort > random.srt (make sort)
  7. Select subset group of records and format and sort output
    * Edit randfmt.php to define file names and sample size
    * randfmt - opens random.srt, selects subset, formats output into random.txt and control list in random.ctl; output data is sorted by field 2 (hospid)
  8. Copy random.ctl, random.rpt, random.txt to J:\Emily\Random Case Samples\MonYYYY

Last Updated 07/24/2013