SlideShare une entreprise Scribd logo
1  sur  25
PhD Talk:
Regression analysis using Stata: A hands on approach
By:
Dr. Redhwan Al-Dhamari
Bakr Ali Al-Gamrh
Presentation Outline
 introduction
 Data Structure
 Cross-Sectional Data
 Regression Diagnostics
 Other Regression Commands
 Presenting Your Results
 Suggested readings
Introduction
What is Stata?
Stata is a general-purpose statistical software package created in 1985
by Stata Corp. Most of its users work in research, especially in the
fields of economics, sociology, political science, biomedicine and
epidemiology.
Why Stata?
 Stata has been less popular than its market competitors, such as
SPSS and SAS, but it gaining in popularity every year.
 It is particularly user-friendly when it comes to analyzing
complicated data sets.
Introduction (Cont’d)
How is Stata different?
 The commands in Stata are much more intuitive and less fussy
regarding punctuation.
 In Stata, it is possible to download new applications that were
written by users to perform specific tasks, and use them as
commands.
 Dealing with longitudinal data sets with various different types of file
structures in Stata is much quicker and easier.
Introduction (Cont’d)
Windows in Stata and what they do
 the command window
The review window
The variables window
The results window
Do files
Log files
 data editor and data browser
•Set mem 50m
log using name.log,replace
Log close
Log off
Log on
Data structure
 Cross-sectional data
 Panel data
 Time series data
Cross-sectional data
Summary statistics
 Sum var
 Sum var, sep(0)
 Sum var, detail
 Tabstat var, s(n me sd min max ske kur) c(s)
 Tabstat var, s(n me sd min min max) by (var)
Cross-sectional data
Correlations
Pearson’s product-moment correlation (r)
 It focuses on mean values
 it is used for interval variables
 Values below 0.30 suggest there is little association between the variables
(Hinkle et al. 1988).
 pwcorr var, obs sig star (0.05)
Spearman’s correlation (rho)
 it calculated based on ranks
 it used for ordinal variables
 spearman var, stats (rho obs p) star (0.05)
(Cont’d)
Cross-sectional data
Differences in Means and medians
Independent two-sample t-test
 it helps to know if there are mean differences in data that might be interesting to pursue
with multivariate analysis
 there can not be more than two groups on witch you are comparing the mean value-the
grouping variable must be dichotomous.
 ttest var, by (grouping var)
 sdtest var, by (grouping var)
Mann-Whitney U-test
 it is used to examine the rank differences across some characteristic for two groups.
 ranksum var, by (grouping var)
Paired t-test and Wilcoxon signed rank test
 ttest ind07==ind08
 signrank ind07==ind08
(Cont’d)
Cross-sectional data
 Theory of regression analysis
What is linear regression analysis?
• Finding the relationship between a dependent and
an independent variable.
Y= α + bx + e
(Cont’d)
Regression diagnostics
 Normality
 Heteroscedasticity
 Multicollinearity
 Model specification
Regression diagnostics (Cont’d).
Normality refers to normal distribution of the error terms
Testing the residuals for normality
Shapiro-Wilk W test
 Swilk res
Smirnov-Kolmogorov test
Sktest res
Testing the normality for a variable
Sktest var
Tabstat var, s(sk kur)
Regression diagnostics (Cont’d).
Outliers detection
Outlier detection involves the determination whether the residuals
(errors=predicted-actual) is an extreme negative or positive value.
Standardized residuals
 predict residstd, rstandard
 List residstd
 if the standardized residuals have values in excess of 3.5 and -3.5 they are
outliers.
Cook’s D
 Predict cook, cooksd
 List cook. If cook > 4/n
Winsorization
 Winsor2 (var), replace cuts (1 0.99)
Regression diagnostics (Cont’d).
Heteroskedasticity
Refers to a situation in which the error terms of the model have no
constant variances. This problem should be addressed as sometimes can
make significant variables appear to be statistically insignificant.
Testing the residuals for heteroskedasticity
 hettest
Solving heteroskedasticity problem
 reg var, robust
Regression diagnostics (Cont’d).
Multicollinearity
Refers to a high correlation of two or more independent variables in a
regression model. This problem may affect the regression estimates.
Testing for multicollinearity
 vif
Solving multicollinearity problem
 Centering or standardizing approach
Regression diagnostics (Cont’d).
Model specification
refer to including all relevant and excluding all irrelevant variables.
Testing for model specification
 ovtest
 Linktest
Other regression commands
 Logistic Regression
 logistic var
 Probit Regression is the other main method for analysing binary
dependent variables. Whereas logit (or logistic) regression is based on log
odds, probit uses the cumulative normal probability distribution.
 probit var
 Poisson Regression is for a count (non-negative integers)
dependent variable
 poission var
Presenting your results
For descriptive and correlation results
 Edit copy table
 Open a blank word document and press paste
 Table convert text to table
