Skip to content

Instantly share code, notes, and snippets.

@rohit-gupta
Created July 13, 2017 10:56
Show Gist options
  • Save rohit-gupta/675e4e3e1fb1ec8ca871fbd268185066 to your computer and use it in GitHub Desktop.
Save rohit-gupta/675e4e3e1fb1ec8ca871fbd268185066 to your computer and use it in GitHub Desktop.
Calculate Topline Voting Intention Figure from CCES-2016
library(survey)
load("~/CCES/CCES2016_Common_FirstRelease.RData")
survObj <- svydesign(ids = ~1, data = x, weights = x$commonweight_post)
prop.table(svytable(~CC16_410a, design = survObj))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment