home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pipex!doc.ic.ac.uk!uknet!str-ccsun!str-va!ciar04
- From: ciar04@vaxa.strath.ac.uk
- Newsgroups: bit.listserv.stat-l
- Subject: Re: data manipulation in Minitab
- Message-ID: <1992Dec18.104140.1@vaxa.strath.ac.uk>
- Date: 18 Dec 92 10:41:40 GMT
- References: <STAT-L%92121710381949@VM1.MCGILL.CA>
- Sender: news@ccsun.strath.ac.uk (News account )
- Organization: Strathclyde University VAX Cluster
- Lines: 42
- Nntp-Posting-Host: vaxe
-
- Tim Dorcey <TCD@CORNELLC.BITNET> writes:
-
- > From the mention of Minitab that I saw in the recent discussion of
- > stat packages, I'm led to believe that someone out there can help me with
- > what seems like a routine data manipulation problem. Given a column of
- > data, how would one create a new column where the first element is the
- > average of row1-row3, the second element is the average of row4-row6,
- > etc. The only thing I could think of would be to create a column of
- > indices 1 1 1 2 2 2 3 3 3 .... , and then use ANOVA to get predicted
- > values. This seems pretty round about and I don't even know how I
- > would generate the indices in the first place. Anybody know the
- > simple answer to this problem? Thanks in advance.
-
- You could create a macro to step through the column, picking up 3 values
- from the column (i.e. the 3 rows) and put the average into a new row in
- a new column. Something like this
-
- LET K2=K1+1
- LET K3=K2+1
- LET C101(K4)=(C1(K1)+C1(K2)+C1(K3))/3
- LET K1=K1+3
- LET K4=K4+1
-
-
- Before you run this macro, initialised K1 and K4 to 1 i.e.
-
- LET K1=1
- LET K4=1
-
- Execute the macro the appropriate number of times i.e.
-
- EXEC 'AVERAGE' 100 (if there are 300 observations in column 1)
-
- Regards.
-
- #----------------------------------#-------------------------------------------#
- | W.H.Watt # JANET: |
- | Dept. of Accounting & Finance # w.h.watt@uk.ac.strath.vaxa |
- | University of Strathclyde # Rest of the World: |
- | Glasgow # w.h.watt@vaxa.strath.ac.uk |
- | United Kingdom # |
- #----------------------------------#-------------------------------------------#
-