get_pooled: Extract effective sample size for pooled sample

View source: R/pooling.R

get_pooledR Documentation

Extract effective sample size for pooled sample

Description

Given a specified time window (defaults to current day - 14 days). calculate the effective sample size of the pooled sample over multiple pollsters.

Usage

get_pooled(
  surveys,
  last_date = Sys.Date(),
  pollsters = c("allensbach", "emnid", "forsa", "fgw", "gms", "infratest", "dimap",
    "infratestdimap", "insa"),
  period = 14,
  period_extended = NA,
  corr = 0.5,
  weights = NULL
)

Arguments

surveys

A tibble containing survey results for multiple pollsters as returned by get_surveys.

last_date

Only surveys in the time-window from last_date to last_date - period will be considered for each pollster. Defaults to current date.

pollsters

Character vector of pollsters that should be considered for pooling.

period

See last_date argument.

period_extended

Optional. If specified, all surveys in the time-window from last_date - period_extended to last_date - period will also be considered for each pollster, but only after down-weighting them by halving their true sample size.

corr

Assumed correlation between surveys (of different pollsters). Defaults to 0.5.

weights

Additional weights for individual surveys.


coalitions documentation built on Aug. 17, 2022, 5:07 p.m.