april 25, 2006lecture 14 slide #1 logits and factor analysis homework review logit analysis –logit...

20
il 25, 2006 Lecture 14 Slide #1 Logits and Factor Analysis • Homework Review • Logit Analysis – Logit Interpretation – Logit diagnostics • Factor analysis-in- brief – Scaling in factor analysis – Using scales

Upload: tyler-cobb

Post on 18-Dec-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: April 25, 2006Lecture 14 Slide #1 Logits and Factor Analysis Homework Review Logit Analysis –Logit Interpretation –Logit diagnostics Factor analysis-in-brief

April 25, 2006 Lecture 14 Slide #1

Logits and Factor Analysis

• Homework Review

• Logit Analysis– Logit Interpretation– Logit diagnostics

• Factor analysis-in-brief– Scaling in factor analysis– Using scales

Page 2: April 25, 2006Lecture 14 Slide #1 Logits and Factor Analysis Homework Review Logit Analysis –Logit Interpretation –Logit diagnostics Factor analysis-in-brief

April 25, 2006 Lecture 14 Slide #2

Homework Review

• Predict the choice between Quad and LD-HR– required recodes

• Plot the effect of the risk index and ideology on probability of a shift

Page 3: April 25, 2006Lecture 14 Slide #1 Logits and Factor Analysis Homework Review Logit Analysis –Logit Interpretation –Logit diagnostics Factor analysis-in-brief

April 25, 2006 Lecture 14 Slide #3

Interpreting Logits (again)

• Logits can be used to directly calculate odds:

• Logits can be reversed to obtain the predicted probabilities:

ˆ P =1

1+e−ˆ L

antilog=eˆ L

Page 4: April 25, 2006Lecture 14 Slide #1 Logits and Factor Analysis Homework Review Logit Analysis –Logit Interpretation –Logit diagnostics Factor analysis-in-brief

April 25, 2006 Lecture 14 Slide #4

Interpreting Logits, ContinuedHow would you calculate the effect of a particular combination of independent variables on the probability of Y=1?

• Set all Xj’s at the appropriate values, then calculate

(e=2.71828..)

• The result is the average probability for that “type” of respondents

ˆ P =1

1+e−ˆ L

Page 5: April 25, 2006Lecture 14 Slide #1 Logits and Factor Analysis Homework Review Logit Analysis –Logit Interpretation –Logit diagnostics Factor analysis-in-brief

April 25, 2006 Lecture 14 Slide #5

Example: Effect of ideology, gender on probability of choosing the LD-HR

model for standard setting

• Model: choice (DR_standard) as a function of:– Ideology, gender and certainty

• Types– A=conservative male; B=liberal female

– Set certainty at the average

– A: conservative, male, average level of certainty• Ideology=7, gender = 1, certainty=5.865

– B: liberal, female, average level of certainty• Ideology=1, gender = 0, certainty=5.865

0=chose threshold, 1=choose LD-HR

Page 6: April 25, 2006Lecture 14 Slide #1 Logits and Factor Analysis Homework Review Logit Analysis –Logit Interpretation –Logit diagnostics Factor analysis-in-brief

April 25, 2006 Lecture 14 Slide #6

Logit Model Results

. logit DR_standard DR_cert ideology sex if DR_correct==0

Iteration 0: log likelihood = -549.8376Iteration 1: log likelihood = -506.99023Iteration 2: log likelihood = -506.45582Iteration 3: log likelihood = -506.45549

Logit estimates Number of obs = 891 LR chi2(3) = 86.76 Prob > chi2 = 0.0000Log likelihood = -506.45549 Pseudo R2 = 0.0789

------------------------------------------------------------------------------ DR_standard | Coef. Std. Err. z P>|z| [95% Conf. Interval]-------------+---------------------------------------------------------------- DR_cert | -.2312371 .0316 -7.32 0.000 -.2931719 -.1693022 ideology | -.1996686 .0583874 -3.42 0.001 -.3141059 -.0852313 sex | -.6374052 .207332 -3.07 0.002 -1.043768 -.2310419 _cons | 1.824489 .3209997 5.68 0.000 1.195341 2.453637------------------------------------------------------------------------------

Page 7: April 25, 2006Lecture 14 Slide #1 Logits and Factor Analysis Homework Review Logit Analysis –Logit Interpretation –Logit diagnostics Factor analysis-in-brief

