total
The sum, together with how precise that sum is.
What we have
- the total with its standard error
over()and weights
Coming later
- a survey design; use svy: total
How you write it
total varlist [if] [weight]
Square brackets mean optional. A vertical bar means choose one.
What it does
The same idea as mean but for a total: how many people, how much money, how many households — with a standard error, so you can say how firm the number is.
With survey weights this becomes an estimate of a population total from a sample.
Try it
Every example below was run after sysuse vira.sample02, clear.
. total hhsize
Total estimation
Number of obs = 6,000
Design df = 5,999
| Total Std. err. [95% conf. interval]
-----------------+--------------------------------------------------------
hhsize | 27255 177.7595 26906.53 27603.47
The same thing in pandas and in R
pandas
# total of ['hhsize'] with linearised standard errors
R
# no R form for `total` yet -- see docs/r-equivalents.md