Agriculture Reference
In-Depth Information
times selecting observations 13-24, then 25-36, and, finally, 37-48.
To do this from the Command window, enter
sort × in 1/12
sort × in 13/24
sort × in 25/36
sort × in 37/48
You can now drop the random variable by selecting the Variables
manager submenu, then select the random variable and hit backspace.
Data > Variables manager
To do this in the Command window, type
drop random
You now have a list of 12 treatments randomized within each of 4
replications. This can be printed out and taken to the field or used to
label and organize stakes, etc.
Once you have your data in a Stata file there are many types of
changes and additions that can be accomplished before conducting
your analyses. Often the rows represent specific treatments and the
columns are observations or replications. Many textbook examples
present data in this format, which is different than required in Stata.
If you are trying to learn a new method and scan in a table from a
textbook to try it in Stata, you may find you have to rearrange the data
prior to analysis.
An example of this was presented in the last section with the
rice variety trial where three of the columns represented the indi-
vidual replications. In Stata, you can copy and paste the data to
rearrange it to the proper format or you can use one of Stata's com-
mands. Stata has a wide selection of commands dealing solely with
data management.
Among the supplied files is a file called onionvar2003.txt, which
was created in Excel and can be imported into Stata with the Text
data created with a spreadsheet menu or the insheet command.
This dataset represents an onion variety trial with 30 varieties and 4
replications (variety 27 had crop failure) with the rows or observations
of the varieties and columns as replications.
Search WWH ::




Custom Search