Scales of variable(s) Continuous or categorical (ordinal)
Information
To generate descriptive statistics for your variables, you can use the summary command (or sum, for short).
It is used primarily for continuous variables (i.e. ratio/interval) but could also be used for some ordinal variables that are approximately continuous (e.g. rating measures).
The Stata function gives you the following statistics:
Obs
Number of observations
Mean
Mean value
Std. Dev.
Standard deviation
Minimum
Minimum (smallest) observed value
Maximum
Maximum (largest) observed value
If you combine sum with the option detail, you will additionally get the following statistics:
Median
Median
Variance
Variance
Kurtosis
Kurtosis and standard error of kurtosis
Skewness
Skewness and standard error of skewness
Function
Basic command
sum varname
Useful options
sum varname, detail
Explanations
varname
Insert the name of the variable you want to use.
detail
Display additional statistics.
Short names
sum
summarize
Note Stata’s calculations are statistics, not parameters (see Variation).
More information help summarize
Practical example
Dataset
StataData1.dta
Variable name
gpa
Variable label
Grade point average (Age 15, Year 1985)
Value labels
N/A
sum gpa
sum gpa, detail
Both tables show that the variable gpahas 9,380 observations (Obs).
The mean is 3.18 and the standard deviation (Std. Dev.) is 0.70. The minimum value is 1 (shown by both Min in the upper table and 1% Smallest in the lower table) and the maximum value is 5 (shown by both Max in the upper table and 99% Largest in the lower table).
The lower table additionally shows that the median is 3.1 (as indicated by the 50% Percentiles). The variance is 0.49, skewness 0.02, and kurtosis 2.56.