*! version 0.1.4 8 Nov 2022

mpitb estcot -- estimates changes over time

Syntax

mpitb estcot , [options]

* frame(name) name of frame where to store results

* tvar(varname) time variable (counter)

* year(varname) year variable (for annualisation)

† insequence estimate of consecutive changes

† total estimate overall change

subgvar(varname) subgroup variable

ann annualises changes

raw raw changes

* measure name of measure (pass through to mpitb stores)

* spec name of specification (pass through to mpitb stores)

stores_options any other mpitb stores option

* required options; † at least of these options is required.

Description

mpitb estcot estimates changes over time for a single custom quantity and
is intended for advanced users and programmers. For a more comprehensive estimation
of changes over time of standard quantities, see mpitb est.

Estimated changes may be absolute and relative and, moreover, annualised or raw.
Standard errors and confidence intervals are provided, too. Changes may also be
estimated by subgroups and, where data permits, for all consecutive years
(i.e. year-to-year changes) and the total change (i.e. from the first to the last
period of observation.

mpitb estcot assumes that the levels over time have been previously estimated
using, for instance, mean ... , over(t) where t
is the time variable.

Options

frame(name) specifies the name of the frame where to store results. Result
frame may be created using mpitb est or mpitb rframe.

tvar(varname) specified the time variable, which identifies the different
rounds of the survey in the data.

year(varname) specifies the variable which is used for the annualisation,
which is usually a year variable, where decimal digits are permitted.

insequence results in producing all consecutive (i.e. year-to-year) changes.
At least one of insequence and total must be specified.

total results in producing the overall change, i.e. from the first to the
last period of observation. At least one of insequence and total must
be specified.

subgvar(varname) specifies variable identifying the subgroups.

raw produces the raw, i.e. non-annualised changes over time. This option is activated
by default. Specify noraw to skip the estimation of raw changes.

ann produces annualised changes over time. This option is activated by default.
Specify noann to skip the estimation of annualised changes.

measure(name) specifies the name of measures for which changes are estimated.
Essential meta information to be stored with any estimate.

spec(name) specifies the name of the specification for which changes are
estimated. Essential meta information to be stored with any estimate.

Remarks

1. Last estimates have to be obtained by mean.

2. For a coherent result file additional information may have to be passed to
mpitb stores using its options.

3. Technically, the program relies on lincom for absolute and
nlcom for relative changes.

Examples

Setup the results frame

mpitb rframe , frame(mycot) cot

Estimate quantity of interest

svy : mean d_cm , over(t)

Estimate changes over time and store in results frame

mpitb estcot, frame(mycot) tvar(t) total m(mym) sp(myspec) y(year_cot)

Estimate quantity of interest by subpopulation

svy : mean d_cm , over(t area)

Estimate changes over time by subpopulation and store in results frame

mpitb estcot , frame(mycot) subgvar(area) tvar(t) total measure(mym) spec(myspec) y(year_cot)