SlideShare ist ein Scribd-Unternehmen logo
1 von 119
STATA: Data Analysis Software




               STATA
             Merge or Drop Data


             www.STATA.org.uk
               Step-by Step Screenshot Guides
                    to help you use STATA

                Not affiliated with Stata Corp.
Datasets Used in Tutorial




   – Datasets in these tutorials are based on examples in:

        Stock and Watson (2006)
            “Introduction to Econometrics”

   – You can obtain all of the datasets used in these tutorials
     by downloading a STATA command file from
     http://www.stata.org.uk/download-examples.html
Outline



  - Data Management
          • Sort                • Order
          • Keep variables      • Drop variables
          • Keep observations   • Drop observations
          • Merge               • Append
          • If                  • By
          • Encode              • Dates
          • Egen
Outline



  - Data Management
          • Sort                • Order
          • Keep variables      • Drop variables
          • Keep observations   • Drop observations
          • Merge               • Append
          • If                  • By
          • Encode              • Dates
          • Egen
Outline



  - Data Management
          • Sort                • Order
          • Keep variables      • Drop variables
          • Keep observations   • Drop observations
          • Merge               • Append
          • If                  • By
          • Encode              • Dates
          • Egen
Outline



  - Data Management
          • Sort                • Order
          • Keep variables      • Drop variables
          • Keep observations   • Drop observations
          • Merge               • Append
          • If                  • By
          • Encode              • Dates
          • Egen
Outline



  - Data Management
          • Sort                • Order
          • Keep variables      • Drop variables
          • Keep observations   • Drop observations
          • Merge               • Append
          • If                  • By
          • Encode              • Dates
          • Egen
Outline



  - Data Management
          • Sort                • Order
          • Keep variables      • Drop variables
          • Keep observations   • Drop observations
          • Merge               • Append
          • If                  • By
          • Encode              • Dates
          • Egen
Outline



  - Data Management
          • Sort                • Order
          • Keep variables      • Drop variables
          • Keep observations   • Drop observations
          • Merge               • Append
          • If                  • By
          • Encode              • Dates
          • Egen
Outline



  - Data Management
          • Sort                • Order
          • Keep variables      • Drop variables
          • Keep observations   • Drop observations
          • Merge               • Append
          • If                  • By
          • Encode              • Dates
          • Egen
Outline



  - Data Management
          • Sort                • Order
          • Keep variables      • Drop variables
          • Keep observations   • Drop observations
          • Merge               • Append
          • If                  • By
          • Encode              • Dates
          • Egen
Outline



  - Data Management
          • Sort                • Order
          • Keep variables      • Drop variables
          • Keep observations   • Drop observations
          • Merge               • Append
          • If                  • By
          • Encode              • Dates
          • Egen
Outline



  - Data Management
          • Sort                • Order
          • Keep variables      • Drop variables
          • Keep observations   • Drop observations
          • Merge               • Append
          • If                  • By
          • Encode              • Dates
          • Egen
Outline



  - Data Management
          • Sort                • Order
          • Keep variables      • Drop variables
          • Keep observations   • Drop observations
          • Merge               • Append
          • If                  • By
          • Encode              • Dates
          • Egen
Outline



  - Data Management
          • Sort                • Order
          • Keep variables      • Drop variables
          • Keep observations   • Drop observations
          • Merge               • Append
          • If                  • By
          • Encode              • Dates
          • Egen
Outline



  - Data Management
          • Sort                • Order
          • Keep variables      • Drop variables
          • Keep observations   • Drop observations
          • Merge               • Append
          • If                  • By
          • Encode              • Dates
          • Egen
www.STATA.org.uk




   – If you visit www.STATA.org.uk you can download
     tutorials on these other topics:

       Data Management      Statistical Analysis
       Importing Data       Summary Statistics
       Graphs               Linear Regressions
       Presenting Output    Panel Regressions
       Merge or Drop Data   Time Series Analysis
                            Instrumental Variables
                            Probit Analysis

Weitere ähnliche Inhalte

Andere mochten auch

STATA - Instrumental Variables
STATA - Instrumental VariablesSTATA - Instrumental Variables
STATA - Instrumental Variablesstata_org_uk
 
STATA - Panel Regressions
STATA - Panel RegressionsSTATA - Panel Regressions
STATA - Panel Regressionsstata_org_uk
 
Presentation on GMM
Presentation on GMMPresentation on GMM
Presentation on GMMMoses sichei
 