April 25, 2006 Lecture 14 Slide #7

Analyzing TypesL =1.824489 + (-.1996686*(ideology)) + (-.6374052*(sex)) +

(-.2312371*(certainty))

L ProbabilityConservative Males: -1.567 0.173(indep. vars.: 7; 1; 5.865)

Liberal Females: 0.269 0.567(indep. vars.: 1; 0; 5.865)

Hint: Use a spreadsheet to calculate L and P.

In Excel, the formula for probability would be:

P = 1/(1+EXP(-L))

Example from Scientist data

Page 8: April 25, 2006Lecture 14 Slide #1 Logits and Factor Analysis Homework Review Logit Analysis –Logit Interpretation –Logit diagnostics Factor analysis-in-brief

April 25, 2006 Lecture 14 Slide #8

Estimates of Coefficient Strength• In Excel, calculate the difference in probability for

each X at its min and max, holding all other variables constant:

Ideology Sex DR_cert L Prob DifferenceMean 3.613 0.847 5.865 -0.793 0.3115Minimum 1 0.847 5.865 -0.271 0.4326 0.246Maximum 7 0.847 5.865 -1.469 0.1871

Ideology Sex DR_cert L Prob DifferenceMean 3.613 0.847 5.865 -0.793 0.3115Minimum 3.613 0 5.865 -0.253 0.4371 0.146Maximum 3.613 1 5.865 -0.891 0.291

Ideology Sex DR_cert L Prob DifferenceMean 3.613 0.847 5.865 -0.793 0.3115Minimum 3.613 0.847 0 0.5632 0.6372 -0.49Maximum 3.613 0.847 10 -1.749 0.1482

Page 9: April 25, 2006Lecture 14 Slide #1 Logits and Factor Analysis Homework Review Logit Analysis –Logit Interpretation –Logit diagnostics Factor analysis-in-brief

April 25, 2006 Lecture 14 Slide #9

Estimated Logit Probabilities

0

1

2

3

4

Density

0 .2 .4 .6 .8predicted probability

Page 10: April 25, 2006Lecture 14 Slide #1 Logits and Factor Analysis Homework Review Logit Analysis –Logit Interpretation –Logit diagnostics Factor analysis-in-brief

April 25, 2006 Lecture 14 Slide #10

Logit DiagnosticsThe most useful diagnostics are to match “influence” (case-wise dfbetas) with predicted probabilities:

0

.2

.4

.6

Influence

0 .2 .4 .6 .8predicted probability

Page 11: April 25, 2006Lecture 14 Slide #1 Logits and Factor Analysis Homework Review Logit Analysis –Logit Interpretation –Logit diagnostics Factor analysis-in-brief

April 25, 2006 Lecture 14 Slide #11

Logit Outliers and Influencegsort –dBlist case_no dB phat DR_standard ideology sex DR_cert in 1/10

+---------------------------------------------------------------------+ | case_no dB phat DR_sta~d ideology sex DR_cert | |---------------------------------------------------------------------| 1. | 1895 .5331572 .3101657 1 3 1 6 | 2. | 5118 .5331572 .3101657 1 3 1 6 | 3. | 6086 .5331572 .3101657 0 3 1 6 | 4. | 2187 .5331572 .3101657 1 3 1 6 | 5. | 5616 .5331572 .3101657 0 3 1 6 | |---------------------------------------------------------------------| 6. | 7092 .5331572 .3101657 0 3 1 6 | 7. | 8726 .5331572 .3101657 1 3 1 6 | 8. | 7915 .5331572 .3101657 1 3 1 6 | 9. | 2680 .5331572 .3101657 1 3 1 6 | 10. | 3076 .5331572 .3101657 1 3 1 6 | +---------------------------------------------------------------------+

In this instance, the high influence cases are those in the mid-range on key variables (certainty, ideology). This simply makes them hard to predict.

Page 12: April 25, 2006Lecture 14 Slide #1 Logits and Factor Analysis Homework Review Logit Analysis –Logit Interpretation –Logit diagnostics Factor analysis-in-brief

April 25, 2006 Lecture 14 Slide #12

Factor Analysis-in-Brief

• A means for estimating the underlying structure in a set

of “indicator” variables

– A reversal of regression analysis

– What unobserved dependent variable would best explain the

variance in the observed indicators?

• Multiple related approaches

– Exploratory versus Confirmatory

– We focus on confirmatory

