SlideShare a Scribd company logo
1 of 53
STATA: Data Analysis Software




               STATA
               Importing 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 Importing and Editing
      • Import Comma-Separated Value (CSV) Files
      • Generate New Variables
      • Save Dataset
      • Close and Re-open Dataset
      • Create a do-file
      • Use the Help System
      • Challenge
Outline


   – Data Importing and Editing
      • Import Comma-Separated Value (CSV) Files
      • Generate New Variables
      • Save Dataset
      • Close and Re-open Dataset
      • Create a do-file
      • Use the Help System
      • Challenge
Outline


   – Data Importing and Editing
      • Import Comma-Separated Value (CSV) Files
      • Generate New Variables
      • Save Dataset
      • Close and Re-open Dataset
      • Create a do-file
      • Use the Help System
      • Challenge
Outline


   – Data Importing and Editing
      • Import Comma-Separated Value (CSV) Files
      • Generate New Variables
      • Save Dataset
      • Close and Re-open Dataset
      • Create a do-file
      • Use the Help System
      • Challenge
Outline


   – Data Importing and Editing
      • Import Comma-Separated Value (CSV) Files
      • Generate New Variables
      • Save Dataset
      • Close and Re-open Dataset
      • Create a do-file
      • Use the Help System
      • Challenge
Outline


   – Data Importing and Editing
      • Import Comma-Separated Value (CSV) Files
      • Generate New Variables
      • Save Dataset
      • Close and Re-open Dataset
      • Create a do-file
      • Use the Help System
      • Challenge
Other Useful Commands


  – To find help on any other command just type

                     help commandname

  – Other useful data management commands

     –   replace   change contents of variable
     –   drop      remove specified variables
     –   keep      drop other variables except specified
     –   merge     add variables from other dataset
     –   append    add observations from other dataset
Outline


   – Data Importing and Editing
      • Import Comma-Separated Value (CSV) Files
      • Generate New Variables
      • Save Dataset
      • Close and Re-open Dataset
      • Create a do-file
      • Use the Help System
      • Challenge
Data Importing and Editing: Challenge



   Challenge
   – Create a dummy variable for English Learners

   Method
   – Import caschool.csv
   – Generate new variable (HiEl=1 if el_pct>20)
   – Save dataset
   – Create a do-file and copy commands
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

More Related Content

Similar to STATA - Importing Data

Acutate - Using Stored Procedure
Acutate - Using Stored ProcedureAcutate - Using Stored Procedure
Acutate - Using Stored ProcedureAishwarya Savant
 
815cf6bd-9b11-47ea-a18e-8bafa00d2f60.ppt
815cf6bd-9b11-47ea-a18e-8bafa00d2f60.ppt815cf6bd-9b11-47ea-a18e-8bafa00d2f60.ppt
815cf6bd-9b11-47ea-a18e-8bafa00d2f60.pptShahidHussain265137
 
EViews_Student_Version_ppt.ppt
EViews_Student_Version_ppt.pptEViews_Student_Version_ppt.ppt
EViews_Student_Version_ppt.pptRiyadhJack
 
Analytics machine learning in weka
Analytics machine learning in wekaAnalytics machine learning in weka
Analytics machine learning in wekaSudhakar Chavan
 
Take a Trip Into the Forest: A Java Primer on Maps, Trees, and Collections
Take a Trip Into the Forest: A Java Primer on Maps, Trees, and Collections Take a Trip Into the Forest: A Java Primer on Maps, Trees, and Collections
Take a Trip Into the Forest: A Java Primer on Maps, Trees, and Collections Teamstudio
 
Stata Training_EEA.ppt
Stata Training_EEA.pptStata Training_EEA.ppt
Stata Training_EEA.pptselam49
 
Data Discovery With Power Query in excel
Data Discovery With Power Query in excelData Discovery With Power Query in excel
Data Discovery With Power Query in excelKapilSidhpuria3
 
DataDiscoveryWithPowerQuery.pptx
DataDiscoveryWithPowerQuery.pptxDataDiscoveryWithPowerQuery.pptx
DataDiscoveryWithPowerQuery.pptxHARLVED V
 
Django: Advanced Models
Django: Advanced ModelsDjango: Advanced Models
Django: Advanced ModelsYing-An Lai
 
(ATS6-APP09) ELN configuration management with ADM
(ATS6-APP09) ELN configuration management with ADM(ATS6-APP09) ELN configuration management with ADM
(ATS6-APP09) ELN configuration management with ADMBIOVIA
 
(ATS6-APP07) Configuration of Accelrys ELN to Clone to the Latest Template Ve...
(ATS6-APP07) Configuration of Accelrys ELN to Clone to the Latest Template Ve...(ATS6-APP07) Configuration of Accelrys ELN to Clone to the Latest Template Ve...
(ATS6-APP07) Configuration of Accelrys ELN to Clone to the Latest Template Ve...BIOVIA
 
Biml Academy 2 - Lesson 5: Importing source metadata into Biml
Biml Academy 2 - Lesson 5: Importing source metadata into BimlBiml Academy 2 - Lesson 5: Importing source metadata into Biml
Biml Academy 2 - Lesson 5: Importing source metadata into BimlCathrine Wilhelmsen
 
QTP Automation Testing Tutorial 7
QTP Automation Testing Tutorial 7QTP Automation Testing Tutorial 7
QTP Automation Testing Tutorial 7Akash Tyagi
 
Mule data weave_2
Mule data weave_2Mule data weave_2
Mule data weave_2kunal vishe
 
Liquibase migration for data bases
Liquibase migration for data basesLiquibase migration for data bases
Liquibase migration for data basesRoman Uholnikov
 
Performance Monitoring And Tuning In Sql Server 2008 Tsql
Performance Monitoring And Tuning In Sql Server 2008 TsqlPerformance Monitoring And Tuning In Sql Server 2008 Tsql
Performance Monitoring And Tuning In Sql Server 2008 Tsqlcoolajju143
 

Similar to STATA - Importing Data (20)

Acutate - Using Stored Procedure
Acutate - Using Stored ProcedureAcutate - Using Stored Procedure
Acutate - Using Stored Procedure
 
815cf6bd-9b11-47ea-a18e-8bafa00d2f60.ppt
815cf6bd-9b11-47ea-a18e-8bafa00d2f60.ppt815cf6bd-9b11-47ea-a18e-8bafa00d2f60.ppt
815cf6bd-9b11-47ea-a18e-8bafa00d2f60.ppt
 
EViews_Student_Version_ppt.ppt
EViews_Student_Version_ppt.pptEViews_Student_Version_ppt.ppt
EViews_Student_Version_ppt.ppt
 
Analytics machine learning in weka
Analytics machine learning in wekaAnalytics machine learning in weka
Analytics machine learning in weka
 
Take a Trip Into the Forest: A Java Primer on Maps, Trees, and Collections
Take a Trip Into the Forest: A Java Primer on Maps, Trees, and Collections Take a Trip Into the Forest: A Java Primer on Maps, Trees, and Collections
Take a Trip Into the Forest: A Java Primer on Maps, Trees, and Collections
 
004.action query
004.action query004.action query
004.action query
 
Quick dive to pandas
Quick dive to pandasQuick dive to pandas
Quick dive to pandas
 
Mike Resseler - Deduplication in windows server 2012 r2
Mike Resseler - Deduplication in windows server 2012 r2Mike Resseler - Deduplication in windows server 2012 r2
Mike Resseler - Deduplication in windows server 2012 r2
 
Stata Training_EEA.ppt
Stata Training_EEA.pptStata Training_EEA.ppt
Stata Training_EEA.ppt
 
Data Discovery With Power Query in excel
Data Discovery With Power Query in excelData Discovery With Power Query in excel
Data Discovery With Power Query in excel
 
DataDiscoveryWithPowerQuery.pptx
DataDiscoveryWithPowerQuery.pptxDataDiscoveryWithPowerQuery.pptx
DataDiscoveryWithPowerQuery.pptx
 
Django: Advanced Models
Django: Advanced ModelsDjango: Advanced Models
Django: Advanced Models
 
(ATS6-APP09) ELN configuration management with ADM
(ATS6-APP09) ELN configuration management with ADM(ATS6-APP09) ELN configuration management with ADM
(ATS6-APP09) ELN configuration management with ADM
 
QUALITY CENTER SYLLABUS
QUALITY CENTER SYLLABUSQUALITY CENTER SYLLABUS
QUALITY CENTER SYLLABUS
 
(ATS6-APP07) Configuration of Accelrys ELN to Clone to the Latest Template Ve...
(ATS6-APP07) Configuration of Accelrys ELN to Clone to the Latest Template Ve...(ATS6-APP07) Configuration of Accelrys ELN to Clone to the Latest Template Ve...
(ATS6-APP07) Configuration of Accelrys ELN to Clone to the Latest Template Ve...
 
Biml Academy 2 - Lesson 5: Importing source metadata into Biml
Biml Academy 2 - Lesson 5: Importing source metadata into BimlBiml Academy 2 - Lesson 5: Importing source metadata into Biml
Biml Academy 2 - Lesson 5: Importing source metadata into Biml
 
QTP Automation Testing Tutorial 7
QTP Automation Testing Tutorial 7QTP Automation Testing Tutorial 7
QTP Automation Testing Tutorial 7
 
Mule data weave_2
Mule data weave_2Mule data weave_2
Mule data weave_2
 
Liquibase migration for data bases
Liquibase migration for data basesLiquibase migration for data bases
Liquibase migration for data bases
 
Performance Monitoring And Tuning In Sql Server 2008 Tsql
Performance Monitoring And Tuning In Sql Server 2008 TsqlPerformance Monitoring And Tuning In Sql Server 2008 Tsql
Performance Monitoring And Tuning In Sql Server 2008 Tsql
 

Recently uploaded

SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
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
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
[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
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
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
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
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
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Recently uploaded (20)

SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
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
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
[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
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
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...
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

STATA - Importing Data

  • 1. STATA: Data Analysis Software STATA Importing 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 Importing and Editing • Import Comma-Separated Value (CSV) Files • Generate New Variables • Save Dataset • Close and Re-open Dataset • Create a do-file • Use the Help System • Challenge
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12. Outline – Data Importing and Editing • Import Comma-Separated Value (CSV) Files • Generate New Variables • Save Dataset • Close and Re-open Dataset • Create a do-file • Use the Help System • Challenge
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19. Outline – Data Importing and Editing • Import Comma-Separated Value (CSV) Files • Generate New Variables • Save Dataset • Close and Re-open Dataset • Create a do-file • Use the Help System • Challenge
  • 20.
  • 21.
  • 22.
  • 23. Outline – Data Importing and Editing • Import Comma-Separated Value (CSV) Files • Generate New Variables • Save Dataset • Close and Re-open Dataset • Create a do-file • Use the Help System • Challenge
  • 24.
  • 25.
  • 26.
  • 27. Outline – Data Importing and Editing • Import Comma-Separated Value (CSV) Files • Generate New Variables • Save Dataset • Close and Re-open Dataset • Create a do-file • Use the Help System • Challenge
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36. Outline – Data Importing and Editing • Import Comma-Separated Value (CSV) Files • Generate New Variables • Save Dataset • Close and Re-open Dataset • Create a do-file • Use the Help System • Challenge
  • 37. Other Useful Commands – To find help on any other command just type help commandname – Other useful data management commands – replace change contents of variable – drop remove specified variables – keep drop other variables except specified – merge add variables from other dataset – append add observations from other dataset
  • 38.
  • 39.
  • 40. Outline – Data Importing and Editing • Import Comma-Separated Value (CSV) Files • Generate New Variables • Save Dataset • Close and Re-open Dataset • Create a do-file • Use the Help System • Challenge
  • 41. Data Importing and Editing: Challenge Challenge – Create a dummy variable for English Learners Method – Import caschool.csv – Generate new variable (HiEl=1 if el_pct>20) – Save dataset – Create a do-file and copy commands
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53. 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