Stata 15 help for svy jackknife

[SVY] svy jackknife -- Jackknife estimation for survey data

Syntax

svy jackknife exp_list [, svy_options jackknife_options eform_option] : command

exp_list specifies the statistics to be collected from the execution of command. exp_list is required unless command has the svyj program property, in which case exp_list defaults to _b; see [P] program properties.

svy_options Description ------------------------------------------------------------------------- if/in subpop([varname] [if]) identify a subpopulation

Reporting level(#) set confidence level; default is level(95) noheader suppress table header nolegend suppress table legend noadjust do not adjust model Wald statistic nocnsreport do not display constraints display_options control columns and column formats, row spacing, line width, display of omitted variables and base and empty cells, and factor-variable labeling

coeflegend display legend instead of statistics ------------------------------------------------------------------------- coeflegend is not shown in the dialog boxes for estimation commands.

jackknife_options Description ------------------------------------------------------------------------- Main eclass number of observations is in e(N) rclass number of observations is in r(N) n(exp) specify exp that evaluates to number of observations used

Options saving(filename[, ...]) save results to filename; save statistics in double precision; save results to filename every # replications keep keep pseudovalues mse use MSE formula for variance

Reporting verbose display the full table legend nodots suppress replication dots dots(#) display dots every # replications noisily display any output from command trace trace command title(text) use text as title for jackknife results

Advanced nodrop do not drop observations reject(exp) identify invalid results dof(#) design degrees of freedom ------------------------------------------------------------------------- svy requires that the survey design variables be identified using svyset. command defines the estimation command to be executed. The by prefix cannot be part of command. See [SVY] svy postestimation for features available after estimation. Warning: Using if or in restrictions will often not produce correct variance estimates for subpopulations. To compute estimates for subpopulations, use the subpop() option.

Menu

Statistics > Survey data analysis > Resampling > Jackknife estimation

Description

svy jackknife performs jackknife variance estimation of specified statistics (or expressions) for a Stata command or a user-written program. The command is executed once for each replicate using sampling weights that are adjusted according to the jackknife methodology. Any Stata estimation command listed in [SVY] svy estimation may be used with svy jackknife. User-written programs that meet the requirements in [P] program properties may also be used.

Options

svy_options; see [SVY] svy.

+------+ ----+ Main +-------------------------------------------------------------

eclass, rclass, and n(exp) specify where command stores the number of observations on which it based the calculated results. We strongly advise you to specify one of these options.

eclass specifies that command store the number of observations in e(N).

rclass specifies that command store the number of observations in r(N).

n(exp) allows you to specify an expression that evaluates to the number of observations used. Specifying n(r(N)) is equivalent to specifying the rclass option. Specifying n(e(N)) is equivalent to specifying the eclass option. If command stores the number of observations in r(N1), specify n(r(N1)).

If you specify none of these options, svy jackknife will assume eclass or rclass depending upon which of e(N) and r(N) is not missing (in that order). If both e(N) and r(N) are missing, svy jackknife assumes that all observations in the dataset contribute to the calculated result. If that assumption is incorrect, then the reported standard errors will be incorrect. See [SVY] svy jackknife for further details.

+---------+ ----+ Options +----------------------------------------------------------

saving(filename [, suboptions]) creates a Stata data file (.dta file) consisting of (for each statistic in exp_list) a variable containing the replicates.

See prefix_saving_option for details about suboptions.

keep specifies that new variables be added to the dataset containing the pseudovalues of the requested statistics. See [SVY] svy jackknife for details. keep implies the nodrop option.

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

+-----------+ ----+ Reporting +--------------------------------------------------------

verbose requests that the full table legend be displayed.

nodots suppresses display of the replication dots. By default, one dot character is printed for each successful replication. A red `x' is printed if command returns with an error, `e' is printed if one of the values in exp_list is missing, `n' is printed if the sample size is not correct, and a yellow `s' is printed if the dropped sampling unit is outside the subpopulation sample.

dots(#) displays dots every # replications. dots(0) is a synonym for nodots.

noisily requests that any output from command be displayed. This option implies the nodots option.

trace causes a trace of the execution of command to be displayed. This option implies the noisily option.

title(text) specifies a title to be displayed above the table of jackknife results; the default title is "Jackknife results".

eform_option; see [R] eform_option. This option is ignored if exp_list is not _b.

+----------+ ----+ Advanced +---------------------------------------------------------

nodrop prevents observations outside e(sample) and the if and in qualifiers from being dropped before the data are resampled.

reject(exp) identifies an expression that indicates when results should be rejected. When exp is true, the resulting values are reset to missing values.

dof(#) specifies the design degrees of freedom, overriding the default calculation, df = N_psu - N_strata.

Examples

. webuse nhanes2 . svy jackknife slope = _b[height] constant=_b[_cons]: regress weight height

. webuse nhanes2jknife . svyset _n . svy jackknife slope = _b[height] : regress weight height . svy jackknife slope = _b[height], mse : regress weight height

Stored results

In addition to the results documented in [SVY] svy, svy jackknife stores the following in e():

Scalars e(N_reps) number of replications e(N_misreps) number of replications with missing values e(k_exp) number of standard expressions e(k_eexp) number of _b/_se expressions e(k_extra) number of extra estimates added to _b

Macros e(cmdname) command name from command e(cmd) same as e(cmdname) or jackknife e(vce) jackknife e(exp#) #th expression e(jkrweight) jkrweight() variable list

Matrices e(b_jk) jackknife means e(V) jackknife variance estimates

When exp_list is _b, svy jackknife will also carry forward most of the results already in e() from command.


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