__Title__

**[SVY] brrstat** -- Reporting results from balanced repeated replication
(BRR)

__Syntax__

**brrstat** [*varlist*] [*if*] [*in*] [**,** *options*]

**brrstat** [*namelist*] [**using** *filename*] [*if*] [*in*] [**,** *options*]

*options* Description
-------------------------------------------------------------------------
**notable** suppress table of output
__noh__**eader** suppress table header
__nol__**egend** suppress table legend
__v__**erbose** display the full table legend

__l__**evel(***#***)** confidence level for CIs
__ti__**tle(***text***)** title for BRR results

__s__**tat(***vector***)** observed values
**mse** use MSE formula for variance estimate
-------------------------------------------------------------------------
**brrstat** shares the features of all estimation commands, except that **mfx**,
**adjust**, **predict**, and **predictnl** are not allowed; see estcom.

__Description__

**brrstat** is a programmer's command that computes and displays estimation
results from BRR statistics.

**brrstat** computes a variance-covariance matrix using the variables in
*varlist*, assuming the variables contain replicate values from a BRR
procedure.

If given the **using** modifier, **brrstat** will use the data in *filename* to
perform its calculations while preserving the data currently in memory.
The data in memory are used by default.

The following options may be used to replay estimation results from
**brrstat**:

__l__**evel(***#***)** **notable** __noh__**eader** __nol__**egend** __v__**erbose** __ti__**tle(***text***)**

For all other options (including **using**, **if**, and **in**), **brrstat** requires a
dataset.

__Options__

**notable** prevents displaying the output table.

**noheader** suppresses the displaying of the table header. This option
implies **nolegend**.

**nolegend** suppresses the displaying of the table legend. The table legend
identifies the rows of the table with the expressions they represent.

**verbose** requests that the full table legend be displayed. By default,
coefficients and standard errors are not displayed.

**level(***#***)**; see **[R] estimation options**.

**title(***text***)** specifies a title to be displayed above the table of BRR
results; the default title is "BRR statistics".

**stat(***vector***)** allows the user to specify the observed value of each
statistic (that is, the value of the statistic using the original
dataset).

**mse** specifies that **brrstat** compute the variance by using deviations of
the replicates from the observed value of the statistics based on the
entire dataset. By default, **jkstat** computes the variance by using
deviations of the pseudovalues from their mean.

__Remarks__

Although **brrstat** allows users to specify the observed value of each
replicate statistic via the **stat()** option, programmers may be interested
in what **brrstat** uses when this option is not supplied.

When working from a BRR dataset, **brrstat** first checks the data
characteristics (see **[P] char**). Here is a list of the characteristics
that **brrstat** understands:

**_dta[brr_version]** identifies the version of the BRR dataset. This
characteristic is assumed to be empty (not defined) or **1**; otherwise
**brrstat** will behave as if it were empty. This version informs
**brrstat** which other characteristics to look for in the BRR dataset.

**brrstat** uses the following characteristics from version **1** BRR
datasets:

**_dta[N]**
**_dta[N_strata]**
**_dta[N_psu]**
**_dta[N_pop]**
**_dta[strata]**
**_dta[psu]** **_dta[wtype]** **_dta[wexp]** **_dta[rweights]** **_dta[command]**
**_dta[names]**
*varname***[observed]**
*varname***[expression]**

An empty BRR dataset version implies that the dataset was not created
by the **brr**. In this case, the **stat()** option is required. All other
characteristics are ignored.

**_dta[N_strata]** is the number of strata in the observed dataset.

**_dta[N_psu]** is the number of PSUs in the observed dataset.

**_dta[strata]** is the name of the variable that originally identified the
strata.

**_dta[psu]** is the name of the variable from the original dataset that
identifies the primary sampling units.

**_dta[wtype]**, **_dta[wexp]**, and **_dta[rweights]** identify the weight type,
expression, and list of replicate weight variable names from the
observed dataset.

**_dta[command]** is the command used to compute the observed values of the
statistics.

**_dta[names]** identifies the variables containing the jackknife replicates.

*varname***[observed]** is the observed value of the statistic identified by
*varname*. This characteristic may be overruled by specifying the
**stat()** option.

*varname***[expression]** is the expression or label that describes the
statistic identified by *varname*.

__Stored results__

**brrstat** stores the following in **e()**:

Scalars
**e(N)** sample size
**e(N_strata)** number of strata
**e(N_psu)** number of PSUs
**e(N_reps)** number of requested replications

Macros
**e(cmd)** **brr**
**e(cmdline)** command as typed
**e(command)** *command* from **_dta[command]**
**e(exp***#***)** expression for the *#*th statistic
**e(strata)** strata variable
**e(cluster)** cluster variable
**e(missing)** "**missing**" if missing values found, otherwise empty
**e(vcetype)** "**BRR**" or "**BRR ***"
**e(vce)** "**brr**"
**e(mse)** "**mse**" if **mse** option supplied

Matrices
**e(b)** observed statistics
**e(V)** BRR variance matrix
**e(brr_b)** replicate means