1 project one carpoll. 2 3 excel convert categorical data into dummy variables type of vehicle:...

Post on 21-Dec-2015

224 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

1

Project OneCarpoll

2

Carpoll

3

Excel Convert categorical data into dummy

variables Type of vehicle: family, sporty, work Sort type

Select some of family observations Expand selection in dialog box

Code family as one, sporty and work as zero

4

5

6

7

Vehicle Type Family

Yes: One, 155 No: zero, 148 Total: 303

8

9

Plot of Family Type (Zero/One) Vs. Age

y = 0.0196x - 0.0891

R2 = 0.0546

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0 10 20 30 40 50 60 70

Age

Pro

bab

ilit

y

Approximation to Cumulative Distribution Function Sigmoid

10

11

Sort Gender and Code zero/one Male: one; Female: zero

Select some observations in sex, expand selection, sort

Ditto for marital status Married: one Single: zero

12

13

14

15

Cross-Classification of Type with GenderFamily Sporty &

WorkTotal

Female 76 62 138

Male 79 86 165

Total 155 148 303

16

#-Way classification in one step

17

Family: YesMarried Single Total

Female 58 18 76

Male 61 18 79

Total 119 36 155

18

19

Cut and Paste Fambern, age, gender, marital into EViews

File Menu New

workfile

20

Workfile Dialog Box

21

Generate x = 1

22

23

24

25

Estimate Linear Probability Model

26

27

Age and marital are significant,And have a positive effect on The probability of choosing aFamily car. Gender barely addsto the explanation and is negative

Given age and gender, being married increases the

Probability of favoring a family car by 0.23

28

29

Married and Female

Single and Male

30

31

Married and Female

Single and Male

32

33

34

35

This probability model does a better job of explaining thoseWho favor a family car comparedTo those who don’t

36

Logit Fit

37

Married women

Single men

38

Linear Probability Model Car Size Car size: Small, medium, large Varies with age, gender, and marital status

39

40

41

Sort by Size and then by Age

42

Contingency Table Analysis: ObservedSmall Medium Large Margin

18-29 70 59 15 149

30-39 59 58 21 138

40- 8 7 6 21

Margin 137 124 42 303

43

Contingency Table Analysis: Small Medium Large Margin

18-29 149

30-39 138

40- 21

Margin 137 124 42 303

44

Contingency Table Analysis: ExpectedSmall Medium Large Margin

18-29 67.4 61.0 20.7 149

30-39 62.4 56.5 19.1 138

40- 9.5 8.6 2.9 21

Margin 137 124 42 303

45

Contingency Table Analysis: [Observed – Expected]2

Small Medium Large

18-29 6.76 4.0 32.49

30-39 11.56 2.25 3.61

40- 2.25 2.56 9.61

46

47

0.00

0.05

0.10

0.15

0 5 10 15

CHIR

DE

NS

9.5

5%

2 =75.09

48

Contingency Table Analysis: Small Medium Large

18-29 Fewer than exp

30-39 Fewer than exp

40- More than exp

Margin

49

Summary

People in their 20’s prefer smaller cars People in their forties or older prefer large

cars

50

Country Vs. Size Country: American, European, Japanese Size: small, medium, large

51

Contingency Table Analysis: Observed Small Medium Large Margin

American 26 19 92 137

European 53 17 54 124

Japanese 36 4 2 42

Margin 115 40 148 303

52

Contingency Table Analysis: Small Medium Large Margin

American 137

European 124

Japanese 42

Margin 115 40 148 303

53

Contingency Table Analysis: Expected Small Medium Large Margin

American 52.0 18.1 66.9 137

European 47.1 16.4 60.6 124

Japanese 15.9 5.5 20.5 42

Margin 115 40 148 303

54

Contingency Table Analysis: [Observed – Expected]2

Small Medium Large

American 676 0.81 630

European 34.8 0.36 43.6

Japanese 404 2.25 342

55

Contingency Table Analysis: Small Medium Large

American fewer than exp

more

European

Japanese more fewer

Margin

56

Summary Preference for large American cars and for

small Japanese cars.

top related