Stata for microtargeting using C++ and ODBC
In U.S. political campaigns, the use of propensity scores of voters, predicted attributes, such as partisanship or turnout likelihood, became quite popular in recent years. Such applications, often called microtargeting, range from survey sampling to voter contacts via direct mail, phone, or canvassing. To create such models, analysts first recode the original dataset into statistical software and then create statistical models by using data mining tools. When the mining models are validated against validation data, then analysts need to append propensity scores with a database of millions of voters (such databases typically contain information from voter files, census data, and consumer data). While database software offers a strong capacity to store and manipulate a large volume of data, carrying out basic data transformation such as recoding or creating an index by PCA is not easy using database software. I will demonstrate an example of using Stata as a front-end tool to connect to database software, calculate propensity scores using a C++ plug-in, and return the propensity scores back to the database. This approach combines the strengths of three different platforms: the flexibility of Stata as a general statistical package, the speed of C++ to conduct complex calculations, and the capacity of database software to manipulate gigabytes of data with relative ease.
Year of publication: |
2009-08-11
|
---|---|
Authors: | Aida, Masahiko |
Institutions: | Stata User Group |
Saved in:
Saved in favorites
Similar items by person
-
Charlett, André, (2005)
-
How to face lists with fortitude
Cox, Nicholas J., (2002)
-
Stata and the One-Armed Bandit
Weiss, Martin, (2008)
- More ...