data analysis. load latino american barometer go to library, resources for your subject, library,...

22
DATA ANALYSIS

Upload: jonathan-beach

Post on 28-Mar-2015

217 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: DATA ANALYSIS. Load Latino American Barometer Go to library, resources for your subject, library, then economics, then: Statistics & Data

DATA ANALYSIS

Page 2: DATA ANALYSIS. Load Latino American Barometer Go to library, resources for your subject, library, then economics, then: Statistics & Data

Load Latino American Barometer

• Go to library, resources for your subject, library, then economics, then:

• Statistics & Data

Page 3: DATA ANALYSIS. Load Latino American Barometer Go to library, resources for your subject, library, then economics, then: Statistics & Data

Then:

• • Latinobarometro: Latin American public

opinion survey - to change the language, click on the English/Espagnol tab. Statistical information is available via Data Bank, Documents & Publications tabs - you can also use the Latinobarometro to conduct simple online analyses of statistics. The site also features annual reports.

Page 6: DATA ANALYSIS. Load Latino American Barometer Go to library, resources for your subject, library, then economics, then: Statistics & Data

Choose 2009 and stata/se file -dta• Download Data Files• Data files are available for different years and in

various formats and in both Spanish - the official language - and English.

• Latinobarómetro 2010 NEW • Select a format: [SPSS file - SAV] [Stata/SE file - DTA]

