**[R]** *vce_option* -- Variance estimators

__Syntax__

*estimation_cmd* ... [**,** **vce(***vcetype***)** ...]

*vcetype* Description
-------------------------------------------------------------------------
Likelihood based
**oim** observed information matrix (OIM)
**opg** outer product of the gradient (OPG)
vectors

Sandwich estimators
__r__**obust** Huber/White/sandwich estimator
__cl__**uster** *clustvar* clustered sandwich estimator

Replication based
__boot__**strap** [**,** *bootstrap_options*] bootstrap estimation
__jack__**knife** [**,** *jackknife_options*] jackknife estimation
-------------------------------------------------------------------------

__Description__

This entry describes the **vce()** option, which is common to most estimation
commands. **vce()** specifies how to estimate the variance-covariance matrix
(VCE) corresponding to the parameter estimates. The standard errors
reported in the table of parameter estimates are the square root of the
variances (diagonal elements) of the VCE.

__Options__

+-----------+
----+ SE/Robust +--------------------------------------------------------

**vce(oim)** is usually the default for models fit using maximum likelihood.
**vce(oim)** uses the observed information matrix (OIM); see **[R] ml**.

**vce(opg)** uses the sum of the outer product of the gradient (OPG) vectors;
see **[R] ml**. This is the default VCE when the **technique(bhhh)** option
is specified; see **[R] maximize**.

**vce(robust)** uses the robust or sandwich estimator of variance. This
estimator is robust to some types of misspecification so long as the
observations are independent; see **[U] 20.22 Obtaining robust variance**
**estimates**.

If the command allows **pweight**s and you specify them, **vce(robust)** is
implied; see **[U] 20.24.3 Sampling weights**.

**vce(cluster** *clustvar***)** specifies that the standard errors allow for
intragroup correlation, relaxing the usual requirement that the
observations be independent. That is, the observations are
independent across groups (clusters) but not necessarily within
groups. *clustvar* specifies to which group each observation belongs,
for example, **vce(cluster personid)** in data with repeated observations
on individuals. **vce(cluster** *clustvar***)** affects the standard errors
and variance-covariance matrix of the estimators but not the
estimated coefficients; see **[U] 20.22 Obtaining robust variance**
**estimates**.

**vce(bootstrap** [**,** *bootstrap_options*]**)** uses a bootstrap; see **[R] bootstrap**.
After estimation with **vce(bootstrap)**, see **[R] bootstrap**
**postestimation** to obtain percentile-based or bias-corrected
confidence intervals.

**vce(jackknife** [**,** *jackknife_options*]**)** uses the delete-one jackknife; see
**[R] jackknife**.

__Remarks__

Remarks are presented under the following headings:

Prefix commands
Passing options in vce()

__Prefix commands__

Specifying **vce(bootstrap)** or **vce(jackknife)** is often equivalent to using
the respective prefix command. Here is an example using **jackknife** with
**regress**.

**. sysuse auto**
**. regress mpg turn trunk, vce(jackknife)**
**. jackknife: regress mpg turn trunk**

Here it does not matter whether we specify option **vce(jackknife)** or
instead use the **jackknife** prefix.

However, **vce(jackknife)** should be used in place of the **jackknife** prefix
whenever available because they are not always equivalent. For example,
to use the **jackknife** prefix with **clogit** properly, you must tell **jackknife**
to omit whole groups rather than individual observations. Specifying
**vce(jackknife)** does this automatically.

**. webuse clogitid**
**. jackknife, cluster(id): clogit y x1 x2, group(id)**

This extra information is automatically communicated to **jackknife** by
**clogit** when the **vce()** option is specified.

**. clogit y x1 x2, group(id) vce(jackknife)**

__Passing options in vce()__

If you wish to specify more options to the bootstrap or jackknife
estimation, you can include them within the **vce()** option. Below we
request 300 bootstrap replications and save the replications in
**bsreg.dta**.

**. sysuse auto**
**. regress mpg turn trunk, vce(bootstrap, rep(300) saving(bsreg))**
**. bstat using bsreg**