Agriculture Reference
In-Depth Information
Output Formats
Stata has the ability to control the output for numbers, strings
(text), and dates. Dataset variables are stored in a number of possible
data types (storage formats) based on the data. For example, whole
numbers may be stored as integers ( int ), which can be values from
-32,767 to 32,740. There is a default display format for integers that
is %8.0g. This format indicates there are 8 spaces for the number
and the 0 indicates the number of decimals is left up to whatever the
number is. In the case of integers, there are no decimal places. The
g indicates it is a general format where the digits to display right of
the decimal point are determined by the value, and if the value is too
long for the 8 spaces, it will convert the number to an exponential
format (%e).
he display command in its simplest form can be used to display
the various formats. Using this simple command can be an ideal tool
for exploring the possibilities of the various available formats.
display [ % fmt ] [ =] exp
Other default display formats for the various data types include
DATA TYPE
DEFAULT FORMAT
byte|
%8.0g
int|
%8.0g
long|
%12.0g
float|
%9.0g
double|
%10.0g
str#|
%#s
he % w.d f display format is a fixed format where w is the width of
the display and d is the number of digits to the right of the decimal
with the f indicating it is a fixed format. For example, % 6.2f is a fixed
format of six digits and two digits to the right of the decimal point.
Experimentation Ideas
As I mentioned in the Introduction, this topic deals primarily with
agricultural research. Generally, this means using statistics to analyze
planned experiments. There is a great body of statistical procedures that
Search WWH ::




Custom Search