Stata: Basics, Shortcuts, and Integration with Introduction LaTeX - - PowerPoint PPT Presentation

stata basics shortcuts and integration with
SMART_READER_LITE
LIVE PREVIEW

Stata: Basics, Shortcuts, and Integration with Introduction LaTeX - - PowerPoint PPT Presentation

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Stata: Basics, Shortcuts, and Integration with Introduction LaTeX Stata Syntax and Shortcuts LaTeX Integration Nathan Blascak Temple University September 24, 2014


slide-1
SLIDE 1

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Stata: Basics, Shortcuts, and Integration with LaTeX

Nathan Blascak

Temple University

September 24, 2014

slide-2
SLIDE 2

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Outline

1 Introduction 2 Stata Syntax and Shortcuts 3 LaTeX Integration

slide-3
SLIDE 3

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Introduction

First step: import your data

slide-4
SLIDE 4

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Introduction

First step: import your data File Import Choose file type

slide-5
SLIDE 5

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Introduction

Viewing data

slide-6
SLIDE 6

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Introduction

Viewing data

Type browse

slide-7
SLIDE 7

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Introduction

Viewing data

Type browse

Summary statistics

slide-8
SLIDE 8

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Introduction

Viewing data

Type browse

Summary statistics

Type summarize

slide-9
SLIDE 9

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Introduction

Viewing data

Type browse

Summary statistics

Type summarize

Standard OLS regression

slide-10
SLIDE 10

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Introduction

Viewing data

Type browse

Summary statistics

Type summarize

Standard OLS regression

Type regress dep variable dep variables

slide-11
SLIDE 11

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Syntax and Shortcuts

All commands available from pull-down menus

slide-12
SLIDE 12

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Syntax and Shortcuts

All commands available from pull-down menus Quicker to use the actual commands in the Command window for many procedures

slide-13
SLIDE 13

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Syntax and Shortcuts

The ‘if’ operator

slide-14
SLIDE 14

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Syntax and Shortcuts

The ‘if’ operator The ‘&’ operator

slide-15
SLIDE 15

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Syntax and Shortcuts

The ‘if’ operator The ‘&’ operator The ‘|’ operator

slide-16
SLIDE 16

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Syntax and Shortcuts

Generating variables

using the ‘by’ command

slide-17
SLIDE 17

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Syntax and Shortcuts

Generating variables

using the ‘by’ command using the leads/lags operators

slide-18
SLIDE 18

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Syntax and Shortcuts

Generating variables

using the ‘by’ command using the leads/lags operators

Other useful syntax:

slide-19
SLIDE 19

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Syntax and Shortcuts

Generating variables

using the ‘by’ command using the leads/lags operators

Other useful syntax:

, nolog option

slide-20
SLIDE 20

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Syntax and Shortcuts

Generating variables

using the ‘by’ command using the leads/lags operators

Other useful syntax:

, nolog option quielty: command

slide-21
SLIDE 21

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Syntax and Shortcuts

Generating variables

using the ‘by’ command using the leads/lags operators

Other useful syntax:

, nolog option quielty: command set more off

slide-22
SLIDE 22

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Exporting Stata Tables to LaTex

Can install package to export estimation results to LaTeX

slide-23
SLIDE 23

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Exporting Stata Tables to LaTex

Can install package to export estimation results to LaTeX Not perfect, but a big time saver

slide-24
SLIDE 24

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Exporting Stata Tables to LaTex

Can install package to export estimation results to LaTeX Not perfect, but a big time saver Installation:

slide-25
SLIDE 25

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Exporting Stata Tables to LaTex

Can install package to export estimation results to LaTeX Not perfect, but a big time saver Installation:

use the SSC command in Stata (will download from the web)

slide-26
SLIDE 26

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Exporting Stata Tables to LaTex

Can install package to export estimation results to LaTeX Not perfect, but a big time saver Installation:

use the SSC command in Stata (will download from the web) command: ssc install estout, replace

slide-27
SLIDE 27

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Exporting Stata Tables to LaTex

Can install package to export estimation results to LaTeX Not perfect, but a big time saver Installation:

use the SSC command in Stata (will download from the web) command: ssc install estout, replace type directly in the Command window

slide-28
SLIDE 28

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Using the esttab command

Requires saved results using the estimate store name post-estimation command

slide-29
SLIDE 29

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Using the esttab command

Requires saved results using the estimate store name post-estimation command command:

slide-30
SLIDE 30

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Using the esttab command

Requires saved results using the estimate store name post-estimation command command:

esttab name using file name.tex, options

slide-31
SLIDE 31

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Using the esttab command

Requires saved results using the estimate store name post-estimation command command:

esttab name using file name.tex, options

Will produce a clickable link in the Command window

slide-32
SLIDE 32

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Using the esttab command

Available options:

slide-33
SLIDE 33

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Using the esttab command

Available options:

b(#) - number of significant digits on coefficients

slide-34
SLIDE 34

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Using the esttab command

Available options:

b(#) - number of significant digits on coefficients se(#) - number of significant digits on standard errors

slide-35
SLIDE 35

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Using the esttab command

Available options:

b(#) - number of significant digits on coefficients se(#) - number of significant digits on standard errors replace starlevels() - choose how denote significant results

slide-36
SLIDE 36

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Using the esttab command

Available options:

b(#) - number of significant digits on coefficients se(#) - number of significant digits on standard errors replace starlevels() - choose how denote significant results title - create a title for the table

slide-37
SLIDE 37

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Using the esttab command

Available options:

b(#) - number of significant digits on coefficients se(#) - number of significant digits on standard errors replace starlevels() - choose how denote significant results title - create a title for the table stats(N r2) - choose what summary statistics to display

slide-38
SLIDE 38

Stata: Basics, Shortcuts, and Integration with LaTeX Nathan Blascak Introduction Stata Syntax and Shortcuts LaTeX Integration

Working Example

esttab results using example.tex, b(4) se(4) replace starlevels(∗ 0.10 ∗∗ 0.05 ∗ ∗ ∗ 0.01) title (Example) noabbrev stats(N r2, label(“No. Observations” “R Squared”))