svyflow: Gross flow estimation between categories

Description Usage Arguments Details Value Author(s) References Examples

View source: R/svyflow.R

Description

Compute gross flows for data from complex surveys with repeated samples.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
## S3 method for class 'survey.design2'
svyflow(
  x,
  design,
  model = c("A", "B", "C", "D"),
  tol = 1e-04,
  maxit = 5000,
  verbose = FALSE,
  as.zero.flows = FALSE,
  influence = FALSE,
  ...
)

## S3 method for class 'svyrep.design'
svyflow(
  x,
  design,
  model = c("A", "B", "C", "D"),
  tol = 1e-04,
  maxit = 5000,
  verbose = FALSE,
  as.zero.flows = FALSE,
  influence = FALSE,
  ...
)

Arguments

x

a one-sided formula indicating a factor variable.

design

survey design object

model

Stasny (1987) model for the non-response process. Possibilities: "A", "B", "C", "D". Defaults to model = "A".

tol

Tolerance for iterative proportional fitting. Defaults to 1e-4.

maxit

Maximum number of iterations for iterative proportional fitting. Defaults to maxit = 5000.

verbose

Print proportional fitting iterations. Defaults to verbose = FALSE.

as.zero.flows

Should zeroes in the observed gross flows should be considered as zeroes in the population transition probability matrix? Defaults to as.zero.flows = FALSE.

influence

Should influence functions estimates be stored? Defaults to influence = FALSE.

...

future expansion.

Details

It is important to distinguish "missing" responses from "unnaplicable" responses. This is feasible by subsetting the design for only applicable responses (with actual missing responses, if that is the case). For instance, suppose that we have two variables encoded as employed/unemployed, with NAs if the response is missing or is unnaplicable. An NA might be a person that did not respond or a person who was under the working-age at the time of the survey. It is important to distinguish across those, as only one of those cases is an actual non-response. You could do that by looking for people who were in working age in any round, for instance. This can be done by using subset, as you should for a survey design object.

Value

Objects of class flowstat, a list of svystat and svymstat (a matrix version of svystat) objects. The flowstat object contais estimates of: the initial response probababilities psi, the response/response transition probabilities rho, the non-response/non-response transition probabilities tau, the (non-response corrected) initial and final distributions across categories eta and gamma, the (non-response corrected) transition probability matrix pij, the (non-response corrected) gross flows matrix muij, and the vector of net flows delta. These objects have methods for coef, vcov, SE, and cv.

A Rao-Scott Corrected Chi^2 test is also calculated.

Author(s)

Guilherme Jacob

References

STASNY, E. A. Some Markov-chain models for nonresponse in estimating gross labor force flows. Journal of Official Statistics, v. 3, n. 4, p. 359, 1987.

GUTIERREZ, H. A.; TRUJILLO, L.; SILVA, P. L. N. The estimation of gross flows in complex surveys with random nonresponse. Survey Methodology, v. 40, n. 2, p. 285–321, dec. 2014. URL https://www150.statcan.gc.ca/n1/en/catalogue/12-001-X201400214113.

LUMLEY, T. Complex Surveys: A guide to analysis using R. Hoboken: John Wiley & Sons, 2010. (Wiley Series in Survey Methodology). ISBN 978-0-470-28430-8.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# load library
library( survey )
library( surf )

# load data
data( "LFS79.0809" )

# create surf design object
lfs.des <- svydesign( ids = ~0 , probs = ~ prob , data = LFS79.0809 , nest = TRUE )

# flow estimates
estflows <- svyflow( ~y1+y2 , design = lfs.des )
coef( estflows$muij )
SE( estflows$muij )

surf documentation built on April 6, 2021, 9:06 a.m.