STATA - Probit Analysis
STATA - Probit AnalysisSTATA - Probit Analysis
STATA - Probit Analysisstata_org_uk
 
Lecture 7B Panel Econometrics I 2011
Lecture 7B Panel Econometrics I 2011Lecture 7B Panel Econometrics I 2011
Lecture 7B Panel Econometrics I 2011Moses sichei
 
Using STATA in Survey Data Analysis - Niveen El Zayat
Using STATA in Survey Data Analysis - Niveen El ZayatUsing STATA in Survey Data Analysis - Niveen El Zayat
Using STATA in Survey Data Analysis - Niveen El ZayatEconomic Research Forum
 
Introduction to Stata
Introduction to StataIntroduction to Stata
Introduction to Stataizahn
 
Econometria Salida Stata
Econometria Salida StataEconometria Salida Stata
Econometria Salida StataIlse Herrera
 
Applied Econometrics assignment3
Applied Econometrics assignment3Applied Econometrics assignment3
Applied Econometrics assignment3Chenguang Li
 
The Law School Bubble
The Law School BubbleThe Law School Bubble
The Law School BubbleGaetan Lion
 
Regresion lineal multiple_3
Regresion lineal multiple_3Regresion lineal multiple_3
Regresion lineal multiple_3karinita12
 
Unrestricted var out
Unrestricted var outUnrestricted var out
Unrestricted var outGaetan Lion
 
Quantitative method intro variable_levels_measurement
Quantitative method intro variable_levels_measurementQuantitative method intro variable_levels_measurement
Quantitative method intro variable_levels_measurementKeiko Ono
 
Lecture notes on Johansen cointegration
Lecture notes on Johansen cointegrationLecture notes on Johansen cointegration
Lecture notes on Johansen cointegrationMoses sichei
 
Regression topics
Regression topicsRegression topics
Regression topicsGaetan Lion
 

Andere mochten auch (19)

STATA - Instrumental Variables
STATA - Instrumental VariablesSTATA - Instrumental Variables
STATA - Instrumental Variables
 
STATA - Panel Regressions
STATA - Panel RegressionsSTATA - Panel Regressions
STATA - Panel Regressions
 
Presentation on GMM
Presentation on GMMPresentation on GMM
Presentation on GMM
 
STATA - Probit Analysis
STATA - Probit AnalysisSTATA - Probit Analysis
STATA - Probit Analysis
 
Lecture 7B Panel Econometrics I 2011
Lecture 7B Panel Econometrics I 2011Lecture 7B Panel Econometrics I 2011
Lecture 7B Panel Econometrics I 2011
 
Stata tutorial university of princeton
Stata tutorial university of princetonStata tutorial university of princeton
Stata tutorial university of princeton
 
Introduction to Stata
Introduction to Stata Introduction to Stata
Introduction to Stata
 
Using STATA in Survey Data Analysis - Niveen El Zayat
Using STATA in Survey Data Analysis - Niveen El ZayatUsing STATA in Survey Data Analysis - Niveen El Zayat
Using STATA in Survey Data Analysis - Niveen El Zayat
 
Introduction to Stata
Introduction to StataIntroduction to Stata
Introduction to Stata
 
Econometria Salida Stata
Econometria Salida StataEconometria Salida Stata
Econometria Salida Stata
 
Applied Econometrics assignment3
Applied Econometrics assignment3Applied Econometrics assignment3
Applied Econometrics assignment3
 
The Law School Bubble
The Law School BubbleThe Law School Bubble
The Law School Bubble
 
Regresion lineal multiple_3
Regresion lineal multiple_3Regresion lineal multiple_3
Regresion lineal multiple_3
 
Unrestricted var out
Unrestricted var outUnrestricted var out
Unrestricted var out
 
Quantitative method intro variable_levels_measurement
Quantitative method intro variable_levels_measurementQuantitative method intro variable_levels_measurement
Quantitative method intro variable_levels_measurement
 
Deep Learning
Deep LearningDeep Learning
Deep Learning
 
Lecture notes on Johansen cointegration
Lecture notes on Johansen cointegrationLecture notes on Johansen cointegration
Lecture notes on Johansen cointegration
 
Causality detection
Causality detectionCausality detection
Causality detection
 
Regression topics
Regression topicsRegression topics
Regression topics
 

Kürzlich hochgeladen

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 

