Skip to content

Instantly share code, notes, and snippets.

@pbiecek
Created January 18, 2015 21:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pbiecek/1c2038a4307ad33200d1 to your computer and use it in GitHub Desktop.
Save pbiecek/1c2038a4307ad33200d1 to your computer and use it in GitHub Desktop.
badanie <- studenci %>%
select(CNT, ## kraj
SCHOOLID, ## identyfikator szkoły
ST04Q01, ## płeć
PV1MATH:PV5MATH, ## wartości PV
W_FSTR1:W_FSTR80, ## wagi replikacyjne
W_FSTUWT ## wagi ostateczne
) %>%
group_by(CNT) %>%
do(schemat = svrepdesign(ids= ~SCHOOLID,
type = 'Fay',
weight = ~ W_FSTUWT,
repweight = 'W_FSTR[1-80]+',
data = .,
rho = 0.5))
### podgląd obiektu
badanie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment