INTRODUCTION TO STATA - BERT MILLA
Transcript of INTRODUCTION TO STATA - BERT MILLA
![Page 1: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/1.jpg)
INTRODUCTION TO STATA
NORBERTO E. MILLADepartment of StatisticsVisayas State University
![Page 2: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/2.jpg)
Statistical Packages for Social Sciences (SPSS)
Statistical Analysis Software (SAS)
Stata
Minitab
Statgraphics
Systat
R
Python
![Page 3: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/3.jpg)
general-purpose statistical program with uniquefeatures not found in other packages
takes a simpler approach to statistical analyseswith a single program interface.
technical help, updates, and upgrades are possibleonline
manuals/guides (pdf documentatation) comes withStata installation
![Page 4: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/4.jpg)
available on the three (3) major operatingsystems:
Windows, Macintosh, and Unix
comes in four flavors:
Stata/MP, Stata/SE, Stata/IC, and Small Stata
![Page 5: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/5.jpg)
RESULTS window
VARIABLES
window
COMMAND window
PROPERTIES
window
REVIEW
window
![Page 6: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/6.jpg)
Data files: rows (variables) and columns (observations) of information; have the .dta file extension
Do files: contain set of commands which can be executed together; have the .do file extension
(.ado files contain codes of new Stata commands)
Log files: contain a record of all commands issued and the corresponding output in the Results window (except graphs); have the .smcl (default) or .log file extension
![Page 7: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/7.jpg)
Numeric-purely numbers; black in color
String-contains numbers and/or letters; red incolor
Value labels-internally these are numbers but canbe seen as alphabetic characters on screen; bluein color
![Page 8: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/8.jpg)
Numbers are stored as byte, int, long, float (default), or double
byte, int, and long can hold only integers
![Page 9: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/9.jpg)
Go to the File Menu (User-interface) and select the icon
Then browse to your preferred folder.
Click OK.
![Page 10: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/10.jpg)
![Page 11: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/11.jpg)
the easiest way to enter data directly into Stata is thru theData Editor (Edit).
it looks like a spreadsheet with columns as variables androws as observations.
Data>>Data Editor>>Data Editor (Edit)
Or by clicking the Data Editor (Edit) icon
![Page 12: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/12.jpg)
![Page 13: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/13.jpg)
File>>Import>>Excel spreadsheet (*.xls;*.xlsx)
In the dialog box, Browse to the directory where the files is saved, specify the Worksheet, and check Import first row as variable names box. Click OK.
![Page 14: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/14.jpg)
Press Crtl+C to copy
Open Stata Editor (Edit) and press Ctrl+V to paste
Click Variable names in the dialog box.
Open an Excel File
Highlight all cells with data, including column labels (Cntrl+A)
![Page 15: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/15.jpg)
![Page 16: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/16.jpg)
![Page 17: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/17.jpg)
![Page 18: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/18.jpg)
![Page 19: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/19.jpg)
![Page 20: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/20.jpg)
![Page 21: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/21.jpg)
![Page 22: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/22.jpg)
![Page 23: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/23.jpg)
![Page 24: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/24.jpg)
![Page 25: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/25.jpg)
![Page 26: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/26.jpg)
![Page 27: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/27.jpg)
![Page 28: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/28.jpg)
![Page 29: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/29.jpg)
OUTPUT
![Page 30: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/30.jpg)
![Page 31: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/31.jpg)
![Page 32: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/32.jpg)
![Page 33: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/33.jpg)
![Page 34: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/34.jpg)
99% 52 52 Kurtosis 4.091113
95% 43 50 Skewness 1.190063
90% 40 47 Variance 46.75679
75% 33 44
Largest Std. Dev. 6.837894
50% 28 Mean 29.76543
25% 25 22 Sum of Wgt. 81
10% 23 22 Obs 81
5% 22 21
1% 21 21
Percentiles Smallest
Age of teacher
![Page 35: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/35.jpg)
99% 5 5 Kurtosis 2.427626
95% 4 5 Skewness .8231276
90% 4 5 Variance 1.511111
75% 3 4
Largest Std. Dev. 1.229273
50% 2 Mean 2.037037
25% 1 1 Sum of Wgt. 81
10% 1 1 Obs 81
5% 1 1
1% 1 1
Percentiles Smallest
length_teach_english
![Page 36: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/36.jpg)
Total 2.037037 1.229273
Male 2.285714 1.069045
Female 1.985075 1.261223
sex mean sd
OUTPUT
![Page 37: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/37.jpg)
1.691482
40 and up 3.11111 1
1.268028 .9574271
30-39 1.85 2.25
1.017626 1.130388
20-29 1.78947 2.44444
er Female Male
age_teach sex
RECODE of
OUTPUT
![Page 38: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/38.jpg)
Total 2.037037 1.2292726 81
Male 2.2857143 1.069045 14
Female 1.9850746 1.2612228 67
sex Mean Std. Dev. Freq.
Summary of length_teach_english
OUTPUT
![Page 39: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/39.jpg)
![Page 40: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/40.jpg)
![Page 41: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/41.jpg)
![Page 42: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/42.jpg)
Total 1.915493 1.1051371 71
Male 2.3846154 1.0439078 13
Female 1.8103448 1.0995517 58
sex Mean Std. Dev. Freq.
Summary of length_teach_english
![Page 43: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/43.jpg)
Highlight the entire output and right-click.
Select from one of four ways to copy output from Stata to a Word or Excel document
![Page 44: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/44.jpg)
![Page 45: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/45.jpg)
01
02
03
04
05
0
Num
ber
of te
ache
rs
20-29 30-39 40 and up
Age of teachers
02
04
06
0
Pe
rcen
t
20-29 30-39 40 and up
Age of teachers
![Page 46: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/46.jpg)
1.91 1.92
2.90
01
23
Me
an
len
gth
of se
rvic
e
20-29 30-39 40 and up
Age of teachers
Figure 3. Length of sevice of English teachers by age group
![Page 47: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/47.jpg)
![Page 48: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/48.jpg)
05
10
15
20
Fre
que
ncy
20 25 30 35 40 45 50 55 60Age of teachers
![Page 49: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/49.jpg)
![Page 50: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/50.jpg)
12
34
5
Female Male
Len
gth
of se
rvic
e
![Page 51: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/51.jpg)
![Page 52: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/52.jpg)
12
34
5
20 30 40 50age_teacher
length of service Fitted values
![Page 53: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/53.jpg)
![Page 54: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/54.jpg)
Female Male
Married Single Widower
![Page 55: INTRODUCTION TO STATA - BERT MILLA](https://reader034.fdocuments.in/reader034/viewer/2022050611/627364b9231c6571d4000c3e/html5/thumbnails/55.jpg)
Acock, A. A. (2014). A Gentle Introduction to Stata, 4th Ed. 4905 Lakeway Drive, College Station, Texas 77845: Stata Press
https://stats.idre.ucla.edu/stata/modules/
https://stats.idre.ucla.edu/stata/modules/graph8/intro/introduction-to-graphs-in-stata/