For regression results
 esttab
 esttab, se ar2
• The difference between cross-sectional, time
series and panel data
• Why panel?
• More observations mean more information
• Certain structure of the data allow better use
of the data
• Data need to be set as panel in Stata (time
and individual dimensions)
• Summary statistics for panel, xtsum, xtdes …
• Fixed effects
• Random effects models
• Pooled OLS
• Hausman test
• Breusch and Pagan Lagrangian Multiplier (LM)
test
• Modified Wald test for groupwise heteroskedasticity
• Wooldridge test for autocorrelation in panel data
• Pesaran's test of cross sectional dependence
Suggested readings
 Gujarati & Porter (2010) “Essentials of econometrics”, McGraw-Hill,
New York.
 Cameron & Trivedi (2009) “ Microeconometrics Using Stata”, A Stata
Press Publication, Stata LP, College Station, Texas, USA.
 Pevaline & Robson (2009) “the Stata Survival Manual”, Two Penn
Plaza, New York, USA.
 Woorldridge (2003) “ Introductory econometrics: A modern approach
(2nd Ed.), Thomsom South-Western, USA.
Thank you for Listening

Contenu connexe

Tendances

1.7 data reduction
1.7 data reduction1.7 data reduction
1.7 data reductionKrish_ver2
 
CART – Classification & Regression Trees
CART – Classification & Regression TreesCART – Classification & Regression Trees
CART – Classification & Regression TreesHemant Chetwani
 
3. chapter iii(aggregate data)
3. chapter iii(aggregate data)3. chapter iii(aggregate data)
3. chapter iii(aggregate data)Chhom Karath
 
Data mining technique for classification and feature evaluation using stream ...
Data mining technique for classification and feature evaluation using stream ...Data mining technique for classification and feature evaluation using stream ...
Data mining technique for classification and feature evaluation using stream ...ranjit banshpal
 
Data Mining: Concepts and Techniques (3rd ed.) - Chapter 3 preprocessing
Data Mining:  Concepts and Techniques (3rd ed.)- Chapter 3 preprocessingData Mining:  Concepts and Techniques (3rd ed.)- Chapter 3 preprocessing
Data Mining: Concepts and Techniques (3rd ed.) - Chapter 3 preprocessingSalah Amean
 
Lect8 Classification & prediction
Lect8 Classification & predictionLect8 Classification & prediction
Lect8 Classification & predictionhktripathy
 
Decision tree induction
Decision tree inductionDecision tree induction
Decision tree inductionthamizh arasi
 
COMPARISION OF PERCENTAGE ERROR BY USING IMPUTATION METHOD ON MID TERM EXAMIN...
COMPARISION OF PERCENTAGE ERROR BY USING IMPUTATION METHOD ON MID TERM EXAMIN...COMPARISION OF PERCENTAGE ERROR BY USING IMPUTATION METHOD ON MID TERM EXAMIN...
COMPARISION OF PERCENTAGE ERROR BY USING IMPUTATION METHOD ON MID TERM EXAMIN...ijiert bestjournal
 
SELECTED DATA PREPARATION METHODS
SELECTED DATA PREPARATION METHODSSELECTED DATA PREPARATION METHODS
SELECTED DATA PREPARATION METHODSKAMIL MAJEED
 
CART: Not only Classification and Regression Trees
CART: Not only Classification and Regression TreesCART: Not only Classification and Regression Trees
CART: Not only Classification and Regression TreesMarc Garcia
 
2.1 Data Mining-classification Basic concepts
2.1 Data Mining-classification Basic concepts2.1 Data Mining-classification Basic concepts
2.1 Data Mining-classification Basic conceptsKrish_ver2
 
Introduction to dm and dw
Introduction to dm and dwIntroduction to dm and dw
Introduction to dm and dwANUSUYA T K
 
Stata statistics
Stata statisticsStata statistics
Stata statisticsizahn
 
Data preprocessing in Data Mining
Data preprocessing in Data MiningData preprocessing in Data Mining
Data preprocessing in Data MiningDHIVYADEVAKI
 
Data Integration and Transformation in Data mining
Data Integration and Transformation in Data miningData Integration and Transformation in Data mining
Data Integration and Transformation in Data miningkavitha muneeshwaran
 
1.8 discretization
1.8 discretization1.8 discretization
1.8 discretizationKrish_ver2
 

Tendances (20)

1.7 data reduction
1.7 data reduction1.7 data reduction
1.7 data reduction
 
CART – Classification & Regression Trees
CART – Classification & Regression TreesCART – Classification & Regression Trees
CART – Classification & Regression Trees
 
1234
12341234
1234
 
3. chapter iii(aggregate data)
3. chapter iii(aggregate data)3. chapter iii(aggregate data)
3. chapter iii(aggregate data)
 
