Agriculture Reference
In-Depth Information
and a relatively wide range of values (-1.70141173319*10^38 to
1.70141173319*10^38). Values stored as doubles can have an even
wider range and greater precision (-8.9884656743*10^307 to
8.9884656743*10^307). A string variable is used for a string of char-
acters. For more information on data types, type help data types in
a Viewer window. Generally you don't have to be concerned with a
variable's storage type unless memory is getting low, in which case
switching a variable from a float type to byte type, for example, can
save memory, assuming the variable can be stored as a byte. Even this
level of knowledge is not that important because Stata has a com-
mand, compress , that can be used to reduce the size of the dataset
in memory. With this command, Stata attempts to store variables in
a smaller storage type if possible. The command is
compress [ varlist ]
It is helpful when working on a dataset to change the location of
the working directory. This makes it easy to open or save files when
entering commands in the Command window. You don't have to type
the entire pathname. The command for changing the directory is
cd directory name
In statistics, one of the most important types of information you
will want to look at and report is descriptive statistics, which includes
measures of central tendency and dispersion. The most important
measure of central tendency is the mean or average. This can be calcu-
lated and reported easily by Stata. Open the onionyield03.dta dataset,
which we will use to demonstrate some of the descriptive statistics
available in Stata.
One of the most useful commands for reporting means is the
tabstat command.
tabstat varlist [ if ] [ in ] [ weight ] [, options ]
he tabstat command is used to generate a variety of descriptive
statistics. In the command listed above, you will see the terms if ,
in , and weight . These qualifiers are available with many Stata com-
mands, so let's cover them now. The if qualifier allows you to select
Search WWH ::




Custom Search