Stata 15 help for jkstat

Title

[SVY] jkstat -- Reporting jackknife results

Syntax

jkstat [varlist] [weight] [if] [in] [, options ]

jkstat [namelist] [using filename] [if] [in] [, options ]

options Description --------------------------------------------------------------------- notable suppress table of output noheader suppress table header nolegend suppress table legend verbose display the full table legend

level(#) confidence level for CIs title(text) title for jackknife results

stat(vector) observed values strata(varname) strata mse use MSE formula for variance estimate

display_options control column formats ---------------------------------------------------------------------

fweights, pweights, and iweights are allowed with jkstat; see weight.

jkstat shares the features of all estimation commands, except that adjust, margins, predict, and predictnl are not allowed; see estcom.

Description

jkstat is a programmer's command that computes and displays estimation results from jackknife statistics.

jkstat computes a variance-covariance matrix using the variables in varlist, assuming the variables contain replicate values from a jackknife procedure.

If given the using modifier, jkstat 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 when replaying estimation results from jkstat:

level(#) notable noheader nolegend verbose title(text) display_options

For all other options (and qualifiers using, if, and in), jkstat requires a dataset.

Options

notable prevents displaying the output table. This option implies noheader.

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 estimation_options.

title(text) specifies a title to be displayed above the table of jackknife results; the default title is "Jackknife 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).

strata(varname) specifies the variable that contains the stratum identifiers.

mse specifies that jkstat 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.

display_options: cformat(%fmt), pformat(%fmt), and sformat(%fmt); see [R] estimation options.

Remarks

Although jkstat allows users to specify the observed value and stratum identifier of each jackknife statistic via the stat() and strata() options, programmers may be interested in what jkstat uses when these options are not supplied.

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

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

jkstat uses the following characteristics from version 1 jackknife datasets:

_dta[N] _dta[N_cluster] _dta[command] _dta[jk_svy] _dta[names] varname[observed] varname[expression]

An empty jackknife dataset version implies that the dataset was not created by jackknife. Here the stat() option is required. All other characteristics are ignored.

_dta[N] is the number of observations in the observed dataset.

_dta[N_cluster] is the number of clusters in the observed dataset.

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

_dta[jk_svy] identifies that the jackknife data came from survey data when is contains "svy"; otherwise, nonsurvey data is assumed. When this characteristic is appropriately set, it causes jkstat to look for the following other characteristics:

_dta[N_strata] _dta[N_psu] _dta[strata] _dta[jk_strata] _dta[jk_multiplier] _dta[psu] _dta[wtype] _dta[wexp] _dta[rweights]

_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.

The following characteristics are available only when _dta[jk_svy] is "svy":

_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 from the original dataset that identifies the strata. This characteristic will usually contain the same variable name as _dta[jk_strata].

_dta[jk_strata] is the name of the variable that identifies the strata. This characteristic may be overruled by specifying the strata() option.

_dta[jk_multiplier] is the name of the variable that contains multiplier values used in the jackknife variance formula. This characteristic can be overruled by specifying weight.

_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[wtype] and _dta[wexp] may also be set for nonsurvey data, but this is only advisable with fweights; see weights.

Stored results

jkstat stores the following in e():

Scalars

e(N) sample size e(N_strata) number of strata e(N_cluster) number of clusters (for nonsurvey data) e(N_psu) number of PSUs (for survey data) e(N_reps) number of requested replications

Macros

e(cmd) jackknife 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(varlist) varlist or namelist e(vcetype) "Jackknife" or "Jknife *" e(vce) "jackknife" e(mse) "mse" if mse option supplied

Matrices

e(b) observed statistics e(V) jackknife variance matrix e(jk_b) jackknife means


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index