Data mining technique for classification and feature evaluation using stream ...
Data mining technique for classification and feature evaluation using stream ...Data mining technique for classification and feature evaluation using stream ...
Data mining technique for classification and feature evaluation using stream ...
 
Data Mining: Concepts and Techniques (3rd ed.) - Chapter 3 preprocessing
Data Mining:  Concepts and Techniques (3rd ed.)- Chapter 3 preprocessingData Mining:  Concepts and Techniques (3rd ed.)- Chapter 3 preprocessing
Data Mining: Concepts and Techniques (3rd ed.) - Chapter 3 preprocessing
 
Lect8 Classification & prediction
Lect8 Classification & predictionLect8 Classification & prediction
Lect8 Classification & prediction
 
Decision tree induction
Decision tree inductionDecision tree induction
Decision tree induction
 
Data Mining: Data Preprocessing
Data Mining: Data PreprocessingData Mining: Data Preprocessing
Data Mining: Data Preprocessing
 
COMPARISION OF PERCENTAGE ERROR BY USING IMPUTATION METHOD ON MID TERM EXAMIN...
COMPARISION OF PERCENTAGE ERROR BY USING IMPUTATION METHOD ON MID TERM EXAMIN...COMPARISION OF PERCENTAGE ERROR BY USING IMPUTATION METHOD ON MID TERM EXAMIN...
COMPARISION OF PERCENTAGE ERROR BY USING IMPUTATION METHOD ON MID TERM EXAMIN...
 
SELECTED DATA PREPARATION METHODS
SELECTED DATA PREPARATION METHODSSELECTED DATA PREPARATION METHODS
SELECTED DATA PREPARATION METHODS
 
CART: Not only Classification and Regression Trees
CART: Not only Classification and Regression TreesCART: Not only Classification and Regression Trees
CART: Not only Classification and Regression Trees
 
Data Preprocessing
Data PreprocessingData Preprocessing
Data Preprocessing
 
2.1 Data Mining-classification Basic concepts
2.1 Data Mining-classification Basic concepts2.1 Data Mining-classification Basic concepts
2.1 Data Mining-classification Basic concepts
 
Introduction to dm and dw
Introduction to dm and dwIntroduction to dm and dw
Introduction to dm and dw
 
Stata statistics
Stata statisticsStata statistics
Stata statistics
 
Data preprocessing in Data Mining
Data preprocessing in Data MiningData preprocessing in Data Mining
Data preprocessing in Data Mining
 
Data Integration and Transformation in Data mining
Data Integration and Transformation in Data miningData Integration and Transformation in Data mining
Data Integration and Transformation in Data mining
 
Ch06
Ch06Ch06
Ch06
 
1.8 discretization
1.8 discretization1.8 discretization
1.8 discretization
 

En vedette

이동현 박사과정지원자 발표자료(수정)
이동현 박사과정지원자 발표자료(수정)이동현 박사과정지원자 발표자료(수정)
이동현 박사과정지원자 발표자료(수정)madeby2
 
Analysis of the Propensity to Earn Non-Wage Income in America
Analysis of the Propensity to Earn Non-Wage Income in AmericaAnalysis of the Propensity to Earn Non-Wage Income in America
Analysis of the Propensity to Earn Non-Wage Income in AmericaEmilio José Calle Celi
 
Panel data methods for microeconometrics using Stata! Short and good one :)
Panel data methods for microeconometrics using Stata! Short and good one :)Panel data methods for microeconometrics using Stata! Short and good one :)
Panel data methods for microeconometrics using Stata! Short and good one :)Wondmagegn Tafesse
 
Planning at national level
Planning at national levelPlanning at national level
Planning at national levelgaya3lavanya92
 
How to create a really GOOD Presentation
How to create a really GOOD PresentationHow to create a really GOOD Presentation
How to create a really GOOD PresentationTasos Veliadis
 
STATA - Panel Regressions
STATA - Panel RegressionsSTATA - Panel Regressions
STATA - Panel Regressionsstata_org_uk
 
5 easy ways to create fabulous slides
5 easy ways to create fabulous slides5 easy ways to create fabulous slides
5 easy ways to create fabulous slidesNed Potter
 
Good PowerPoint Design - for business presenters
Good PowerPoint Design - for business presentersGood PowerPoint Design - for business presenters
Good PowerPoint Design - for business presentersAlexander Osterwalder
 
5 Presentation Design Mistakes to Avoid
5 Presentation Design Mistakes to Avoid5 Presentation Design Mistakes to Avoid
5 Presentation Design Mistakes to AvoidPresentation Panda
 
The 4 Most Important PowerPoint RULES for Successful Presentations
The 4 Most Important PowerPoint RULES for Successful PresentationsThe 4 Most Important PowerPoint RULES for Successful Presentations
The 4 Most Important PowerPoint RULES for Successful PresentationsNed Potter
 
