home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / bit / listserv / sasl / 3821 < prev    next >
Encoding:
Text File  |  1992-08-20  |  2.5 KB  |  63 lines

  1. Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
  2. Path: sparky!uunet!paladin.american.edu!auvm!NIHCU.BITNET!HIS
  3. Message-ID: <SAS-L%92082014263032@UGA.CC.UGA.EDU>
  4. Newsgroups: bit.listserv.sas-l
  5. Date:         Thu, 20 Aug 1992 14:24:11 EDT
  6. Reply-To:     Howard Schreier <HIS@NIHCU.BITNET>
  7. Sender:       "SAS(r) Discussion" <SAS-L@UGA.BITNET>
  8. From:         Howard Schreier <HIS@NIHCU.BITNET>
  9. Subject: Re: Subsetting data set
  10. Lines: 51
  11.  
  12. CONTENT:  Response
  13. SUMMARY:  Check proximity to MIN and MAX dates
  14. REL/PLTF:
  15.  
  16. > I was given a data file (ascii) that contains both baseline
  17. > values and 1-yr follow-up values.  Each respondent has
  18. > multiple records of the same variables except for the date.
  19. > The only thing that distinguishes between the baseline
  20. > records and follow-up records is that they are about a year
  21. > apart.  Is there an easy way to separate the baseline data
  22. > from the one year data?  The problem is that there are no
  23. > fixed no. of records for each respondent.  Some have 2
  24. > records at baseline and 4 at follow-up, 4 at baseline and
  25. > none at follow-up, 3 at baseline and 2 at follow-up, etc.
  26. > There is also no specific cut-off date for baseline, ie. the
  27. > dates overlap.  Below is an eg.:
  28. >
  29. > ID     DATE    VAR1  VAR1  VAR3........
  30. > 101    8/10/90  1     2     3
  31. > 101    8/11/90  2     2     1
  32. > 101    8/12/90  1     1     2
  33. > 102    5/1/91   1     1     3
  34. > 102    5/3/91   2     3     3
  35. > 103    8/5/91   3     3     1
  36. > 103    8/7/91   1     1     1
  37. > 101    8/4/91   3     3     2
  38. > 101    8/5/91   2     2     3
  39. > 103    8/1/92   1     1     1
  40. > 107    10/1/90  1     2     2
  41. > 107    10/3/90  2     3     1
  42. > 102    4/29/92  3     2     1
  43. > 102    4/30/92  2     2     2
  44. > 104    6/23/90  3     3     3
  45. > 104    6/24/90  3     1     2
  46. > 104    6/26/90  1     2     3
  47.  
  48. Read everything into a SAS data set (use a date informat for
  49. DATE  and  also  declare  a  DATE  format for it).  Use PROC
  50. SUMMARY to get MIN, MAX, and RANGE for DATE,  for  each  ID,
  51. and  MERGE these back with original data.  Construct some IF
  52. tests to assign observations to baseline and  follow-up.   I
  53. would  also  check  for irregular cases (RANGE statistic not
  54. close to 365, DATE values not close to  either  MIN  or  MAX
  55. statistic).
  56.  
  57. /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
  58. \   Howard Schreier, U.S. Dept. of Commerce, Washington    /
  59. /                     MVS 5.18 & 6.07                      \
  60. \   Voice: (202) 377-4180        BITNET: HIS@NIHCU         /
  61. /   Fax:   (202) 377-4614      INTERNET: HIS@CU.NIH.GOV    \
  62. \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
  63.