Skip to contents

Achieved precision for a two-phase design you already have, the inverse of n_twophase().

Usage

prec_twophase(frame, ...)

# Default S3 method
prec_twophase(
  frame,
  ...,
  n_phase1,
  phase1_cost = 1,
  between = NULL,
  mu = NULL,
  N = Inf,
  phase1_deff = 1,
  resp_rate = 1,
  fixed_cost = 0,
  plan = NULL
)

# S3 method for class 'svyplan_twophase'
prec_twophase(frame, ...)

Arguments

frame

For the default method: the phase-2 stratum frame described in n_twophase(), with an extra nu column giving the subsampling fraction actually used in each stratum. For svyplan_twophase objects: a result from n_twophase().

...

Additional arguments passed to methods. Unused arguments are rejected.

n_phase1

Phase-1 sample size, counted as units issued. nu is a share of that same base, so with phase-1 nonresponse the largest usable nu is resp_rate rather than 1.

phase1_cost, between, mu, N, phase1_deff, resp_rate, fixed_cost, plan

As in n_twophase(). The per-stratum phase-2 design effect and response rate travel in the frame's deff and resp_rate columns, as they do there.

Value

A svyplan_prec object with type = "twophase", carrying $se, $moe (NA, since a two-phase plan is specified by a cv rather than a half-width), $cv, and the per-stratum table in $detail.

Examples

frame <- data.frame(
  stratum   = c("A", "B"),
  N         = c(6000, 4000),
  sd        = c(12, 25),
  mean      = c(40, 70),
  unit_cost = c(2, 5),
  nu        = c(0.4, 0.6)
)
prec_twophase(frame, n_phase1 = 2000, phase1_cost = 1)
#> Sampling precision for twophase
#> n = 2000
#> se = 0.6514, moe = NA, cv = 0.0125