26 Time Management Hacks I Wish I'd Known at 20
26 Time Management Hacks I Wish I'd Known at 2026 Time Management Hacks I Wish I'd Known at 20
26 Time Management Hacks I Wish I'd Known at 20Étienne Garbugli
 
Train The Trainer Power Point Presentation
Train The Trainer   Power Point PresentationTrain The Trainer   Power Point Presentation
Train The Trainer Power Point Presentationpreethi_madhan
 
10 Powerful Body Language Tips for your next Presentation
10 Powerful Body Language Tips for your next Presentation10 Powerful Body Language Tips for your next Presentation
10 Powerful Body Language Tips for your next PresentationSOAP Presentations
 
Crap. The Content Marketing Deluge.
Crap. The Content Marketing Deluge.Crap. The Content Marketing Deluge.
Crap. The Content Marketing Deluge.Velocity Partners
 
What Would Steve Do? 10 Lessons from the World's Most Captivating Presenters
What Would Steve Do? 10 Lessons from the World's Most Captivating PresentersWhat Would Steve Do? 10 Lessons from the World's Most Captivating Presenters
What Would Steve Do? 10 Lessons from the World's Most Captivating PresentersHubSpot
 

En vedette (19)

이동현 박사과정지원자 발표자료(수정)
이동현 박사과정지원자 발표자료(수정)이동현 박사과정지원자 발표자료(수정)
이동현 박사과정지원자 발표자료(수정)
 
Methodology: Quantile regression panel data for Bolsa Familia
Methodology: Quantile regression panel data for Bolsa FamiliaMethodology: Quantile regression panel data for Bolsa Familia
Methodology: Quantile regression panel data for Bolsa Familia
 
Spatial inclusion in Africa: Learning from Brazil
Spatial inclusion in Africa: Learning from BrazilSpatial inclusion in Africa: Learning from Brazil
Spatial inclusion in Africa: Learning from Brazil
 
Analysis of the Propensity to Earn Non-Wage Income in America
Analysis of the Propensity to Earn Non-Wage Income in AmericaAnalysis of the Propensity to Earn Non-Wage Income in America
Analysis of the Propensity to Earn Non-Wage Income in America
 
Panel data methods for microeconometrics using Stata! Short and good one :)
Panel data methods for microeconometrics using Stata! Short and good one :)Panel data methods for microeconometrics using Stata! Short and good one :)
Panel data methods for microeconometrics using Stata! Short and good one :)
 
Panel data
Panel dataPanel data
Panel data
 
Planning at national level
Planning at national levelPlanning at national level
Planning at national level
 
How to create a really GOOD Presentation
How to create a really GOOD PresentationHow to create a really GOOD Presentation
How to create a really GOOD Presentation
 
STATA - Panel Regressions
STATA - Panel RegressionsSTATA - Panel Regressions
STATA - Panel Regressions
 
5 easy ways to create fabulous slides
5 easy ways to create fabulous slides5 easy ways to create fabulous slides
5 easy ways to create fabulous slides
 
Panel data analysis
Panel data analysisPanel data analysis
Panel data analysis
 
Good PowerPoint Design - for business presenters
Good PowerPoint Design - for business presentersGood PowerPoint Design - for business presenters
Good PowerPoint Design - for business presenters
 
5 Presentation Design Mistakes to Avoid
5 Presentation Design Mistakes to Avoid5 Presentation Design Mistakes to Avoid
5 Presentation Design Mistakes to Avoid
 
The 4 Most Important PowerPoint RULES for Successful Presentations
The 4 Most Important PowerPoint RULES for Successful PresentationsThe 4 Most Important PowerPoint RULES for Successful Presentations
The 4 Most Important PowerPoint RULES for Successful Presentations
 
26 Time Management Hacks I Wish I'd Known at 20
26 Time Management Hacks I Wish I'd Known at 2026 Time Management Hacks I Wish I'd Known at 20
26 Time Management Hacks I Wish I'd Known at 20
 
Train The Trainer Power Point Presentation
Train The Trainer   Power Point PresentationTrain The Trainer   Power Point Presentation
Train The Trainer Power Point Presentation
 
10 Powerful Body Language Tips for your next Presentation
10 Powerful Body Language Tips for your next Presentation10 Powerful Body Language Tips for your next Presentation
10 Powerful Body Language Tips for your next Presentation
 
Crap. The Content Marketing Deluge.
Crap. The Content Marketing Deluge.Crap. The Content Marketing Deluge.
Crap. The Content Marketing Deluge.
 
What Would Steve Do? 10 Lessons from the World's Most Captivating Presenters
What Would Steve Do? 10 Lessons from the World's Most Captivating PresentersWhat Would Steve Do? 10 Lessons from the World's Most Captivating Presenters
What Would Steve Do? 10 Lessons from the World's Most Captivating Presenters
 

