home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / bit / listserv / statl / 2261 < prev    next >
Encoding:
Internet Message Format  |  1992-12-20  |  2.2 KB

  1. Path: sparky!uunet!pipex!doc.ic.ac.uk!uknet!str-ccsun!str-va!ciar04
  2. From: ciar04@vaxa.strath.ac.uk
  3. Newsgroups: bit.listserv.stat-l
  4. Subject: Re:      data manipulation in Minitab
  5. Message-ID: <1992Dec18.104140.1@vaxa.strath.ac.uk>
  6. Date: 18 Dec 92 10:41:40 GMT
  7. References: <STAT-L%92121710381949@VM1.MCGILL.CA>
  8. Sender: news@ccsun.strath.ac.uk (News account )
  9. Organization: Strathclyde University VAX Cluster
  10. Lines: 42
  11. Nntp-Posting-Host: vaxe
  12.  
  13. Tim Dorcey <TCD@CORNELLC.BITNET> writes:
  14.  
  15. >      From the mention of Minitab that I saw in the recent discussion of
  16. > stat packages, I'm led to believe that someone out there can help me with
  17. > what seems like a routine data manipulation problem.  Given a column of
  18. > data, how would one create a new column where the first element is the
  19. > average of row1-row3, the second element is the average of row4-row6,
  20. > etc.  The only thing I could think of would be to create a column of
  21. > indices 1 1 1 2 2 2 3 3 3 .... , and then use ANOVA to get predicted
  22. > values.  This seems pretty round about and I don't even know how I
  23. > would generate the indices in the first place.  Anybody know the
  24. > simple answer to this problem?  Thanks in advance.
  25.  
  26. You could create a macro to step through the column, picking up 3 values
  27. from the column (i.e. the 3 rows) and put the average into a new row in
  28. a new column.  Something like this
  29.  
  30.     LET K2=K1+1
  31.     LET K3=K2+1
  32.     LET C101(K4)=(C1(K1)+C1(K2)+C1(K3))/3
  33.     LET K1=K1+3
  34.     LET K4=K4+1
  35.  
  36.  
  37. Before you run this macro, initialised K1 and K4 to 1 i.e.
  38.  
  39.     LET K1=1
  40.     LET K4=1
  41.  
  42. Execute the macro the appropriate number of times i.e.
  43.  
  44.     EXEC 'AVERAGE' 100       (if there are 300 observations in column 1)
  45.  
  46. Regards.
  47.  
  48. #----------------------------------#-------------------------------------------#
  49. |  W.H.Watt                        #  JANET:                                   |
  50. |  Dept. of Accounting & Finance   #           w.h.watt@uk.ac.strath.vaxa      |
  51. |  University of Strathclyde       #  Rest of the World:                       |
  52. |  Glasgow                         #           w.h.watt@vaxa.strath.ac.uk      |
  53. |  United Kingdom                  #                                           |
  54. #----------------------------------#-------------------------------------------#
  55.