A Brief Introduction to Stata(2)

Slides:



Advertisements
Similar presentations
Session 3 Tables in Stata.
Advertisements

What is Chi-Square? Used to examine differences in the distributions of nominal data A mathematical comparison between expected frequencies and observed.
Hypothesis Testing IV Chi Square.
Chi-square Test of Independence
Getting Started with your data
Quantifying Data.
Problem 1: Relationship between Two Variables-1 (1)
Testing for a Relationship Between 2 Categorical Variables The Chi-Square Test …
Day 1: Getting Started Department of Economics
API-208: Stata Review Session Daniel Yew Mao Lim Harvard University Spring 2013.
Chi-square (χ 2 ) Fenster Chi-Square Chi-Square χ 2 Chi-Square χ 2 Tests of Statistical Significance for Nominal Level Data (Note: can also be used for.
Social Science Research Design and Statistics, 2/e Alfred P. Rovai, Jason D. Baker, and Michael K. Ponton Pearson Chi-Square Contingency Table Analysis.
Reasoning in Psychology Using Statistics Psychology
4 normal probability plots at once par(mfrow=c(2,2)) for(i in 1:4) { qqnorm(dataframe[,1] [dataframe[,2]==i],ylab=“Data quantiles”) title(paste(“yourchoice”,i,sep=“”))}
Two-way Tables And various probabilities.... Two-way table of counts Rows: gender Columns: pierced ears N Y All M F All Cell.
DTC Quantitative Methods Summary of some SPSS commands Weeks 1 & 2, January 2012.
Chi Square Chi square is employed to test the difference between an actual sample and another hypothetical or previously established distribution such.
If sig is less than 0.05 (A) then the test is significant at 95% confidence (B) then the test is significant at 90% confidence (C) then the test is significant.
Advanced Quantitative Techniques
Descriptive Statistics: Tabular and Graphical Methods
Introduction to the SPSS Interface
I. ANOVA revisited & reviewed
Introduction to Marketing Research
Chi-square test.
Test of independence: Contingency Table
CHAPTER 13 Data Processing, Basic Data Analysis, and the Statistical Testing Of Differences Copyright © 2000 by John Wiley & Sons, Inc.
Chi-Square hypothesis testing
Chapter 9: Non-parametric Tests
Lesson 13 - Cleaning Data Lesson 14 - Creating Summary Tables
Lecture #27 Tuesday, November 29, 2016 Textbook: 15.1
Chapter 2 Describing Data: Graphs and Tables
Statistics.
Introduction Introduction to Stata 2016.
PPA 501 – Analytical Methods in Administration
Data Analysis for Two-Way Tables
PivotTables in Excel (2007)
Introduction (1.1) Data - Information collected by individuals and/or organizations to gain knowledge regarding a field or question of interest. Data Sources:
Do Statistical Analysis with Stata
Multivariate Data Summary
Testing for Independence
AP Stats Check In Where we’ve been… Chapter 7…Chapter 8…
Introduction to Stata Spring 2017.
Reasoning in Psychology Using Statistics
Contingency Tables and Association
Chapter 11: Inference for Distributions of Categorical Data
Two Categorical Variables: The Chi-Square Test
Chapter 10 Analyzing the Association Between Categorical Variables
Frequency Tables Statistics 2126.
Introduction (1.1) Data - Information collected by individuals and/or organizations to gain knowledge regarding a field or question of interest. Data Sources:
Statistical Analysis Chi-Square.
Introduction & 1.1: Analyzing categorical data
Analyzing the Association Between Categorical Variables
Stata Basic Course Lab 4.
Producing Descriptive Statistics
Lesson 13 - Cleaning Data Lesson 14 - Creating Summary Tables
Data Processing, Basic Data Analysis, and the
Presentation, data and programs at:
Hsien-Ming Lien Dept of Public Finance, NCCU
Comparing Two Variables
Chapter 26 Comparing Counts.
Reasoning in Psychology Using Statistics
Displaying Data – Charts & Graphs
Inference for Two Way Tables
PROCESSING OF DATA The collected data in research is processed and analyzed to come to some conclusions or to verify the hypothesis made. Processing of.
CMNS November 2011.
Inference for Two-way Tables
Contingency Tables (cross tabs)
Introduction to the SPSS Interface
Analysis of two-way tables
What is Chi-Square and its used in Hypothesis? Kinza malik 1.
Presentation transcript:

A Brief Introduction to Stata(2)

2.1. Listing the variables 2.2. Listing data 2.3. Summarizing data 2.4. Frequency distributions (tabulations) 2.5. Distributions of descriptive statistics (table) 2.6. Missing Values in STATA 2.7. Counting observations

2.1. Listing the variables To see all variables in a dataset, type: . use hh, clear . describe You could abbreviate a list of variables: . describe hcn-fsize . des h*

2.2. Listing data To list the data in a table, type: To lists all variables of the first three observations: . list in 1/3 . list fsize regn if sex==2 & age<20

Relational operators Logical operators > (greater than) ~ (not) < (less than) | (or) == (equal) & (and) >= (greater than or equal) >= (less than or equal) != or ~= (not equal)

2.3. Summarizing data We can obtain basic summary statistics on data by typing: . summarize . summarize fsize age,detail Household surveys generally provide weights to correct for the sampling design differences and sometimes data collection problems: . sum fsize age [aw=rfact]

. sort regn . by regn: sum fsize age [aw=rfact] Or Bysort regn: sum fsize age [aw=rfact]

2.4. Frequency distributions (tabulations) To get frequency distributions and cross tabulations: . tab regn . tab sex if regn==1 To make a two-way distribution: . tab hgc sex To see percentages by row or columns . tab regn sex, col row . tab regn sex, col row chi

2.5. Distributions of descriptive statistics (table command) show the mean of family size and age of household head by region: . table regn, c(mean fsize mean age) you can include at most five statistics. Other options Alternatively, you can use the tabstat command, . tabstat fsize age, statistics (mean) by(region)

a two-way table : . table regn sex, c(mean fsize mean age)

2.6. Missing Values in STATA In STATA, a missing value is represented by a period (.). A missing value is considered larger than any number. The summarize command ignores the observations with missing values and the tabulate command does the same, unless forced include missing values.

2.7. Counting observations . count if age>50

Review .describe hcn-fsize . des h* . list . list in 1/3 . list fsize regn if sex==2 & age<20 . summarize . summarize fsize age,detail . sum fsize age [aw=rfact]

. sort regn . by regn: sum fsize age [aw=rfact] .bysort regn: sum fsize age [aw=rfact] . tab regn . tab sex if regn==1 . tab hgc sex . tab regn sex, col row chi

. table regn, c(mean fsize mean age) . tabstat fsize age, statistics (mean) by(region) . table regn sex, c(mean fsize mean age) . Count . count if age>50

2.Working with data file: Looking at the content