Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

Economics 400 Computer Exercise

Exercise Title: Exercise1: Introduction to StataExercise1:


Introduction to Stata
Name (Last, First): Upadhyay, ShubhamUpadhyay, Shubham

Date: 8/21/2015
PID:72031147672031147
6

Section No. of Course: 001001


Sign the Honor Pledge: Shubham Upadhyay
Describe:
Contains data from \\Client\C$\Users\Shubham
Upadhyay\Downloads\cardata.dta
obs:
155
vars:
12
size:
17,050
storage
variable name
type

display
format

mpg
cylinder
displace
horsepow
accel
year
weight
origin
make
model
price
carmaker

%12.0g
%12.0g
%12.0g
%12.0g
%12.0g
%12.0g
%12.0g
%12.0g
%12s
%14s
%12.0g
%12s

double
double
double
double
double
double
double
double
str12
str14
double
str12

value
label

variable label
cylinders
horsepower

carmakers

summarize mpg, detail:


mpg
------------------------------------------------------------Percentiles
Smallest
1%
16.2
15.5
5%
17.6
16.2
10%
19.1
16.5
Obs
154
25%
22.4
16.9
Sum of Wgt.
154
50%
75%
90%

28.9
34.3
38

Largest
44
44.3

Mean
Std. Dev.

28.79351
7.37721

Variance

54.42323

Page 1 08/21/15 Exercise1: Introduction to Stata Upadhyay, Shubham 720311476

95%
40.9
44.6
99%
44.6
46.6
Stem mpg
Stem-and-leaf plot for mpg

Skewness
Kurtosis

.1115568
2.155094

mpg rounded to nearest multiple of .1


plot in units of .1
15*
16*
17*
18*
19*
20*
21*
22*
23*
24*
25*
26*
27*
28*
29*
30*
31*
32*
33*
34*
35*
36*
37*
38*
39*
40*
41*
42*
43*
44*
45*
46*

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|

5
259
005667
11256
12224489
2222355668
156
034
002567899
023
01448
04668
0000222459
000148
05889
00479
00035689
00012344789
0578
0011234557
017
00000114
000237
00001
014
89
5
14
036
6

Page 2 08/21/15 Exercise1: Introduction to Stata Upadhyay, Shubham 720311476

10

20

mpg
30

40

50

Box Plot of Miles per Gallon

.05

.1

Fraction
.15
.2

.25

.3

Distribution of Car Mileages

15

19

23

27

31
mpg

35

39

43

47

Page 3 08/21/15 Exercise1: Introduction to Stata Upadhyay, Shubham 720311476

Appendix:
-----------------------------------------------------------------------------name: <unnamed>
log: \\Client\C$\Users\Shubham
Upadhyay\Documents\College\Spring 2015\E
> CON 400\Exercise1.log
log type: text
opened on: 27 Jan 2015, 23:25:47
. use "\\Client\C$\Users\Shubham Upadhyay\Downloads\cardata.dta",
clear
. describe
Contains data from \\Client\C$\Users\Shubham
Upadhyay\Downloads\cardata.dta
obs:
155
vars:
12
size:
17,050
storage
variable name
type

display
format

mpg
cylinder
displace
horsepow
accel
year
weight
origin
make
model
price
carmaker

%12.0g
%12.0g
%12.0g
%12.0g
%12.0g
%12.0g
%12.0g
%12.0g
%12s
%14s
%12.0g
%12s

double
double
double
double
double
double
double
double
str12
str14
double
str12

value
label

variable label
cylinders
horsepower

carmakers

Sorted by:

Page 4 08/21/15 Exercise1: Introduction to Stata Upadhyay, Shubham 720311476

. summarize mpg
Variable |
Obs
Mean
Std. Dev.
Min
Max
-------------+-------------------------------------------------mpg |

154

28.79351

7.37721

15.5

46.6

. summarize mpg, detail


mpg
------------------------------------------------------------Percentiles
Smallest
1%
16.2
15.5
5%
17.6
16.2
10%
19.1
16.5
Obs
154
25%
22.4
16.9
Sum of Wgt.
154
50%

28.9

75%
90%
95%
99%

34.3
38
40.9
44.6

Largest
44
44.3
44.6
46.6

Mean
Std. Dev.

28.79351
7.37721

Variance
Skewness
Kurtosis

54.42323
.1115568
2.155094

. summarize price horsepow weight


Variable |
Obs
Mean
Std. Dev.
Min
Max
-------------+-------------------------------------------------price |
155
4633.065 2028.218
1900
15475
horsepow |
151
89
24.42403
48
165
weight |
155
2673.019
601.1441 1755
4360

Page 5 08/21/15 Exercise1: Introduction to Stata Upadhyay, Shubham 720311476

. summarize
Variable |
Obs
Mean
Std. Dev.
Min
Max
-------------+-------------------------------------------------mpg |
154
28.79351
7.37721
15.5
46.6
cylinder |
155
4.83871
1.365074
3
8
displace |
155
153.5097
72.50861
70
360
horsepow |
151
89
24.42403
48
165
accel |
155
16.27613
2.52018
11.2
24.8
-------------+-------------------------------------------------year |
155
79.94194
1.456016
78
82
weight |
155
2673.019
601.1441
1755
4360
origin |
155
1.735484
.8759219
1
3
make |
0
model |
0
-------------+-------------------------------------------------price |
155
4633.065 2028.218
1900
15475
carmaker |
0
. stem mpg
Stem-and-leaf plot for mpg
mpg rounded to nearest multiple of .1
plot in units of .1
15*
16*
17*
18*
19*
20*
21*
22*
23*
24*
25*
26*
27*
28*
29*
30*
31*
32*
33*
34*

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|

5
259
005667
11256
12224489
2222355668
156
034
002567899
023
01448
04668
0000222459
000148
05889
00479
00035689
00012344789
0578
0011234557

Page 6 08/21/15 Exercise1: Introduction to Stata Upadhyay, Shubham 720311476

35*
36*
37*
38*
39*
40*
41*
42*
43*
44*
45*
46*

|
|
|
|
|
|
|
|
|
|
|
|

017
00000114
000237
00001
014
89
5
14
036
6

. graph box mpg, title("Box Plot of Miles per Gallon")


. graph box displace, title("Box Plot of Engine Displacement")
. histogram mpg, fraction title("Distribution of Car Mileages")
xlabel(15 (4) 48) ylabel(0 (.05) .3) start(15) width(4)
(bin=8, start=15, width=4)

Page 7 08/21/15 Exercise1: Introduction to Stata Upadhyay, Shubham 720311476

You might also like