Survey Documentation and Analysis (SDA) Social Science Research and
91 Slides2.39 MB
Survey Documentation and Analysis (SDA) Social Science Research and Instructional Council (SSRIC) Workshop
Workshop Agenda Overview What is online analysis? Available SDA data sets Statistical procedures (Frequencies, Crosstabs, Means, Regression, Correlation) Subsetting and downloading data sets Teaching resources for SDA 2
Social Science Research and Instructional Council’s Home Page 3
SSRIC Council Oldest CSU affinity group – founded in 1972 Supports the social science data bases (ICPSR, Roper, Field) Promotes use of data analysis in research and teaching Provides the opportunity for students to present their work in a non-threatening, professional setting 4
Activities of the SSRIC Council Social Science Student Symposium – at Fresno State in 2017 in late May – at San Diego State in 2016 Field Faculty Fellowship – selects faculty fellow who can put 12 questions on a statewide Field Poll; proposals due on April 15 Offers workshops on CSU campuses – Social science data bases (ICPSR, Roper, Field) – SPSS (introductory and intermediate) – SDA – Using data in the classroom 5
What is Online Data Analysis? Online data analysis refers to analyzing data over the internet using web-based statistical software The software we’re using is Survey Documentation and Analysis (SDA) which was developed at the University of California, Berkeley 6
Other Statistical Packages SPSS (all CSU campuses have a SPSS site license) PSPP Stata R 7
Advantages of SDA Doesn’t require a site license and only requires a computer with an internet connection Easy to learn. Can show students how to use SDA in 10 minutes or less Has most of the statistical procedures you would need in an introductory statistics course Help menus are clear and useful 8
Disadvantages of SDA Can only be used with data sets that have already been created in a format that can be read by SDA Requires a site license to create SDA data sets More limited in the statistical applications that are available 9
Available SDA Data Sets 10
SDA Data Sets While SDA is an extremely easy statistical package to learn to use, it’s difficult to create SDA data sets So we typically use SDA data sets that have been created for us Fortunately there is quite a bit of high quality data in SDA format 11
Sources for SDA Data Sets SDA Archive located at UC Berkeley ICPSR archive located at the University of Michigan Field Poll archive located at UC Berkeley 12
Statistical Procedures 13
Available Statistical Procedures in SDA Frequencies and crosstabulation Means Regression Correlation matrix Comparison of correlations Logit/Probit regression (not discussed in this workshop) 14
Using SDA Select the data set Look at the codebook Decide what statistical procedure to use Fill in what you want to do Run it 15
Data Set We’re going to use the General Social Survey 1972-2014 Cumulative D ata File To select only the 2014 GSS use the Selection Filter(s) box and enter the following – year(2014) 16
Selecting the 2014 GSS 17
Frequencies 18
Use of Frequencies Used to get frequency distributions, summary statistics, and charts Enter the variable names that you want to use in the ROW box – reliten, pornlaw, sex, age Separate the variables with a comma or a space Click on RUN THE TABLE 19
Frequencies Dialog Box 20
Frequencies Output Options 21
Frequencies Chart Options 22
Frequencies Output for Reliten 23
Summary Statistics for Age 24
Bar Chart for Age 25
Crosstabulation 26
Use of Crosstabulation Crosstabulation is used to explore the relationship between two variables which are usually nominal or ordinal measures Let’s use reliten as our independent variable and pornlaw as our dependent variable to create two bivariate crosstabulations. The dependent variable goes in the ROW box and the independent variable goes in the COLUMN box 27
Crosstabulation Dialog Box 28
Crosstabs Output Options 29
Crosstabs Output for Pornlaw by Reliten 30
Your Turn Let’s run two more bivariate (i.e., two variable) crosstabs – Independent variable: sex – Dependent variables: reliten and pornlaw You can list both dependent variables in the ROW box separated by a comma or blank space Go ahead and run the tables 31
Crosstabulation Output for Pornlaw by Sex 32
Crosstabulation Output for Reliten by Sex 33
What Did We Discover? Reliten is strongly related to pornlaw Sex is also related to both reliten and pornlaw This raises the question that the relationship between reliten and pornlaw could be spurious. Sex is related to both reliten and pornlaw and could be creating the relationship between reliten and pornlaw How do we test this possibility? We’ll run a threevariable crosstabulation with reliten as our independent variable, pornlaw as our dependent variable, and sex as our control variable 34
Crosstabulation Dialog Box for a Three-Variable Table 35
Crosstabulation Output for Pornlaw by Reliten for Males 36
Crosstabulation Output for Pornlaw by Reliten for Females 37
Spuriousness Was the relationship between RELITEN and PORNLAW spurious due to SEX? How do you know? Does that mean that the relationship can never be spurious? 38
Means 39
Use of Means Means can be used in a number of ways: – Calculate and compare means – Independent-sample t test – Analysis of variance 40
Comparing Men and Women in Terms of Television Viewing Let’s start by running the frequency distribution for tvhours You’ll notice that there are a few respondents who watch a lot of television which we will define as 14 or more hours per day These are extreme values which we often call outliers and these outliers can affect our analysis 41
Filtering Out the Outliers So we’re going to filter out these outliers We can do by using the SELECTION FILTER(S) box We already have something in this box – year(2014) We’re going to add an additional filter – tvhours(0-13) This means we want to use only the cases which have values from 0 to 13 in our analysis 42
Using the Selection Filter(s) Box 43
Means Dialog Box The DEPENDENT box is where you put the variable for which you are going to compute means. This is always an interval or ratio variable The ROW box includes the variable that defines the groups you want to compare You can use the COLUMN and CONTROL boxes to break the data down even more finely 44
Means Dialog Box for Tvhours by Sex 45
Means Output Box for Tvhours by Sex 46
Independent Samples t Test The independent-samples t test can be used to determine if the difference between two groups is statistically significant We test the null hypothesis that the mean for the population of all males is equal to the mean for the population of all females If we can reject this null hypothesis, then we have evidence to suggest that our research hypothesis that there is a difference between these two population means is true 47
Independent-Samples t test continued SDA doesn’t have a command for the independent-samples t test but it does have a command for one-way analysis of variance One-way analysis of variance will give you the F statistic When the independent variable is a dichotomy, F is the square of t So all you need to do to get t is to take the square root of F 48
How Do You Tell SDA to do a One-Way Analysis of Variance? Click on OUTPUT OPTIONS and check the ANOVA STATS box You also have to click the box for SRS STANDARD ERRORS. This is because SDA will only carry out the one-way analysis of variance if you assume simple random sampling 49
Output Options for One-Way Analysis of Variance 50
One-Way Analysis of Variance Output 51
Using a Variable That Has More Than Two Categories What if our independent variable has more than two categories? Use one-way analysis of variance Let’s use degree (i.e., respondent’s highest educational degree) as our independent variable 52
Mean Number of Hours Watching Television by Education 53
One-Way Analysis of Variance for Tvhours by Degree 54
Regression 55
Uses of Regression Regression can be used when you have a set of variables which are interval or ratio and you want to determine the effect of one or more of these variables on a dependent variable Note that this does not imply causation Nominal and ordinal variables can be used as independent variables by converting them to dummy variables 56
Bivariate Regression Let’s look at the relationship between the respondent’s age (age) and the amount of television one watches (tvhours) Enter the variables – DEPENDENT BOX -- tvhours – INDEPENDENT BOX -- age 57
Bivariate Regression Dialog Box 58
Bivariate Regression Output 59
Dummy Variable Multiple Regression Now let’s add in another variable -- sex But sex is not a continuous variable. How do we enter a variable like SEX into the regression analysis? Answer: create a dummy variable Dummy variables take on the values of 1 and 0. You can create as many dummy variables as there are categories. Consider the dummy variables for sex – Dummy variable for males (value 1) – 1 if male and 0 if female – Dummy variable for females (value 2) – 1 if female and 0 if male 60
Using Dummy Variables in Regression If a variable has k categories, then you can create k dummy variables But when you enter the dummy variables into regression, you only enter k – 1 dummy variables The dummy variable that you leave out is the comparison group 61
Creating a Dummy Variable sex(m:2) – sex is the name of the variable to want to make into a dummy variable – m indicates the value of the category than you want to omit – 2 indicates that you want to omit the category that has the value of 2 (i.e., females) – Female becomes the comparison group – Run the table 62
Dialog Box for Dummy Variable Multiple Regression 63
Dummy Variable Multiple Regression Output 64
Adding More Variables into the Regression Now let’s add two more variables into the regression – paeduc and educ Now you will have four variables in the regression – age, paeduc, educ, and the dummy variable for sex 65
Multiple Regression Dialog Box for Adding in More Independent Variables 66
Multiple Regression Output for Adding in More Independent Variables 67
Correlation 68
Uses of Correlation Correlation can be use to measure the strength of the relationship between two interval or ratio variables We’re going to limit our discussion to the Pearson Correlation and the Squared Pearson Correlation (sometimes called the Coefficient of Determination) The Pearson Correlation assumes linear relationships 69
Correlation Dialog Box 70
Correlation Output 71
Multicollinearity Multicollinearity occurs when a set of independent variables in a regression analysis are highly intercorrelated When you have high multicollinearity the standard errors of your regression coefficients become less reliable The standard errors of the regression coefficients increase which makes it harder to reject the null hypothesis in your tests of significance 72
Comparison of Correlations Correlation can also be used to compare correlations for different groups of respondents Let’s compare the Pearson correlation between age and tvhours for males and females 73
Comparison of Correlations Dialog Box 74
Comparison of Correlations Output 75
Subsetting and Downloading 76
Subsetting and Downloading Files We’re going to create and download a subset of the GSS cumulative file Let’s start by selecting cases from 2014 Then we’re going to select the following variables – the case identification variables, marital, agewed, divorce, widowed At the end of each intermediate step, click on the next tab 77
Step 1 – File Options 78
Step 2 – Select Cases 79
Step 3 – Select Variables 80
Step 4 – Create Variables 81
Downloading the Files Click on the file(s) you want to download The easiest way is to download all the files by clicking on ZIP ARCHIVE – ALL FILES 82
Step 5 – Downloading the Files 83
Downloaded Files Output 84
Creating a SPSS system file Run the SPSS syntax file to create the SPSS system file You will need to make some changes to the syntax file – On the FILE HANDLE command, indicate the path to the data file that you downloaded – On the SAVE OUTFILE command, indicate the path for the SPSS system file that you want to save – Insert periods at the end of all SPSS commands For more information, see look on the SSRIC’s web page 85
SPSS Syntax File – Part 1 86
SPSS Syntax File – Part 2 87
SPSS System File That You Created 88
Create Your Own System File Subset and download your own GSS system file Run FREQUENCIES for some of your variables 89
Teaching Resources for SDA Data Driven Learning Guides at ICPSR Modules at ICPSR – Investigating Community and Social Capital – Voting Behavior: The 2012 Election Social Science Research and Instructional Center – General Social Survey (2014): Statistics (SDA version) (available in August, 2016) – Field Poll (February, 2013): Gun Control (SDA) (available in August, 2016) 90
Contact Me Ed Nelson CSU, Fresno [email protected] 91