Agriculture Reference
In-Depth Information
identify the individual values. Remember, we have collapsed the
dataset, thus, with the Strontium.dta, we are only dealing with five
means.
The next series of statements begins with
local v1 = `trt'
which sets the first value of v1 to the number of treatments, since
there is no value for this macro because the previous loop stops with z
equal to 2. The forvalues f loop again loops from 1 to the number
of treatments. The first statement in this loop sets g to one less than
the value of f, which in the first instance through the loop would set g
to 0. The next if statement
if “`v`f''” ! = “`v`g''” {
compares the v value from the previous forvalues z loop one at
a time to the value just preceding it. If they are not equal, t is incre-
mented by one. The t value represents the number of letters to use
when building the table of mean differences. With this if state-
ment, we see the use of double quotes where single quotes are used for
numerical values and double quotes for text values. Because the first
value of vg is nothing, the comparison between vf and vg must be as
text to prevent an error in the program.
The next series of statements begins with
local j1 = 1
which sets the first value of j to 1 . This is followed by a couple of
other macros ( h and p ) declared and their values set. This is followed
by another loop ( forvalues f ), which begins with the number of
treatments and counts down to 2 in increments of 1. Again the value
of v is compared with an if statement that compares the value of v
just preceding in the sequence. If these values are not equal, then the
starting point is calculated and stored in jh and the ending point in
kp. Once the beginning and ending points are calculated for all the
means that are similar, then letters can be accumulated in the macro
alphf. This is done in the forvalues b loop, which loops the num-
ber of letters required as stored in t from above. Finally, the letters
Search WWH ::




Custom Search