1 / 17

GRA 5917: Input Politics and Public Opinion Data manipulation and descriptive statistics

GRA 5917: Input Politics and Public Opinion Data manipulation and descriptive statistics. Lars C. Monkerud, Department of Public Governance, BI Norwegian School of Management. GRA 5917 Public Opinion and Input Politics. Lecture, August 26th 2010.

trang
Download Presentation

GRA 5917: Input Politics and Public Opinion Data manipulation and descriptive statistics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. GRA 5917: Input Politics and Public Opinion Data manipulation and descriptive statistics Lars C. Monkerud, Department of Public Governance, BI Norwegian School of Management GRA 5917 Public Opinion and Input Politics.Lecture, August 26th 2010

  2. A few notes on data matrices… a simple cross-section

  3. A few notes on data matrices… a simple cross-section columns:characteristics, traits (relationships among which we would be interested in), i.e. variables rows: observations, records, units of analysis (persons, countries, organizations…)

  4. A few notes on data matrices… time-series for one CS …repeated measures for one country on one or several variables … but, organized in the wide format

  5. A few notes on data matrices… panel data …repeated measures for several countries on one or several variables … still organized in the wide format!

  6. A few notes on data matrices… panel data in long format

  7. A few notes on data matrices… panel data in long format The Standardized World Income Inequality (SWIID) panel data set in SPSS (*.sav) format. For (most) analytical purposes data needs to be thus organized, i.e. in the long format (as are all data sets in the course’s PolEc Datasets collection)

  8. SPSS: Basic features and procedures Procedures for data and data set manipulation and data analysis – and much else - available on the menu toolbar. Importantly, we will be looking at: • Outputing descriptives to get to ”know” the data/check on successfulness of data manipulation: Analyze > Descriptive Statistics > Frequencies and Analyze > Descriptive Statistics > Descriptives • Basic procedures to recode variables: Transform > Compute Variable • Procedures to aggregate data: Data > Aggregate • Procedures to match-merge data from two sets: Data > Sort Cases and Data > Merge Files > Add Variables

  9. Excercises (Ia): Descriptive statistics and aggregation • In PolEc Datasets on Blackboard, open the World Values Survey(WVS)*.sav file which contains the individual question responses. In the accompnying codebook for this file you will find a variable (e033) measuring respondents’ political scale self positioning score (left-right). • To check on the quality of data for this variable, perform a simple frequency analysis and also request that the output give measures of the mean, median, mode and the standard deviation for the self positioning variable. Do the data look reasonable (in light of the information in the codebook… and otherwise)? Describe the distribution in the sample. • You would like to retain an aggregate measure of left-right positioning pertaining to the specific time and country for which it was measured. Aggregate the data by extracting the mean and median score of the self positioning variable for every country-year, and save the data in a new file named lr_cy.sav. Request some simple descriptive statisics for this new aggregated variable. Do the data look reasonable? Describe the distribution in the sample.

  10. Excercises (Ib): Descriptive statistics and variable recoding • For convenience the WVS*_AGGR.sav file contains certain aggregates for all individual responses within country-years. Open the said file and… • Request that the mean and the standard deviation of x001_mean (the aggregate within country-years of respondents’ sex) be output. How would you interpret these statistics? • Using the above score (i.e. x001_mean), compute a variable pmale that will show directly the proportion of males sampled in each country-year. To check wether the computation went well, request that the mean and standard deviation of the pmale variable be output. If you compare the output statistics to those found in 2a) , does the new pmale variable seem reasonable?

  11. Excercises (II): Aggregation and computing variables • The median measures in the WVS *AGGR.sav file are simply the response category code medians. For some variables (e.g. x011 - ”number of children”) this is an appropriate estimate of the substantive median. For other (continuous scale) phenomena a more reasonable median measure can be constructed. For instance, this is done in Gable and Hix (2005; see note 6) for the country-year median of the WVS e033 – ”left-right self positioning” variable. • Using the methodology of Gable and Hix (2005), calculate the median for e033 for all combinations of countries and years in the WVS surveys. Save the estimates in a file called lr_md.sav containing country-year observations for the median estimate and the identifiers (cname and year). (Tip: Work with a trivariate individual level file, count individuals in and out of the median category, aggregate and keep aggergates in the file until the final stage…) • Again applying the logic of Gable and Hix (2005) and using x047cs in the WVS: Estimate the local currency median household income in New Zealand in 1998. (Hint: Use select cases and frequncy analysis… and calculate…)

  12. Match-merging data in SPSS Sort data by values of identifier(s)/key variable(s)… in same order in both files to be merged

  13. Match-merging data in SPSS

  14. Match-merging data in SPSS

  15. Match-merging data in SPSS Choose the file you wnat merged with the active dataset

  16. Match-merging data in SPSS Variables that appear on both files, such as the identifier, are not duplicated Use identifier to match cases: Highlight, tick and move into key Variables box Choices depend on whether you’re performing a 1) one-to-one or a one-to-many merge, 2) which records (apart from those with matches) that you want to keep

  17. Excercises (III): Match-merging datasets • Match-merge the two cross-sectional datasets containing democracy and happiness scores (wvs_c.sav and PolityIV_data_c.sav) and perform a simple correlation analysis of the democracy-happiness relationship (Analyze > Correlate > Bivariate). Describe the relationship between democracy and happiness as measured in this analysis. • Match-merge instead the two panel data-sets (PolityIV_data.sav and wvs_cy.sav), matching observations on cname and year.

More Related