home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / bit / listserv / sasl / 3962 < prev    next >
Encoding:
Text File  |  1992-08-31  |  1.2 KB  |  54 lines

  1. Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
  2. Subject: (no subject given)
  3. Path: sparky!uunet!paladin.american.edu!auvm!FORDMURH.BITNET!AOWALSH
  4. Original_To:  BITNET%"sas-l@uga"
  5. Message-ID: <SAS-L%92083107554636@UGA.CC.UGA.EDU>
  6. Newsgroups: bit.listserv.sas-l
  7. Date:         Mon, 31 Aug 1992 07:54:00 EST
  8. Reply-To:     AOWALSH@FORDMURH.BITNET
  9. Sender:       "SAS(r) Discussion" <SAS-L@UGA.BITNET>
  10. From:         AOWALSH@FORDMURH.BITNET
  11. Lines: 41
  12.  
  13. system: vax 5.1
  14. sas: 6.07
  15. problem:
  16. I am generating individual data sets for students in a
  17. class as well as the answer (proc anova).  I want to add
  18. the individual student's name to the ascii data set and to
  19. answer key(proc anova).
  20. Any suggestions would be appreciated.
  21. John F. Walsh
  22. bitnet:aowalsh@fordmurh
  23. libname meghan '[aowalsh]';
  24. filename out 'anova.dat';
  25. data meghan.anova;
  26. infile cards n=2;
  27. input m1-m4 / s1-s4;
  28. file out;
  29. array t{4} y1-y4;
  30. array sx{4} s1-s4;
  31. array mx{4} m1-m4;
  32. do id= 1 to 30;
  33. do j=1 to 12;
  34. do iv=1 to 4;
  35. dv=mx{iv} + int(sx{iv}*rannor(0));
  36. t{iv}=dv;
  37. output  ;
  38. end;
  39. put id 2. j 3. +5 (y1-y4) (+2,2.);
  40. end;
  41. end;
  42. keep id j iv dv;
  43. cards;
  44. 38 42 46 48
  45. 6 4 6 4
  46. ;
  47. proc sort data=meghan.anova;
  48. by id;
  49. proc anova data=meghan.anova;
  50. class iv;
  51. model dv=iv;
  52. by id;
  53. run;
  54.