Similaire à Accounting serx

Btm8107 8 week2 activity understanding and exploring assumptions a+ work
Btm8107 8 week2 activity understanding and exploring assumptions a+ workBtm8107 8 week2 activity understanding and exploring assumptions a+ work
Btm8107 8 week2 activity understanding and exploring assumptions a+ workcoursesexams1
 
IoT Lecture MaterialLecture Material.pdf
IoT Lecture MaterialLecture Material.pdfIoT Lecture MaterialLecture Material.pdf
IoT Lecture MaterialLecture Material.pdfsaimawarsi
 
UNIT - 5 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON
UNIT - 5 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHONUNIT - 5 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON
UNIT - 5 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHONNandakumar P
 
Machine Learning.pdf
Machine Learning.pdfMachine Learning.pdf
Machine Learning.pdfBeyaNasr1
 
7 qc tools
7 qc tools7 qc tools
7 qc toolskmsonam
 
Pasw statistics 18 brief guide
Pasw statistics 18 brief guidePasw statistics 18 brief guide
Pasw statistics 18 brief guideTRPC
 
Topic 4 intro spss_stata
Topic 4 intro spss_stataTopic 4 intro spss_stata
Topic 4 intro spss_stataSM Lalon
 
SPSS statistics - get help using SPSS
SPSS statistics - get help using SPSSSPSS statistics - get help using SPSS
SPSS statistics - get help using SPSScsula its training
 
Python for Data Analysis: A Comprehensive Guide
Python for Data Analysis: A Comprehensive GuidePython for Data Analysis: A Comprehensive Guide
Python for Data Analysis: A Comprehensive GuideAivada
 
5. working on data using R -Cleaning, filtering ,transformation, Sampling
5. working on data using R -Cleaning, filtering ,transformation, Sampling5. working on data using R -Cleaning, filtering ,transformation, Sampling
5. working on data using R -Cleaning, filtering ,transformation, Samplingkrishna singh
 
data analysis techniques and statistical softwares
data analysis techniques and statistical softwaresdata analysis techniques and statistical softwares
data analysis techniques and statistical softwaresDr.ammara khakwani
 
How to prepare for a data science interview?
How to prepare for a data science interview?How to prepare for a data science interview?
How to prepare for a data science interview?Edology
 
SOC2002 Lecture 11
SOC2002 Lecture 11SOC2002 Lecture 11
SOC2002 Lecture 11Bonnie Green
 
KIT-601 Lecture Notes-UNIT-2.pdf
KIT-601 Lecture Notes-UNIT-2.pdfKIT-601 Lecture Notes-UNIT-2.pdf
KIT-601 Lecture Notes-UNIT-2.pdfDr. Radhey Shyam
 
Review of "Survey Research Methods & Design in Psychology"
Review of "Survey Research Methods & Design in Psychology"Review of "Survey Research Methods & Design in Psychology"
Review of "Survey Research Methods & Design in Psychology"James Neill
 

Similaire à Accounting serx (20)

Spss
SpssSpss
Spss
 
Btm8107 8 week2 activity understanding and exploring assumptions a+ work
Btm8107 8 week2 activity understanding and exploring assumptions a+ workBtm8107 8 week2 activity understanding and exploring assumptions a+ work
Btm8107 8 week2 activity understanding and exploring assumptions a+ work
 
IoT Lecture MaterialLecture Material.pdf
IoT Lecture MaterialLecture Material.pdfIoT Lecture MaterialLecture Material.pdf
IoT Lecture MaterialLecture Material.pdf
 
UNIT - 5 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON
UNIT - 5 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHONUNIT - 5 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON
UNIT - 5 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON
 
Machine Learning.pdf
Machine Learning.pdfMachine Learning.pdf
Machine Learning.pdf
 
SPSS-SYNTAX
SPSS-SYNTAXSPSS-SYNTAX
SPSS-SYNTAX
 
Uses of SPSS and Excel to analyze data
Uses of SPSS and Excel   to analyze dataUses of SPSS and Excel   to analyze data
Uses of SPSS and Excel to analyze data
 
7 qc tools
7 qc tools7 qc tools
7 qc tools
 
Pasw statistics 18 brief guide
Pasw statistics 18 brief guidePasw statistics 18 brief guide
Pasw statistics 18 brief guide
 
Topic 4 intro spss_stata
Topic 4 intro spss_stataTopic 4 intro spss_stata
Topic 4 intro spss_stata
 
SPSS statistics - get help using SPSS
SPSS statistics - get help using SPSSSPSS statistics - get help using SPSS
SPSS statistics - get help using SPSS
 
Python for Data Analysis: A Comprehensive Guide
Python for Data Analysis: A Comprehensive GuidePython for Data Analysis: A Comprehensive Guide
Python for Data Analysis: A Comprehensive Guide
 
