Last chance! 50% off unlimited learning
Sale ends in
Per default, pools surveys starting from current date and going 14 days back. For each pollster within the defined time-frame, only the most recent survey is used.
pool_surveys(
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
)
A tibble
containing survey results for multiple
pollsters as returned by get_surveys
.
Only surveys in the time-window from last_date
to
last_date
- period will be considered for each pollster. Defaults
to current date.
Character vector of pollsters that should be considered for pooling.
See last_date
argument.
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.
Assumed correlation between surveys (of different pollsters). Defaults to 0.5.
Additional weights for individual surveys.
# NOT RUN {
library(coalitions)
library(dplyr)
latest <- get_latest(surveys_sample)
pool_surveys(surveys_sample, last_date=as.Date("2017-09-02"))
# }
Run the code above in your browser using DataLab