[SAS V11 file] • Latinobarómetro 2009 REVISED (Labelled Region,

City, Policital Parties + Spain's data) • Select a format: [SPSS file - SAV] [Stata/SE file - DTA]

[SAS V11 file]

Page 7: DATA ANALYSIS. Load Latino American Barometer Go to library, resources for your subject, library, then economics, then: Statistics & Data

Then download file• Download file: LATINOBARÓMETRO 2009 - DATA FILE - STATA/SE V11•

Please, take note of the following:The file cannot be redistributed

• The file is compressed using Winzip. You need to decompress it before using it.

• The file contains data at the respondent level. If you want to see ellaborated tables, you should better use the online analysis option.

• In order to open this file, you will need the corresponding statistical program (SPSS, Stata, SAS, and so on)

• Click the following link to begin download:Download file

Page 8: DATA ANALYSIS. Load Latino American Barometer Go to library, resources for your subject, library, then economics, then: Statistics & Data

You are given option, open or save, choose save

• In the browser choose a suitable place to save, could be a flash drive

• Now open laptop/pc search and find the file you have just downloaded. There are 4 files

• 2 in spanish and 2 in english. Two each of data files and the questionnaire.

• Copy/move the english files to another directory

Page 9: DATA ANALYSIS. Load Latino American Barometer Go to library, resources for your subject, library, then economics, then: Statistics & Data

Now open stata

• Click file (top left menu bar) then open from menu

• Locate the data file you have just downloaded and click on it:

Page 10: DATA ANALYSIS. Load Latino American Barometer Go to library, resources for your subject, library, then economics, then: Statistics & Data

It has not worked, not enough memory. Block copy the use

instriuction and….

possible. You have the following alternatives: An attempt was made to increase the number of observations beyond what is currentlyno room to add more observations> 08_eng.dta", clear. use "C:\Users\John\Desktop\courses\masters\LAT_Latinobarometro2008_dta\Latinobarometro_20

2. New update available; type -update all- 1. (/m# option or -set memory-) 1.00 MB allocated to dataNotes:

University of Bath Licensed to: john robert hudson Serial number: 191051479010-user Stata for Windows (network) perpetual license:

979-696-4601 (fax) 979-696-4600 [email protected] 800-STATA-PC http://www.stata.com College Station, Texas 77845 USA 4905 Lakeway Drive Statistics/Data Analysis StataCorp___/ / /___/ / /___/ 10.0 Copyright 1984-2007 /__ / ____/ / ____/ ___ ____ ____ ____ ____ tm

Page 11: DATA ANALYSIS. Load Latino American Barometer Go to library, resources for your subject, library, then economics, then: Statistics & Data

Remember its case sensitive be careful with upper and lower case letters.

set mem 200000use "C:\Users\John\Desktop\courses\masters\LAT_Latinobarometro2008_dta\

Latinobarometro_2008_eng.dta", clear

OK now you have opened the data.

Type summ t*

totperd 22675 .467828 1.421481 0 24 totrech 22675 1.097861 2.249576 0 44 totcuot 22675 16.89204 35.78099 0 99 totrevi 22675 1.341742 2.792861 0 83 tamciud 22675 5.585667 2.076982 1 8 Variable Obs Mean Std. Dev. Min Max

. summ t*

Page 12: DATA ANALYSIS. Load Latino American Barometer Go to library, resources for your subject, library, then economics, then: Statistics & Data

And this describes all data beginning with t

totperd byte %8.0g TOTPERD Total losttotrech byte %8.0g TOTRECH Total rejectionstotcuot byte %8.0g TOTCUOT Control of quotatotrevi byte %8.0g TOTREVI Control of re-interviewtamciud byte %8.0g TAMCIUD Size of town variable name type format label variable label storage display value

. describe t*

Page 13: DATA ANALYSIS. Load Latino American Barometer Go to library, resources for your subject, library, then economics, then: Statistics & Data

Now open questionnaire and we see:

• Q5ST. Do you consider the country’s present economic• situation to be much better, a little better, about• the same, a little worse or much worse than 12 months• ago? (WAIT FOR ANSWER AND TICK ONLY ONE)• Much better.............1• A little better.........2• About the same..........3• A little worse..........4• Much worse..............5• DNK.....................8 DON’T READ• DNA.....................0

Page 14: DATA ANALYSIS. Load Latino American Barometer Go to library, resources for your subject, library, then economics, then: Statistics & Data

• Q28ST. (SHOW CARD 6) Please look at this card and tell• me, how much trust you have in each of the following• groups, institutions or persons: a lot (1), some (2),• a little (3) or no trust (4)? (READ EACH ALTERNATIVE• AND TICK ONE FOR EACH)• L S L N DNK DNA• Q28ST.A. National Congress/• Parliament................ 1 2 3 4 8 0• Q28ST.B. Judiciary.........1 2 3 4 8 0• Q28ST.C. Political parties.1 2 3 4 8 0• Q28ST.D. Armed forces......1 2 3 4 8 0• Q28ST.E. Public• Administration.............1 2 3 4 8 0• Q28ST.F. Local government..1 2 3 4 8 0• Q28ST.G The church.........1 2 3 4 8 0

Page 15: DATA ANALYSIS. Load Latino American Barometer Go to library, resources for your subject, library, then economics, then: Statistics & Data

Lets do a tabulation of two of the variables

• Tab2 Q5ST Q28ST.B.• It did not work.• Look at the data base using data editor• The variables seemes to be called p not Q.

Try it:• describe p5st p28*

Page 16: DATA ANALYSIS. Load Latino American Barometer Go to library, resources for your subject, library, then economics, then: Statistics & Data

Good, so then…..

p28st_g byte %8.0g P28ST.G Confidence in churchp28st_f byte %8.0g P28ST.F Confidence in local government administrationp28st_e byte %8.0g P28ST.E Confidence in publicp28st_d byte %8.0g P28ST.D Confidence in the armed forcesp28st_c byte %8.0g P28ST.C Confidence in political partiesp28st_b byte %8.0g P28ST.B Confidence in the judiciary / Parliamentp28st_a byte %8.0g P28ST.A Confidence in National Congress countryp5st byte %8.0g P5ST Past economic situation of the variable name type format label variable label storage display value

. describe p5st p28*

Page 17: DATA ANALYSIS. Load Latino American Barometer Go to library, resources for your subject, library, then economics, then: Statistics & Data

This is part of the output

tab2 p5st p28st_a

Total 173 1,309 6,059 8,451 5,814 22,675 Don´t know 5 8 42 55 57 211 Much worse 16 119 533 972 1,148 2,931 A little worse 38 244 1,467 2,350 1,748 6,048 About the same 71 325 1,983 2,928 1,691 7,285 A little better 34 444 1,735 1,921 1,017 5,318 Much better 4 169 292 214 145 849 No answer 5 0 7 11 8 33 the country No answer A lot of Some conf Little co No confid Total situation of Confidence in National Congress / Parliament Past economic

Page 18: DATA ANALYSIS. Load Latino American Barometer Go to library, resources for your subject, library, then economics, then: Statistics & Data

Now a histogram

histogram p5st0

.51

1.5

2D

ens

ity

0 2 4 6 8Past economic situation of the country

Page 19: DATA ANALYSIS. Load Latino American Barometer Go to library, resources for your subject, library, then economics, then: Statistics & Data

Exclude don’t knows and no answers

histogram p5st if p5st>0 & p5st<60

12

34

De

nsity

1 2 3 4 5Past economic situation of the country

Page 20: DATA ANALYSIS. Load Latino American Barometer Go to library, resources for your subject, library, then economics, then: Statistics & Data

& with a kernel density

histogram p5st if p5st>0 & p5st<6,kdensity, which is not very interesting

01

23

4D

ens

ity

1 2 3 4 5Past economic situation of the country

Page 21: DATA ANALYSIS. Load Latino American Barometer Go to library, resources for your subject, library, then economics, then: Statistics & Data

A kernel density os like a continuous histogram. Try it on a continuous

variable: age.histogram edad if edad>0 & edad<90,kdensity Interesting

0.0

1.0

2.0

3.0

4D

ens

ity

20 40 60 80 100age

Page 22: DATA ANALYSIS. Load Latino American Barometer Go to library, resources for your subject, library, then economics, then: Statistics & Data