Spss an introduction
Spss  an introductionSpss  an introduction
Spss an introduction
 
5. working on data using R -Cleaning, filtering ,transformation, Sampling
5. working on data using R -Cleaning, filtering ,transformation, Sampling5. working on data using R -Cleaning, filtering ,transformation, Sampling
5. working on data using R -Cleaning, filtering ,transformation, Sampling
 
data analysis techniques and statistical softwares
data analysis techniques and statistical softwaresdata analysis techniques and statistical softwares
data analysis techniques and statistical softwares
 
How to prepare for a data science interview?
How to prepare for a data science interview?How to prepare for a data science interview?
How to prepare for a data science interview?
 
SOC2002 Lecture 11
SOC2002 Lecture 11SOC2002 Lecture 11
SOC2002 Lecture 11
 
Data analysis
Data analysisData analysis
Data analysis
 
KIT-601 Lecture Notes-UNIT-2.pdf
KIT-601 Lecture Notes-UNIT-2.pdfKIT-601 Lecture Notes-UNIT-2.pdf
KIT-601 Lecture Notes-UNIT-2.pdf
 
Review of "Survey Research Methods & Design in Psychology"
Review of "Survey Research Methods & Design in Psychology"Review of "Survey Research Methods & Design in Psychology"
Review of "Survey Research Methods & Design in Psychology"
 

Dernier

Instant Issue Debit Cards - High School Spirit
Instant Issue Debit Cards - High School SpiritInstant Issue Debit Cards - High School Spirit
Instant Issue Debit Cards - High School Spiritegoetzinger
 
TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...
TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...
TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...ssifa0344
 
Dharavi Russian callg Girls, { 09892124323 } || Call Girl In Mumbai ...
Dharavi Russian callg Girls, { 09892124323 } || Call Girl In Mumbai ...Dharavi Russian callg Girls, { 09892124323 } || Call Girl In Mumbai ...
Dharavi Russian callg Girls, { 09892124323 } || Call Girl In Mumbai ...Pooja Nehwal
 
The Economic History of the U.S. Lecture 25.pdf
The Economic History of the U.S. Lecture 25.pdfThe Economic History of the U.S. Lecture 25.pdf
The Economic History of the U.S. Lecture 25.pdfGale Pooley
 
20240429 Calibre April 2024 Investor Presentation.pdf
20240429 Calibre April 2024 Investor Presentation.pdf20240429 Calibre April 2024 Investor Presentation.pdf
20240429 Calibre April 2024 Investor Presentation.pdfAdnet Communications
 
High Class Call Girls Nashik Maya 7001305949 Independent Escort Service Nashik
High Class Call Girls Nashik Maya 7001305949 Independent Escort Service NashikHigh Class Call Girls Nashik Maya 7001305949 Independent Escort Service Nashik
High Class Call Girls Nashik Maya 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Log your LOA pain with Pension Lab's brilliant campaign
Log your LOA pain with Pension Lab's brilliant campaignLog your LOA pain with Pension Lab's brilliant campaign
Log your LOA pain with Pension Lab's brilliant campaignHenry Tapper
 
Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...
Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...
Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...Pooja Nehwal
 
Instant Issue Debit Cards - School Designs
Instant Issue Debit Cards - School DesignsInstant Issue Debit Cards - School Designs
Instant Issue Debit Cards - School Designsegoetzinger
 
Booking open Available Pune Call Girls Wadgaon Sheri 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Wadgaon Sheri  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Wadgaon Sheri  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Wadgaon Sheri 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
WhatsApp 📞 Call : 9892124323 ✅Call Girls In Chembur ( Mumbai ) secure service
WhatsApp 📞 Call : 9892124323  ✅Call Girls In Chembur ( Mumbai ) secure serviceWhatsApp 📞 Call : 9892124323  ✅Call Girls In Chembur ( Mumbai ) secure service
WhatsApp 📞 Call : 9892124323 ✅Call Girls In Chembur ( Mumbai ) secure servicePooja Nehwal
 
The Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdfThe Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdfGale Pooley
 
Booking open Available Pune Call Girls Talegaon Dabhade 6297143586 Call Hot ...
Booking open Available Pune Call Girls Talegaon Dabhade  6297143586 Call Hot ...Booking open Available Pune Call Girls Talegaon Dabhade  6297143586 Call Hot ...
Booking open Available Pune Call Girls Talegaon Dabhade 6297143586 Call Hot ...Call Girls in Nagpur High Profile
 
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
VIP Call Girls LB Nagar ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With Room...
VIP Call Girls LB Nagar ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With Room...VIP Call Girls LB Nagar ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With Room...
VIP Call Girls LB Nagar ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With Room...Suhani Kapoor
 
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure service
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure serviceCall US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure service
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure servicePooja Nehwal
 
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...ssifa0344
 

