help total dialogs: total svy: total
also see: total postestimation
-------------------------------------------------------------------------------
Title
[R] total -- Estimate totals
Syntax
total varlist [if] [in] [weight] [, options]
options description
-------------------------------------------------------------------------
if/in/over
over(varlist[, nolabel]) group over subpopulations defined by varlist;
optionally, suppress group labels
SE/Cluster
vce(vcetype) vcetype may be analytic, cluster clustvar,
bootstrap, or jackknife
Reporting
level(#) set confidence level; default is level(95)
noheader suppress table header
nolegend suppress table legend
+ coeflegend display coefficients' legend instead of
coefficient table
-------------------------------------------------------------------------
+ coeflegend does not appear in the dialog box.
bootstrap, jackknife, rolling, statsby, and svy are allowed; see prefix.
Weights are not allowed with the bootstrap prefix.
vce() and weights are not allowed with the svy prefix.
fweights, pweights, and iweights are allowed; see weight.
See [R] total postestimation for features available after estimation.
Menu
Statistics > Summaries, tables, and tests > Summary and descriptive
statistics > Totals
Description
total produces estimates of totals, along with standard errors.
Options
+------------+
----+ if/in/over +-------------------------------------------------------
over(varlist [, nolabel]) specifies that estimates be computed for
multiple subpopulations, which are identified by the different values
of the variables in varlist.
When this option is supplied with one variable name, such as over(
varname), the value labels of varname are used to identify the
subpopulations. If varname does not have labeled values (or there
are unlabeled values), the values themselves are used, provided that
they are nonnegative integers. Noninteger values, negative values,
and labels that are not valid Stata names are substituted with a
default identifier.
When over() is supplied with multiple variable names, each
subpopulation is assigned a unique default identifier.
nolabel specifies that value labels attached to the variables
identifying the subpopulations be ignored.
+------------+
----+ SE/Cluster +-------------------------------------------------------
vce(vcetype) specifies the type of standard error reported, which
includes types that are derived from asymptotic theory, that allow
for intragroup correlation, and that use bootstrap or jackknife
methods; see [R] vce_option.
vce(analytic), the default, uses the analytically derived variance
estimator associated with the sample total.
+-----------+
----+ Reporting +--------------------------------------------------------
level(#); see [R] estimation options.
noheader prevents the table header from being displayed. This option
implies nolegend.
nolegend prevents the table legend identifying the subpopulations from
being displayed.
The following option is available with total but is not shown in the
dialog box:
coeflegend; see [R] estimation options.
Example
Setup
. webuse total
Estimate totals over values of sex, using swgt as pweights
. total heartatk [pw=swgt], over(sex)
Saved results
total saves the following in e():
Scalars
e(N) number of observations
e(N_over) number of subpopulations
e(N_clust) number of clusters
e(k_eq) number of equations in e(b)
e(df_r) sample degrees of freedom
e(rank) rank of e(V)
Macros
e(cmd) total
e(cmdline) command as typed
e(varlist) varlist
e(wtype) weight type
e(wexp) weight expression
e(title) title in estimation output
e(cluster) name of cluster variable
e(over) varlist from over()
e(over_labels) labels from over() variables
e(over_namelist) names from e(over_labels)
e(vce) vcetype specified in vce()
e(vcetype) title used to label Std. Err.
e(properties) b V
e(estat_cmd) program used to implement estat
Matrices
e(b) vector of total estimates
e(V) (co)variance estimates
e(_N) vector of numbers of nonmissing observations
e(error) error code corresponding to e(b)
Functions
e(sample) marks estimation sample
Also see
Manual: [R] total
Help: [R] total postestimation;
[R] mean, [R] proportion, [R] ratio