Learn R Programming

vardpoor (version 0.20.1)

vardchangstrs: Variance estimation for measures of annual net change or annual for single stratified sampling designs

Description

Computes the variance estimation for measures of annual net change or annual for single stratified sampling designs.

Usage

vardchangstrs(
  Y,
  H,
  PSU,
  w_final,
  Dom = NULL,
  periods = NULL,
  dataset,
  periods1,
  periods2,
  in_sample,
  in_frame,
  confidence = 0.95,
  percentratio = 1
)

Arguments

Y

Variables of interest. Object convertible to data.table or variable names as character, column numbers.

H

The unit stratum variable. One dimensional object convertible to one-column data.table or variable name as character, column number.

PSU

Primary sampling unit variable. One dimensional object convertible to one-column data.table or variable name as character, column number.

w_final

Weight variable. One dimensional object convertible to one-column data.table or variable name as character, column number.

Dom

Optional variables used to define population domains. If supplied, variables are calculated for each domain. An object convertible to data.table or variable names as character vector, column numbers.

periods

Variable for the all survey periods. The values for each period are computed independently. Object convertible to data.table or variable names as character, column numbers.

dataset

Optional survey data object convertible to data.table.

periods1

The vector of periods from variable periods describes the first period for measures of change.

periods2

The vector of periods from variable periods describes the second period for measures of change.

in_sample

Sample variable. One dimensional object convertible to one-column data.table or variable name as character, column number.

in_frame

Frame variable. One dimensional object convertible to one-column data.table or variable name as character, column number.

confidence

optional; either a positive value for confidence interval. This variable by default is 0.95.

percentratio

Positive numeric value. All linearized variables are multiplied with percentratio value, by default - 1.

Value

A list with objects are returned by the function:

  • crossectional_results - a data.table containing: year - survey years, subperiods - survey sub-periods, variable - names of variables of interest, Dom - optional variable of the population domains, estim - the estimated value, var - the estimated variance of cross-sectional and longitudinal measures, sd_w - the estimated weighted variance of simple random sample, se - the estimated standard error of cross-sectional or longitudinal, rse - the estimated relative standard error (coefficient of variation), cv - the estimated relative standard error (coefficient of variation) in percentage, absolute_margin_of_error - the estimated absolute margin of error, relative_margin_of_error - the estimated relative margin of error, CI_lower - the estimated confidence interval lower bound, CI_upper - the estimated confidence interval upper bound, confidence_level - the positive value for confidence interval.

  • annual_results - a data.table containing: year_1 - survey years of years1 for measures of annual net change, year_2 - survey years of years2 for measures of annual net change, Dom - optional variable of the population domains, variable - names of variables of interest, estim_2 - the estimated value for period2 for measures of annual net change, estim_1 - the estimated value for period1 for measures of annual net change, estim - the estimated value, var - the estimated variance, se - the estimated standard error, rse - the estimated relative standard error (coefficient of variation), cv - the estimated relative standard error (coefficient of variation) in percentage, absolute_margin_of_error - the estimated absolute margin of error for period1 for measures of annual, relative_margin_of_error - the estimated relative margin of error in percentage for measures of annual, CI_lower - the estimated confidence interval lower bound, CI_upper - the estimated confidence interval upper bound, confidence_level - the positive value for confidence interval, significant - is the the difference significant

References

Guillaume OSIER, Virginie RAYMOND, (2015), Development of methodology for the estimate of variance of annual net changes for LFS-based indicators. Deliverable 1 - Short document with derivation of the methodology.

See Also

vardchanges, vardannual