Dernier (20)

Instant Issue Debit Cards - High School Spirit
Instant Issue Debit Cards - High School SpiritInstant Issue Debit Cards - High School Spirit
Instant Issue Debit Cards - High School Spirit
 
TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...
TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...
TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...
 
Dharavi Russian callg Girls, { 09892124323 } || Call Girl In Mumbai ...
Dharavi Russian callg Girls, { 09892124323 } || Call Girl In Mumbai ...Dharavi Russian callg Girls, { 09892124323 } || Call Girl In Mumbai ...
Dharavi Russian callg Girls, { 09892124323 } || Call Girl In Mumbai ...
 
The Economic History of the U.S. Lecture 25.pdf
The Economic History of the U.S. Lecture 25.pdfThe Economic History of the U.S. Lecture 25.pdf
The Economic History of the U.S. Lecture 25.pdf
 
(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7
(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7
(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7
 
20240429 Calibre April 2024 Investor Presentation.pdf
20240429 Calibre April 2024 Investor Presentation.pdf20240429 Calibre April 2024 Investor Presentation.pdf
20240429 Calibre April 2024 Investor Presentation.pdf
 
High Class Call Girls Nashik Maya 7001305949 Independent Escort Service Nashik
High Class Call Girls Nashik Maya 7001305949 Independent Escort Service NashikHigh Class Call Girls Nashik Maya 7001305949 Independent Escort Service Nashik
High Class Call Girls Nashik Maya 7001305949 Independent Escort Service Nashik
 
Commercial Bank Economic Capsule - April 2024
Commercial Bank Economic Capsule - April 2024Commercial Bank Economic Capsule - April 2024
Commercial Bank Economic Capsule - April 2024
 
Log your LOA pain with Pension Lab's brilliant campaign
Log your LOA pain with Pension Lab's brilliant campaignLog your LOA pain with Pension Lab's brilliant campaign
Log your LOA pain with Pension Lab's brilliant campaign
 
Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...
Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...
Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...
 
Instant Issue Debit Cards - School Designs
Instant Issue Debit Cards - School DesignsInstant Issue Debit Cards - School Designs
Instant Issue Debit Cards - School Designs
 
Booking open Available Pune Call Girls Wadgaon Sheri 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Wadgaon Sheri  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Wadgaon Sheri  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Wadgaon Sheri 6297143586 Call Hot Ind...
 
Veritas Interim Report 1 January–31 March 2024
Veritas Interim Report 1 January–31 March 2024Veritas Interim Report 1 January–31 March 2024
Veritas Interim Report 1 January–31 March 2024
 
WhatsApp 📞 Call : 9892124323 ✅Call Girls In Chembur ( Mumbai ) secure service
WhatsApp 📞 Call : 9892124323  ✅Call Girls In Chembur ( Mumbai ) secure serviceWhatsApp 📞 Call : 9892124323  ✅Call Girls In Chembur ( Mumbai ) secure service
WhatsApp 📞 Call : 9892124323 ✅Call Girls In Chembur ( Mumbai ) secure service
 
The Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdfThe Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdf
 
Booking open Available Pune Call Girls Talegaon Dabhade 6297143586 Call Hot ...
Booking open Available Pune Call Girls Talegaon Dabhade  6297143586 Call Hot ...Booking open Available Pune Call Girls Talegaon Dabhade  6297143586 Call Hot ...
Booking open Available Pune Call Girls Talegaon Dabhade 6297143586 Call Hot ...
 
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escorts
 
VIP Call Girls LB Nagar ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With Room...
VIP Call Girls LB Nagar ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With Room...VIP Call Girls LB Nagar ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With Room...
VIP Call Girls LB Nagar ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With Room...
 
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure service
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure serviceCall US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure service
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure service
 
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
 

Accounting serx

  • 1. PhD Talk: Regression analysis using Stata: A hands on approach By: Dr. Redhwan Al-Dhamari Bakr Ali Al-Gamrh
  • 2. Presentation Outline  introduction  Data Structure  Cross-Sectional Data  Regression Diagnostics  Other Regression Commands  Presenting Your Results  Suggested readings
  • 3. Introduction What is Stata? Stata is a general-purpose statistical software package created in 1985 by Stata Corp. Most of its users work in research, especially in the fields of economics, sociology, political science, biomedicine and epidemiology. Why Stata?  Stata has been less popular than its market competitors, such as SPSS and SAS, but it gaining in popularity every year.  It is particularly user-friendly when it comes to analyzing complicated data sets.
  • 4. Introduction (Cont’d) How is Stata different?  The commands in Stata are much more intuitive and less fussy regarding punctuation.  In Stata, it is possible to download new applications that were written by users to perform specific tasks, and use them as commands.  Dealing with longitudinal data sets with various different types of file structures in Stata is much quicker and easier.
  • 5. Introduction (Cont’d) Windows in Stata and what they do  the command window The review window The variables window The results window Do files Log files  data editor and data browser •Set mem 50m log using name.log,replace Log close Log off Log on
  • 6. Data structure  Cross-sectional data  Panel data  Time series data
  • 7. Cross-sectional data Summary statistics  Sum var  Sum var, sep(0)  Sum var, detail  Tabstat var, s(n me sd min max ske kur) c(s)  Tabstat var, s(n me sd min min max) by (var)
  • 8. Cross-sectional data Correlations Pearson’s product-moment correlation (r)  It focuses on mean values  it is used for interval variables  Values below 0.30 suggest there is little association between the variables (Hinkle et al. 1988).  pwcorr var, obs sig star (0.05) Spearman’s correlation (rho)  it calculated based on ranks  it used for ordinal variables  spearman var, stats (rho obs p) star (0.05) (Cont’d)
  • 9. Cross-sectional data Differences in Means and medians Independent two-sample t-test  it helps to know if there are mean differences in data that might be interesting to pursue with multivariate analysis  there can not be more than two groups on witch you are comparing the mean value-the grouping variable must be dichotomous.  ttest var, by (grouping var)  sdtest var, by (grouping var) Mann-Whitney U-test  it is used to examine the rank differences across some characteristic for two groups.  ranksum var, by (grouping var) Paired t-test and Wilcoxon signed rank test  ttest ind07==ind08  signrank ind07==ind08 (Cont’d)
  • 10. Cross-sectional data  Theory of regression analysis What is linear regression analysis? • Finding the relationship between a dependent and an independent variable. Y= α + bx + e (Cont’d)
  • 11. Regression diagnostics  Normality  Heteroscedasticity  Multicollinearity  Model specification
  • 12. Regression diagnostics (Cont’d). Normality refers to normal distribution of the error terms Testing the residuals for normality Shapiro-Wilk W test  Swilk res Smirnov-Kolmogorov test Sktest res Testing the normality for a variable Sktest var Tabstat var, s(sk kur)
  • 13. Regression diagnostics (Cont’d). Outliers detection Outlier detection involves the determination whether the residuals (errors=predicted-actual) is an extreme negative or positive value. Standardized residuals  predict residstd, rstandard  List residstd  if the standardized residuals have values in excess of 3.5 and -3.5 they are outliers. Cook’s D  Predict cook, cooksd  List cook. If cook > 4/n Winsorization  Winsor2 (var), replace cuts (1 0.99)
  • 14. Regression diagnostics (Cont’d). Heteroskedasticity Refers to a situation in which the error terms of the model have no constant variances. This problem should be addressed as sometimes can make significant variables appear to be statistically insignificant. Testing the residuals for heteroskedasticity  hettest Solving heteroskedasticity problem  reg var, robust
  • 15. Regression diagnostics (Cont’d). Multicollinearity Refers to a high correlation of two or more independent variables in a regression model. This problem may affect the regression estimates. Testing for multicollinearity  vif Solving multicollinearity problem  Centering or standardizing approach
  • 16. Regression diagnostics (Cont’d). Model specification refer to including all relevant and excluding all irrelevant variables. Testing for model specification  ovtest  Linktest
  • 17. Other regression commands  Logistic Regression  logistic var  Probit Regression is the other main method for analysing binary dependent variables. Whereas logit (or logistic) regression is based on log odds, probit uses the cumulative normal probability distribution.  probit var  Poisson Regression is for a count (non-negative integers) dependent variable  poission var
  • 18. Presenting your results For descriptive and correlation results  Edit copy table  Open a blank word document and press paste  Table convert text to table For regression results  esttab  esttab, se ar2
  • 19. • The difference between cross-sectional, time series and panel data • Why panel? • More observations mean more information • Certain structure of the data allow better use of the data
  • 20.
  • 21. • Data need to be set as panel in Stata (time and individual dimensions) • Summary statistics for panel, xtsum, xtdes … • Fixed effects • Random effects models • Pooled OLS
  • 22. • Hausman test • Breusch and Pagan Lagrangian Multiplier (LM) test • Modified Wald test for groupwise heteroskedasticity • Wooldridge test for autocorrelation in panel data • Pesaran's test of cross sectional dependence
  • 23.
  • 24. Suggested readings  Gujarati & Porter (2010) “Essentials of econometrics”, McGraw-Hill, New York.  Cameron & Trivedi (2009) “ Microeconometrics Using Stata”, A Stata Press Publication, Stata LP, College Station, Texas, USA.  Pevaline & Robson (2009) “the Stata Survival Manual”, Two Penn Plaza, New York, USA.  Woorldridge (2003) “ Introductory econometrics: A modern approach (2nd Ed.), Thomsom South-Western, USA.
  • 25. Thank you for Listening