• principal factor analysis

Page 13: April 25, 2006Lecture 14 Slide #1 Logits and Factor Analysis Homework Review Logit Analysis –Logit Interpretation –Logit diagnostics Factor analysis-in-brief

April 25, 2006 Lecture 14 Slide #13

Indicators of Societal Risk Management Views

• U/E4_34: When the risk is very small, it is acceptable for the government to impose that risk on in- dividuals without their consent.

• U/E4_35: Even if the potential benefits to society are very large, it is wrong for the government to impose risks on individuals without their consent.

• U/E4_36: It is acceptable for the government to impose risks without consent if the individuals harmed by the policy are compensated for their losses.

• U/E4_37: For society as a whole to survive and prosper, it is necessary that risks and sacrifices be accepted by citizens.

Page 14: April 25, 2006Lecture 14 Slide #1 Logits and Factor Analysis Homework Review Logit Analysis –Logit Interpretation –Logit diagnostics Factor analysis-in-brief

April 25, 2006 Lecture 14 Slide #14

Underlying Structure?

SocietalRisk Mgmt.Perspective

Small risksOK to impose

Wrong to imposeeven if benefits

are large

Acceptable ifcompensated

Risks necessaryfor society to

prosper

Page 15: April 25, 2006Lecture 14 Slide #1 Logits and Factor Analysis Homework Review Logit Analysis –Logit Interpretation –Logit diagnostics Factor analysis-in-brief

April 25, 2006 Lecture 14 Slide #15

Factor procedure

Page 16: April 25, 2006Lecture 14 Slide #1 Logits and Factor Analysis Homework Review Logit Analysis –Logit Interpretation –Logit diagnostics Factor analysis-in-brief

April 25, 2006 Lecture 14 Slide #16

“Rotating” Factors

Page 17: April 25, 2006Lecture 14 Slide #1 Logits and Factor Analysis Homework Review Logit Analysis –Logit Interpretation –Logit diagnostics Factor analysis-in-brief

April 25, 2006 Lecture 14 Slide #17

Saving Factor Scores

Page 18: April 25, 2006Lecture 14 Slide #1 Logits and Factor Analysis Homework Review Logit Analysis –Logit Interpretation –Logit diagnostics Factor analysis-in-brief

April 25, 2006 Lecture 14 Slide #18

Using Factor Scores. logit DR_standard DR_cert ideology sex risk_factor if DR_correct==0

Iteration 0: log likelihood = -546.81911Iteration 1: log likelihood = -483.95752Iteration 2: log likelihood = -482.27287Iteration 3: log likelihood = -482.26589

Logit estimates Number of obs = 885 LR chi2(4) = 129.11 Prob > chi2 = 0.0000Log likelihood = -482.26589 Pseudo R2 = 0.1181

------------------------------------------------------------------------------ DR_standard | Coef. Std. Err. z P>|z| [95% Conf. Interval]-------------+---------------------------------------------------------------- DR_cert | -.2420916 .0328576 -7.37 0.000 -.3064914 -.1776919 ideology | -.1533426 .0599723 -2.56 0.011 -.2708861 -.0357992 sex | -.5656747 .2131953 -2.65 0.008 -.9835298 -.1478196risk_factors | -.675367 .1072255 -6.30 0.000 -.8855251 -.4652088 _cons | 1.618216 .3279038 4.94 0.000 .9755367 2.260896------------------------------------------------------------------------------

Page 19: April 25, 2006Lecture 14 Slide #1 Logits and Factor Analysis Homework Review Logit Analysis –Logit Interpretation –Logit diagnostics Factor analysis-in-brief

April 25, 2006 Lecture 14 Slide #19

Summing Up• Factor analysis is a means of

“data reduction”• Useful when you have

indicators• Best when used in

“confirmatory” mode• Has an “exploratory” side

Page 20: April 25, 2006Lecture 14 Slide #1 Logits and Factor Analysis Homework Review Logit Analysis –Logit Interpretation –Logit diagnostics Factor analysis-in-brief

April 25, 2006 Lecture 14 Slide #20

Final (non-cumulative) Exam

• Will include a simple exercise in– Using factor analysis to construct a factor score– Running a logit model using that score (along with

several other variables)– Plotting the influence of the independent variables

• Will be an extension of the homework completed for today– No new data

• Posted on Friday (April 28) at 5PM• Due on Wednesday (May 3) at 5PM