Kürzlich hochgeladen (20)

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 

STATA - Merge or Drop Data

  • 1. STATA: Data Analysis Software STATA Merge or Drop Data www.STATA.org.uk Step-by Step Screenshot Guides to help you use STATA Not affiliated with Stata Corp.
  • 2. Datasets Used in Tutorial – Datasets in these tutorials are based on examples in: Stock and Watson (2006) “Introduction to Econometrics” – You can obtain all of the datasets used in these tutorials by downloading a STATA command file from http://www.stata.org.uk/download-examples.html
  • 3. Outline - Data Management • Sort • Order • Keep variables • Drop variables • Keep observations • Drop observations • Merge • Append • If • By • Encode • Dates • Egen
  • 4.
  • 5.
  • 6.
  • 7.
  • 8. Outline - Data Management • Sort • Order • Keep variables • Drop variables • Keep observations • Drop observations • Merge • Append • If • By • Encode • Dates • Egen
  • 9.
  • 10.
  • 11.
  • 12.
  • 13. Outline - Data Management • Sort • Order • Keep variables • Drop variables • Keep observations • Drop observations • Merge • Append • If • By • Encode • Dates • Egen
  • 14.
  • 15.
  • 16.
  • 17.
  • 18. Outline - Data Management • Sort • Order • Keep variables • Drop variables • Keep observations • Drop observations • Merge • Append • If • By • Encode • Dates • Egen
  • 19.
  • 20.
  • 21.
  • 22.
  • 23. Outline - Data Management • Sort • Order • Keep variables • Drop variables • Keep observations • Drop observations • Merge • Append • If • By • Encode • Dates • Egen
  • 24.
  • 25.
  • 26.
  • 27.
  • 28. Outline - Data Management • Sort • Order • Keep variables • Drop variables • Keep observations • Drop observations • Merge • Append • If • By • Encode • Dates • Egen
  • 29.
  • 30.
  • 31.
  • 32.
  • 33. Outline - Data Management • Sort • Order • Keep variables • Drop variables • Keep observations • Drop observations • Merge • Append • If • By • Encode • Dates • Egen
  • 34.
  • 35.
  • 36.
  • 37.
  • 38. Outline - Data Management • Sort • Order • Keep variables • Drop variables • Keep observations • Drop observations • Merge • Append • If • By • Encode • Dates • Egen
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53. Outline - Data Management • Sort • Order • Keep variables • Drop variables • Keep observations • Drop observations • Merge • Append • If • By • Encode • Dates • Egen
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.
  • 65.
  • 66.
  • 67.
  • 68.
  • 69. Outline - Data Management • Sort • Order • Keep variables • Drop variables • Keep observations • Drop observations • Merge • Append • If • By • Encode • Dates • Egen
  • 70.
  • 71.
  • 72.
  • 73.
  • 74. Outline - Data Management • Sort • Order • Keep variables • Drop variables • Keep observations • Drop observations • Merge • Append • If • By • Encode • Dates • Egen
  • 75.
  • 76.
  • 77.
  • 78.
  • 79.
  • 80.
  • 81.
  • 82. Outline - Data Management • Sort • Order • Keep variables • Drop variables • Keep observations • Drop observations • Merge • Append • If • By • Encode • Dates • Egen
  • 83.
  • 84.
  • 85.
  • 86.
  • 87.
  • 88.
  • 89.
  • 90.
  • 91.
  • 92.
  • 93.
  • 94. Outline - Data Management • Sort • Order • Keep variables • Drop variables • Keep observations • Drop observations • Merge • Append • If • By • Encode • Dates • Egen
  • 95.
  • 96.
  • 97.
  • 98.
  • 99.
  • 100.
  • 101.
  • 102.
  • 103.
  • 104.
  • 105.
  • 106.
  • 107.
  • 108. Outline - Data Management • Sort • Order • Keep variables • Drop variables • Keep observations • Drop observations • Merge • Append • If • By • Encode • Dates • Egen
  • 109.
  • 110.
  • 111.
  • 112.
  • 113.
  • 114.
  • 115.
  • 116.
  • 117.
  • 118.
  • 119. www.STATA.org.uk – If you visit www.STATA.org.uk you can download tutorials on these other topics: Data Management Statistical Analysis Importing Data Summary Statistics Graphs Linear Regressions Presenting Output Panel Regressions Merge or Drop Data Time Series Analysis Instrumental Variables Probit Analysis