### Create a StudySoup account

#### Be part of our community, it's free to join!

Already have a StudySoup account? Login here

# Research in Pol Methods POL 290G

UCD

GPA 3.56

### View Full Document

## 33

## 0

## Popular in Course

## Popular in Political Science

This 170 page Class Notes was uploaded by Pierre Huel on Tuesday September 8, 2015. The Class Notes belongs to POL 290G at University of California - Davis taught by Bradford Jones in Fall. Since its upload, it has received 33 views. For similar materials see /class/187576/pol-290g-university-of-california-davis in Political Science at University of California - Davis.

## Reviews for Research in Pol Methods

### What is Karma?

#### Karma is the currency of StudySoup.

#### You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 09/08/15

Duration Models Preliminaries Brad Jones1 1Department of Political Science University of California Davis October 3 2007 Jones POL 2mm Topis in Mediodology Today Preliminaries and Kaplan Meier 391 Medlodolo Bradford 5 Jones UCrDaviS Dept of Political Science Today Preliminaries and KaplanrMeier Topics gt Stylized Introduction Quick Hits Low Math gt Moving Parts gt Kapla n Meier Estimator 391 Mediodolo Bradford 5 Jones UCeDaviS Dept of Political Science Today Preliminaries and KaplaneMeier Some Duration Data Table Example of Political Event History Data Military Interventions intervention intervenor Target Duration Contiguity Number ame Name in Days Statusa CD 1 K Albania 1 0 0 46 El Saivador Honduras 657 1 o 81 U S Panama 274 0 1 124 N Vietnam Thailand 2710 0 0 184 Buigaria Greece 12 1 o 197 U S Turkey 34 0 0 236 China 7456 1 0 278 Botswana S Africa 1097 1 0 332 Uganda Kenya 409 1 1 375 France Morocco 731 0 0 422 lraq lsrael 324 1 0 467 israei Egypt 39 1 o 496 Egypt 137 o o 519 udan Egpt 1952 1 0 529 Turkey iraq 1681 1 o 575 ltaly Lebanon 31 0 0 605 U S Ye 107 0 0 621 Malawi Mozambique 631 1 1 639 Guatemala Mexico 124 1 0 672 lndia Pakistan 73 0 1 399 intervenors and Targets separated by 150 miles of water or iess are coded as contiguous C denotes censored disputes onegoing as of 31 Dec 198 are treated as rightecensored Data are PearsoneBauman Miiitarized intervention Data iCPSR 6035 Jone Bradford 5 Jones UCrDaviS Dept of Political Science Today Preliminaries and KaplanrMeier Complicated Data Table Militarized Interstate Disputes between Nicaragua and Costa Rica Post World War II Era Date of Date of Length of Dispute Onset Dispute Termination Dispute Days Outcome 3 De 11 1948 Mar 9 1949 89 St iemate Aprii 1 1954 Feb 24 1955 330 Compromise May 3 1957 June 23 1957 51 Staiema Oct 10 1977 Oct 15 1977 o Staiemate Sept 12 1978 Dec 27 1978 107 Staiemate Sept 28 1983 Sept 3 1984 342 Staiemate May 31 1985 June 5 1985 o Staiemate Aprii 16 1986 Aprii 16 1986 1 Staie t p Sept 2 19 1 Staiemate ainformatiori o MiD outcome was taken from MD data set Data are from tne Miiitarized interstate Dispute Dataset Jones Bremmer and Singer 1996 Ma 1999 Jone Bradford 5 Jones UCrDaviS Dept of Political Science Today Preliminaries and KaplanrMeier What History Looks Like 50in miun 15min Plinth I Spdl Figure The figure shows the totai number of dspute and peace spe5 For ConflEts between NEaragua and d to the duraton ofthe spe m own here 5 ustratve of com hosted event Structure there are mutpe a ended m a Compromse one knd of m A 5 m8 E e o t event and the other dspute spes ended m staemate a second knd ofevent Jone POL 29m Topnu m Medlodolo y Bradford 5 Jones UCrDaviS Dept of Political Science Today Preliminaries and KaplanrMeier Some Motivation for Duration Models gt Let T be some non negative random variable Often interested in T fx Consideration of a linear model V V V Problems 0 Model could return negative predicted values 0 Censored and Uncensored Observations are treated equivalently o TimeVarying Covariates are not easily accommodated o The mean response may not be of primary interest Jones POL 2mm Topis in Mediodology Bradford 5 Jones UCrDaviS Dept of Political Science Today Preliminaries and KaplanrMeier Some Issues Time and your conception of it gt Useful to distinguish calendar time from clock time gt For duration models we need to calibrate observations on the clock gt Time is time It doesn39t matter wherein time gt Except it does matter sometimes gt Some pictures Jones POL 2mm Topis in Mediodology Oblava on Obmn on l 2 Blac om Oblewntiun 3Elac unx Figure The three lines indicate the duration time of the three observations The starting time begins at the calendar time the year the observations enter the process n Medlodol Oblava on Oblervu on l 2 Election Ohm m 2 1 Election Obmn on 3 3 Elec ons quotmockquot 1m Figure The three lines represent the observed duration time for the three observations Here the time metric is the clock time observations enter the process at the time of their first election n Medlodol Bradford 5 Jones UCrDaviS Dept of Political Science Today Preliminaries and KaplanrMeier Some Motivation for Duration Models gt Let T be some non negative random variable Often interested in T fx Consideration of a linear model V V V Problems 0 Model could return negative predicted values 0 Censored and Uncensored Observations are treated equivalently o TimeVarying Covariates are not easily accommodated o The mean response may not be of primary interest Jones POL 2mm Topis in Mediodology Bradford 5 Jones UCrDaviS Dept of Political Science Today Preliminaries and KaplanrMeier Some Solutions gt Treat IogT as the response variable gt Delete censored cases from the analysis gt Ignore information on T and treat response variable as a binary outcome FailedSurvived gt Issues gt Consideration of duration models 391 Mediodolo Today Preliminaries and KaplanyMeier Bradford 5 Jones UCrDaviS Dept of Political Science Moving Parts gt CDF generic Ft A fuclu PrT g t gt Probability that a survival time T is less than or equal to some time 139 it39s telling us something about what the distribution of failure times look like If Ft is differentiable a PDF exists and is given by V gt PDF generic 7 FtAt 7 Ft lt0 7 Am At gt Or another way to look at the PDF 7 Prtg T3 tAt 0 7 Am At gt Note what the PDF is giving us the unconditional failure rate of I o I I I II II Jones POL ZQIIG Top Mediodo Bradford 5 Jones UCrDaviS Dept of Political Science Today Preliminaries and KaplanrMeier Survivor Function gt Close connection to Ft t17 Ft PrT 3 t gt Gives the probability a survival time T is equal to or greater than some time t gt Properties gt Strictly decreasing in 1 Why gt May never be 0 if there is right censoring Jones POL ZQIIG Top Mediodology Bradford 5 Jones UCrDaviS Dept of Political Science Today Preliminaries and KaplanrMeier Smooth Hypothetical 5t Survivor Man 1 Wm Canned Cue 5 mm amazed CM 0 i s o 1amp0 260 100 Dmm39 n Flgure Ths gure grep15 the summer functon for a hypothetEa data set The top ne denotes the Summer funEton for a data set Wth Censored observatons the bottom ne denotes the summer funEton for uncensored data Jone Bradford 5 Jones UCrDaviS Dept of Political Science Today Preliminaries and KaplanrMeier Actual Functions are Step Functions 075 050 i 6 so 160 150 260 mm Figure Ths gure graphs the empihca Survivor fUnEtOn for a hypothetEa set ofdata Note the stafrrstep nature of the functoh hs occu because observanth are observed 35 fahhg at dscrete tmes hence the emprEa sunNor funEton 5 flat m between faMres Jone Bradford 5 Jones UCrDaviS Dept of Political Science Today Preliminaries and KaplanrMeier Hazard Function gt The hazard function tells us something about risk gt Specifically the close connection between failure and survival gt Reexpressed as 7 Prt T tAtlT2t W Ame At gt Idea of conditional failure rate is important failure is conditioned on survival gt Sometimes we39re interested in the shape of this thing Jones POL 2mm Topis in Mediodology Bradford 5 Jones UCrDaviS Dept of Political Science Today Preliminaries and KaplanrMeier Hazard Function gt Conditioning on covariates PrtltTlttAtlTgttx h f 7 1 lt N we At lt gt Usual issues apply wrt x and timeserial data gt Parametrically models give functional form to ht conditional on the covariates gt Many choices of which we39ll speak about later Jones POL 2mm Topis in Mediodology DWI 3935 Wa39bull Insde 04 Exponum39ll 02 Weibu o i i i 2 48 Dm m Time Figure This gure graphs typical functional forms for several common parametric distribution functions n Medlodol Bradford 5 Jones UCrDaviS Dept of Political Science Today Preliminaries and KaplanrMeier Censoring and Truncation b OLS doesn39t work out so well for a lot of reasons V Among the main reason is prevalence of censoring and truncation gt Right censoring an event has not occurred as of last observed 1 gt Left truncation the start of the duration process is not observed gt Some confusion in the terminology some call this left censoring gt Since censoring relates to observability of the dependent the event I prefer left truncation Jones POL 2mm Topis in Mediodology Bradford 5 Jones UCrDaviS Dept of Political Science Illustration of Censoring Today Preliminaries and KaplanrMeier Case 2 Four Hypothetical hservmio s in Event Histo case 3 Data Set Case 4 Iniu39nl Obsctv on Observation Period j Last Observation Period Period Periods of Ohservntion Fi Lire Tnis figure ustrates exampes ofrghtrcenSOrng Case 3 and iefnruncanon Case 4 35 We as me 2 observations tnat present no specia probems Cases 1 a n Mediodol Bradford 5 Jones UCrDaviS Dept of Political Science Today Preliminaries and KaplanrMeier Accounting for Censori ng gt Start with an odd looking hazard function fttAt f udu WPW 2 gt Survivor function with right censoring gt and left truncation t fudu 4 TL gt Let39s turn to likelihoods Jones POL 2mm Top Mediodology Bradford 5 Jones UCrDaviS Dept of Political Science Today Preliminaries and KaplanrMeier Likelihood and Censoring gt A world without cesnsoring n H mi i gt A more realistic world E H ftz H 5U 1731 quot 17gt gt Identify a censoring indicator 6 d i 1 if t g t 7 0 if t gt t gt Resultant likelihood 5 175 E H m 5a 5 i1 gt Implications Censoring problem resolved in a way we like Jones POL ZQIIG Top Mediodology Bradford 5 Jones UCrDaviS Dept of Political Science Today Preliminaries and KaplanrMeier The Kaplan Meier Estimator gt Some preliminary analysis Kaplan Meier estimator gt Fundamentally important development in statistics mid 20c gt Motivation 0 Sample of T duration times t17 t2 tn 0 Censoring and ties ie tj tk may be present 0 Must be the case thatj lt n with censoring and ties ie thej unique 1 is less than n 0 Suppose we sort the failure times t1 lt t2 lt ty 0 Suppose we estimated the probability a duration will survive up to some time interval k bounded by 131 to t gt lfwe did this we would have the Kaplan Meier estimator Jones POL ZQIIG Top Mediodology Bradford 5 Jones UCrDaviS Dept of Political Science Today Preliminaries and KaplanrMeier The Kaplan Meier Estimator gt Kapla n Meier estimator k M H dquot 6 11 J gt nj is the number of observations at risk in the interval is the number of observations failing in the interval Y t is an estimated survivor function V This is giving us the probability a duration will survive through each successive time interval k by using the information on the number of observations at risk at each interval nj the number of observations terminating in the interval and the number of observations that are censored in the interval Jones POL 2mm Topis in Mediodology Bradford 5 Jones UCrDaviS Dept of Political Science Today Preliminaries and KaplanrMeier The Kaplan Meier Estimator gt At the initial observation point to all observations are surviving V As time passes durations may terminate or fail in the kth time interval at each interval k there is a successively smaller number of observations at risk of terminating in the interval as observations in previous intervals have already terminated V Observations censored within the kth interval are no longer observed in subsequent periods the size of the risk set decreases both with event occurrences and with the presence of right censored observations Jones POL 2mm Topis in Mediodology Bradford 5 Jones UCrDaviS Dept of Political Science Today Preliminaries and KaplanrMeier The Kaplan Meier Estimator gt Uncertainty Greenwood standard error se t sm gt NB this is not the standard error used for confidence intervals Iog7log t is used gt The median survival time is equivalent to the time at which 50 percent of the observations in the study are expected to survive Since none of the may exactly equal 5 the median survival time is taken to be the smallest observed survival time such that lt 5 Jones POL 2mm Top Mediodology Bradford 5 Jones UCrDaviS Dept of Political Science Today Preliminaries and KaplanrMeier Application gt UN Peacekeeping Missions 1948 2001 gt Missions on going as of 31 October 2001 are right censored gt The data 391 Mediodolo Bradford 5 Jones UCV Data Davis Dept of Political Science Today Preliminaries and KaplanyMeier Table UN Peacekeeping Missions 19482001 1 UNASOG Aouzou Strip ChadeLibya 2 2 UNTM H Haiti 4 3 UNAM C Camb i 5 4 MiNUGUA Guat i 5 5 UNiPOM indiaepakistan 7 6 UNOG L MiddieeEast 7 7 UNSF New uinea 7 8 UNPSG Croatia 10 9 UNCRO C oati 11 49 UNEF i MiddierEast 128 1 50 UNiFiL e anon 284 0 51 F Goian Heignts 319 0 52 UNiFiCYP Cyprus 452 o 53 UNMOG P indiaepakistan 634 0 54 UNTSO MiddieeEast 641 0 9 A 1 denotes the peacekeeping mission has been compieted and a 0 denotes the mission is on going as of October 31 2001 ata are from Green Kahi and Diehi1998 and from the United Nations httpWwuniorgDeptsdpko Jone Bradford 5 Jones UCrDaviS Dept of Political Science Today Preliminaries and KaplanrMeier Data Issues and Implementation gt With duration data you need to identify T and 6 gt Here duration is the time in months and 6 is given by my termination indicator gt Easy to implement In R I can use the survival library and the survfit routine In Stata I can use sts list gt Output Stata first R second httppsfacultyucdavisedubsjjoneskmpdf Jones POL ZQIIG Top Mediodology Bradford 5 Jones UCrDaviS Dept of Political Science Today Preliminaries and KaplanrMeier Interpretation gt Gives the probability a mission will survive up to but not beyond the interval gt Censored cases do not inform the survivor function Censored missions at times 71 99 and 127 all have estimate of t is 234 gt Median survival time found at the point where Pr 5 gt Since often never exactly equals 5 the median survival time is taken to be the smallest observed survival time such that t lt 5 gt This is at 30 months for these data gt Percentiles generally from Collett p tile mintj i 39 3 17 p tile100 Jones POL ZQIIG Top Mediodology Effects Displays and Post Estimation Uncertainty Brad Jones1 1Department of Political Science University of California Davis May 4 2009 Jones POL 2mm Top Methodology Jone Bradford 5 Jones UCrDaviS Dept of Political Science Uncertainty Estimation More Details gt Imagine y regressed on X giving us parameters b XXrlXy Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Uncertainty Estimation More Details gt Imagine y regressed on X giving us parameters b X X 1X y gt Standard linear model Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Uncertainty Estimation More Details gt Imagine y regressed on X giving us parameters b X X 1X y gt Standard linear model gt Often interested in some quantity of interest like a prediction Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Uncertainty Estimation More Details gt Imagine y regressed on X giving us parameters b X X 1X y gt Standard linear model gt Often interested in some quantity of interest like a prediction gt Suppose yp is a prediction based on some XP Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Uncertainty Estimation More Details gt Imagine y regressed on X giving us parameters b X X 1X y Standard linear model Often interested in some quantity of interest like a prediction Suppose yp is a prediction based on some XP Two kinds of uncertainty Estimation Uncertainty Related to sample size Fundamental Uncertainty EYP u Xp Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Uncertainty Estimation More Details gt In regression setting variability decomposes as VP Xpb 6p varXpb varep vaarbXp 02 aszXp Xp 1 02 estimation uncertainty fundamental uncertaiI M Jones POL 2mm Topis in Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Uncertainty Estimation More Details gt In regression setting variability decomposes as VP Xpb 6p varXpb varep vaarbXp 02 aszXp Xp 1 02 estimation uncertainty fundamental uncertaiI M gt Distribution of YAP is W N NXPB vaarbXp Jones POL 2mm Topis in Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Uncertainty Estimation More Details gt In regression setting variability decomposes as VP Xpb 6p varXpb l varep vaarbXp 02 aszXp Xp 1 02 estimation uncertainty l fundamental uncertaiI M gt Distribution of YAP is W N NXPB vaarbXp gt Unconditional distribution is W N NXPBXPvarbXP 02 Jones POL 2mm Topis in Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Uncertainty Estimation More Details gt Because quantities are estimated with uncertainty these quantities have standard errors around them Jones POL 2mm To 1 Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Uncertainty Estimation More Details gt Because quantities are estimated with uncertainty these quantities have standard errors around them gt Recall in regression setting that se around predicted y include the variance 6 Jones POL 2mm To 1 Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Uncertainty Estimation More Details gt Because quantities are estimated with uncertainty these quantities have standard errors around them gt Recall in regression setting that se around predicted y include the variance 6 gt Therefore prediction interval is larger than standard confidence interval Jones POL 2mm To 1 Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Uncertainty Estimation More Details gt Because quantities are estimated with uncertainty these quantities have standard errors around them gt Recall in regression setting that se around predicted y include the variance 6 gt Therefore prediction interval is larger than standard confidence interval gt Quick illustration using standard approaches Jones POL 2mm Topis in Methodology l I gt m1ltlmvotesisthpenditotal t Jncumb t Spengtotalumeumb gt summarym1coeff Estrmate Std Error t Value Prom 4736039 16245736 2915 3728e 03 0 2000 0 01166 17147 2694e 61 Jncumb 10 Intercept s Jncumb 70 33 penditotal 44617459 47583240 9377 3125e 19 epemdjotal 002255 41580 5 991e 06 gt gt Flvei umber Summary good to use to understand typueal covaruate profule gt frvemummarwepemqtotal 1 5942 14773 20762 51971 gt gt x0 lt7 C1 75000 1 75000 at set some preduetor val gt yo lt7 sumx0coefm1 1t compute predreted respons 1 12188 gt frvemumdarlvotes1et how typreal re the response7 1 19 1152 3732 6432 14742 gt quamt11edau1votee1et 99 narnFT Versus 99th pereemtrle 9 ues come spend Jncumb 51 e 9 11138 gt x0df lt7 dataframe1ncumb1 spendtot8175000 gt preduetm1 x0df 1 188 gt preduetm1 x0df 1nterval conf1dence fut lwr u r 1 12188 10150 14227 gt redctm1 x0df 1nterval pred1ctlon lwr u r fut 1 12188 8098 16278 Jomee POL 29m Topnu m Melhodolo y Bradford 5 Jones UCrDaviS Dept of Political Science Uncertainty Estimation More Details gt CI is much narrower than prediction interval Jones POL 2mm To 1 Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Uncertainty Estimation More Details gt CI is much narrower than prediction interval gt Predicted y may be a qi for us Jones POL 2mm To 1 Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Uncertainty Estimation More Details gt Cl is much narrower than prediction interval gt Predicted y may be a qi for us gt Estimation uncertainty in non linear models two examples Jones POL 2mm To 1 Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Uncertainty Estimation More Details Cl is much narrower than prediction interval Predicted y may be a qi for us Estimation uncertainty in non linear models two examples Mean and Variance of Poisson EY eX varY Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Uncertainty Estimation More Details Cl is much narrower than prediction interval Predicted y may be a qi for us Estimation uncertainty in non linear models two examples Mean and Variance of Poisson EY eX varY gt Mean and Variance of Logit 1 Emwa varY 7r17 7r Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Uncertainty Estimation More Details gt Estimation uncertainty requires the Delta Method Jones POL 2mm To 1 Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Uncertainty Estimation More Details gt Estimation uncertainty requires the Delta Method gt Taylor series approximation can be applied W gb gm g b B Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Uncertainty Estimation More Details gt Estimation uncertainty requires the Delta Method gt Taylor series approximation can be applied W gb gm g b 7 B gt here g is the first derivative of gm wrt B Jones POL 2mm Topis in Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Uncertainty Estimation More Details gt Estimation uncertainty requires the Delta Method gt Taylor series approximation can be applied W gb gm g b 7 B gt here g is the first derivative of gm wrt B gt Dropping all but the first two terms gives Var Varlg lVarlg bi l gBVarbg 2 Jones POL 2mm Topis in Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Uncertainty Estimation More Details gt Estimation uncertainty requires the Delta Method gt Taylor series approximation can be applied W gb gm g b 7 B gt here g is the first derivative of gm wrt B gt Dropping all but the first two terms gives Var Varlg l Varlg3Xb ml gBVarbg 2 gt This is the DELTA METHOD Jones POL 2mm Topis in Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Delta Method and Poisson gt Poisson Jon POL 29 on I Melhodolo Bradford 5 Jones UCrDaviS Dept of Political Science Delta Method and Poisson gt Poisson e AV y gt This gives the random component Jones POL ZQIIG Bradford 5 Jones UCrDaviS Dept of Political Science Delta Method and Poisson gt Poisson e AV y gt This gives the random component N gt Systematic component eX Jones POL 2mm To 1 Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Delta Method and Poisson gt Poisson e AV y gt This gives the random component N gt Systematic component eX gt Fundamental variability varY i Jones POL 2mm To 1 Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Delta Method and Poisson gt Estimation variability score matrix 53 Which gives the element by element multiplication Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Delta Method and Poisson gt Estimation variability score matrix 53 Which gives the element by element multiplication gt Variance of VP is varVp Xp x eXpbVarbXp x eXpb Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Delta Method and Poisson gt Estimation variability score matrix 53 Which gives the element by element multiplication gt Variance of 9quot is varVp Xp x eXpbVarbXp x eXpb gt lfwe solved this we39d be using the delta method to analytically find the variance of the function Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Delta Method and Poisson gt Estimation variability score matrix 53 Which gives the element by element multiplication gt Variance of 9quot is varVp Xp x eXpbVarbXp x eXpb gt lfwe solved this we39d be using the delta method to analytically find the variance of the function gt In turn ci or standard errors could be computed around qi Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Or use simulation methods gt This is where we were at last week Jon POL 29 on I Melhodolo Bradford 5 Jones UCrDaviS Dept of Political Science Or use simulation methods gt This is where we were at last week gt Stochastic component Y N f0oz Jones POL 2mm To 1 Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Or use simulation methods gt This is where we were at last week gt Stochastic component Y N f0oz gt Systematic Component 0 gX Jones POL 2mm To 1 Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Or use simulation methods gt This is where we were at last week gt Stochastic component Y N f0oz gt Systematic Component 0 gX gt OLS Y Nuz72 and 114Xi Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Or use simulation methods gt This is where we were at last week gt Stochastic component Y N f0oz gt Systematic Component 0 gX gt OLS Y Nuz72 and u Xi D Simulated parameter vector 364 Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Or use simulation methods This is where we were at last week Stochastic component Y N f0oz Systematic Component 0 gX OLS Y Nuz72 and u Xi Simulated parameter vector 364 By central limit theorem simulate as N N 7 VVVVVV Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Poisson Example Benoit data on Frequency of War gt Issue Number of wars as a function of democratization levels Jones POL 2mm To 1 Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Poisson Example Benoit data on Frequency of War gt Issue Number of wars as a function of democratization levels gt Original study published in 1996 Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Poisson Example Benoit data on Frequency of War gt Issue Number of wars as a function of democratization levels gt Original study published in 1996 gt Compare simulated qi to point estimates Jones POL 2mm Top Methodology gt Polsson Model uslng Zellg gt gt M predlcted Values on Weede dataset from Eenolt 1996 gt weede lt7 readdta weededta gt zout lta zelgssal 08 f 73lpopln70lmllwp70 model polsson dataweede gt xout lta setxzout fh73214 Intercept 11173 lpopln70 lnulwp39IO 4036 1 1 2 0954 2 1 3 4036 0954 3 1 4 4 36 0954 4 1 5 4036 0954 5 1 6 4036 0954 6 1 7 4036 0954 7 1 8 4036 0954 8 1 9 4036 0954 9 1 10 4036 0954 10 1 11 4036 0954 11 1 12 4036 0954 12 1 13 4036 0954 13 1 14 4 36 0954 gt sout lt7 s1mzout xxout odel polsson Number of slmulatlons 1000 Mean Values of x u 13 Intercept 11173 lpopln70 llmllwp39lO 000 8000 4036 0954 Pooled Expected Values me mean sd 257 9757 03246 01076 01452 05649 Pooled Predlcted Values Y X mean sd 257 9757 03215 05813 00000 20000 Jones POL 29m Toms m Melhodolo y l I Jcate part of Table 3 from Eenmt 1886 gt ztab2NEpoldem lt7 zelgbutterw oldemSS mode negbln dataweede gt xtab2MEpoldem lt7 setxztab2MEpoldem poldem657 O205585100 gt 5188211131 1 smztab MEpoldem Fxtab2MEpoldem o dem 7 2 gt cbndapplystabQMEpoldemqlev 2 mean applystabQMEpoldemq1ev 2 sd 1 2 1 1731105010 lt77 7777 WPOLDEM Esnmaces from 5111111811011 2485 gt ztab2Mth73 lt7 zelgbutterw 1173 model negb1n dataweede gt xtab2Mth73 lt7 setxztab2Mth73 fh73c2471214 gt stab2Mth73 lt7 smztab2Mth73 x 73 gt cbndapplystabQMth73qlev 2 m Ystab2Mth73qlev 2 s 1 2 1 14372 03346 Freedom House Estmates from 2 13090 02411 Smulanons 3 11484 01738 4 09464 02266 5 08837 02671 gt Jone POL 29m Topnu m Melhodolo y l I my r mm mm Ewmmc Nngmw Emumml Mom no uerOum Exnm hu Cm mmer Kuwrmmh Mawquot mmmman Imwrwmp WWW o 3 m 1m 3955 7 1 no 11 m 927 u on W mm 01 mm Jone POL 29m Top Melhodolonzy Bradford 5 Jones UCrDaviS Dept of Political Science Poisson Example Benoit data on Frequency of War gt Estimates based on simulation differ slightly from those reported in original article Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Poisson Example Benoit data on Frequency of War gt Estimates based on simulation differ slightly from those reported in original article gt Why might this be the case Delta method vs nonparametric simulation Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Poisson Example Benoit data on Frequency of War gt Estimates based on simulation differ slightly from those reported in original article gt Why might this be the case Delta method vs nonparametric simulation gt Useful to show graphical displays of expected counts Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Poisson Example Benoit data on Frequency of War gt Estimates based on simulation differ slightly from those reported in original article gt Why might this be the case Delta method vs nonparametric simulation gt Useful to show graphical displays of expected counts gt Plotting ci using Zelig with a poisson Jones POL 2mm Top Methodology l I vvvvvvvvvvvv gt0 from Eenmt 1996 1dem65seqo1oo1 Epoldem F tabQMEpoldem 7 setxztab2Mth73 fh73 14 51552111311173 lt7 smztab2Mth73 xxtab2Mth73 parmfrowc22 marc 1 plotclstab2MEpoldem POLDEM 1966 ylab Eutterworth Wars y c 07 pomcsltueedepoldemeg lotc1stab2Mth73 M repllcate top part of Flgure 1 7 setxztab2MEpoldem p0 smztab2ll 47417 xlaw 11m weedebutterwgt xlab Freedom House 1973 ylab Eutterworth Wars g f c 07 po1ncsueedefh73 weedebutterw parmfrowc22 Jone POL 29m Topnu m Melhodolo y Bradford S Jones UC Davis Dept of Political Science Euuerwnnh Wars Euuerwnnh Wars immmm w w w w n 2n 4n ED an mu 2 A E E m 12 14 WWWHujuuwiii Hi POLDEM 1955 Fveedum Huu521973 Jones POL 290G Topics in Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Post Estimation Uncertainty Probit gt Consider a probit model Jones POL 2mm To 1 Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Post Estimation Uncertainty Probit gt Consider a probit model gt Winning spending and incumbency in parliamentary system Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Post Estimation Uncertainty Probit gt Consider a probit model gt Winning spending and incumbency in parliamentary system gt Compute first differences etc for various scenarios Jones POL 2mm To 1 Methodology l I M repllcate Table 5 Eenolt and Marsh 2009 PM note convertfactorsF smce thls makes dummy vars 01 numerlc dall lt7 readdta dallprobltdta convertfactorsF ZOut lt7 zellgwonseat pspendjocalnneumbm modelempromw datadall 1510 lt7 setxzout pspendtotal5 lncumb0 m4 20h lt7 setxzout pspendtotal15 lncumb0 m4 summarysout lta slmzout xxlo 1511 111 vvvvvvvvv Model problt Number of Slmulatlons 1000 Values of x Intercept pspendjocal lncumb m pspendtotallnculub 1 1 5 o 4 0 Values of x1 Intercept pspendjocal lncumb m pspendtotallnculub 1 1 15 o 4 0 Expected Values EY X mean sd 257 9757 100595 001657 00336 009657 Predlcted Values Y X o 1 0947 0053 Flrst leferences m Expected Values EYX1EYX mean sd 257 9757 104069 005597 02970 05133 Rlsk Ramos P XiPY1X 391 Jones POL 29m Toms m Melhodolo y l I mean sd 539 8757 18454 2602 46831441 gt gt xlo lt7 setxzout pspenditotalZO lncumb1 m4 gt 1 lt7 setxzout pspendtotal5 lncumb1 m4 gt summarysout lta slmzout xxlo x1 n1 Model problt Number of slmulatlons 1000 Values of x Intercept pspendjocal lncumb m pspendtotallncumb 1 1 0 1 4 0 Values of x1 Intercept pspendjocal lncumb m pspendtotallncumb 1 1 5 1 4 5 Expected Values me mean sd 257 8757 103818 01304 01484 06256 Predlcted Values Y X 1 0625 0375 Flrst leferences 1n Expected Values EYX1EYX mean sd 257 8757 101430 004154 00550102075 Rlsk Ramos PY1x1PY1X mean sd 257 8757 11472 031561084 2287 gt gt x lo lt7 setxz out pspend total5 lncumb1 Jones POL 29m Toms m Melhodolo y 11 lt7 setxzout pspendcocal1o lncumb1 m4 gt summarysout lt7 s1mzout x lo XI 11 Model problt Number of slmulatlons 1000 Values of x Intercept pspendjocal lncumb m pspendtotallncumb 1 1 5 1 4 5 Values of x1 Intercept pspendjocal lncumb m pspendtotallncumb 1 1 1o 1 4 10 Expected Values me mean sd 257 9757 105203 0103237 010 Predlcted Values Y X o 1 0479 0521 Flrst leferences 1n Expected Values EYX1EYX mean sd 257 9757 101487 006378 004132 02525 Rlsk Ramos PY1x1PY1X mean sd 257 9757 11318 01814110591177 gt gt xlo lt7 setxzout pspendtocal1o lncumeI m4 gt x n lt7 setxzout pspendtocal15 lncumeI m4 m z t gt summarysout lt7 s1 u xxlo x1xhl Model problt 391 Jones POL 29m Toms m Melhodolo y Number of slmulatlons 1000 Values of x Intercept pspendjocal lncumb m pspendtotallncumb 1 1 1o 1 4 10 Values of x1 Intercept pspendjocal lncumb m pspendtotallncumb 1 1 15 1 4 15 Expected Values me mean sd 257 9757 106691005284 05627 07678 Predlcted Values Y X 1 0342 0658 Flrst leferences 1n Expected Values EYX1EYX mean sd 257 9757 101270 004335 00475102130 Rlsk Ramos PY1x1PY1X mean sd 539 9757 11195 00790410641358 gt gt xlo lt7 setxzout pspendcocal5 lncumeI m4 gt xn1 lt7 setxzout pspendtocal15 lncumeI m4 gt summarysout lt7 slmzout 252510 x1xhl Model problt Number of slmulatlons 1000 Values of x Intercept pspend total lncumb m pspend totaluneumb 391 Jones POL 29m Topnu m Melhodolo y 1 1 Values of x1 Intercept pspeudjocal lncumb m pspendtotallncumb 1 1 15 1 4 15 Expected Values me mean sd 257 9757 10519 0096103227 06975 Predlcted Values Y X 0 1 0491 0519 Flrst leferences m Expected Values EYX1EYX mean sd 257 9757 102767 009717 009992 04653 Rlsk Ramos PY1x1PY1X eau sd 39 39 m 25 975 11591032831129 2396 gt Jones POL 29m Toms m Melhodolo y Bradford 5 Jones UCrDaviS Dept of Political Science Post Estimation Uncertainty Probit gt Graphical displays Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Post Estimation Uncertainty Probit gt Graphical displays gt Incumbents vs Non Incumbents Jones POL 2mm To 1 Methodology Bradford S Probabmty omemng a Seat Jones 08 ChaHengers nc be S 02 Wu Candwdate Spendmg m Consmuency Jones Top39 5 39n Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Graphical Displays gt This figure conveys a lot of information Jon POL 29 on I Melhodolo Bradford 5 Jones UCrDaviS Dept of Political Science Graphical Displays gt This figure conveys a lot of information gt We can see where the estimated relationship separates between the two groups and where it converges given some value of X Jon POL 29 on I Melliodolo Bradford 5 Jones UCrDaviS Dept of Political Science Graphical Displays gt This figure conveys a lot of information gt We can see where the estimated relationship separates between the two groups and where it converges given some value of X gt In general much easier to visualize Jon POL 29 on I Melliodolo Bradford 5 Jones UCrDaviS Dept of Political Science Graphical Displays gt This figure conveys a lot of information gt We can see where the estimated relationship separates between the two groups and where it converges given some value of X gt In general much easier to visualize gt Let39s consider some plot based approaches to analysis Jon POL 29 on I Melliodolo Bradford 5 Jones UCrDaviS Dept of Political Science Graphical Displays gt This figure conveys a lot of information gt We can see where the estimated relationship separates between the two groups and where it converges given some value of X gt In general much easier to visualize gt Let39s consider some plot based approaches to analysis gt First ROC then effects displays Jones POL 2mm To 1 Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Graphical Displays gt This figure conveys a lot of information gt We can see where the estimated relationship separates between the two groups and where it converges given some value of X In general much easier to visualize Let39s consider some plot based approaches to analysis First ROC then effects displays ROC receiver operator characteristcs Jones POL 2mm Topis in Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Receiver Operator Characteristic Curves Basic Ideas gt Useful to understanding predictive power of models Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Receiver Operator Characteristic Curves Basic Ideas gt Useful to understanding predictive power of models gt Developed in Britain during World War II Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Receiver Operator Characteristic Curves Basic Ideas gt Useful to understanding predictive power of models gt Developed in Britain during World War II gt Radar receiver operators were assessed on their ability to differentiate signal from noise Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Receiver Operator Characteristic Curves Basic Ideas gt Useful to understanding predictive power of models gt Developed in Britain during World War II gt Radar receiver operators were assessed on their ability to differentiate signal from noise gt ie Germans versus flocks of birds Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Receiver Operator Characteristic Curves Basic Ideas gt Useful to understanding predictive power of models gt Developed in Britain during World War II gt Radar receiver operators were assessed on their ability to differentiate signal from noise gt ie Germans versus flocks of birds gt What factors influenced skill were important gain levels for example Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science ROC Curves gt If we care about prediction or even if we don39t have to recognize binary GLMs entail classification problems Jon POL 29 on I Melhodolo Bradford 5 Jones UCrDaviS Dept of Political Science ROC Curves gt If we care about prediction or even if we don39t have to recognize binary GLMs entail classification problems gt Think Type 1 and Type II errors Jon POL 29 on I Melhodolo Bradford 5 Jones UCrDaviS Dept of Political Science ROC Curves gt If we care about prediction or even if we don39t have to recognize binary GLMs entail classification problems gt Think Type 1 and Type ll errors gt Suppose p is prediction of success 7 is prediction of failure Let p and q denote the true value gt With binary classification we have four possible outcomes p True Positive p False Negative q False Positive QUQU q True Negative Jones POL 2mm Top Methodology crnennnvame Mn msease Test resuu Bradford 5 Jones UCrDaviS Dept of Political Science ROC Curves gt Imagine two rates a true positive rate TPR and a false positive rate FPR Jon POL 29 on I Melhodolo Bradford 5 Jones UCrDaviS Dept of Political Science ROC Curves gt Imagine two rates a true positive rate TPR and a false positive rate FPR gt ROC curves plot the relationship between these two rates Jones POL 2mm To 1 Methodology Bradford 5 Jones UCrDaviS Dept of Political Science ROC Curves gt Imagine two rates a true positive rate TPR and a false positive rate FPR gt ROC curves plot the relationship between these two rates gt In this sense it is sensitivity analysis TPR is sensitivity rate and FPR is lisensitivity Jones POL 2mm To 1 Methodology Bradford 5 Jones UCrDaviS Dept of Political Science ROC Curves gt Imagine two rates a true positive rate TPR and a false positive rate FPR gt ROC curves plot the relationship between these two rates gt In this sense it is sensitivity analysis TPR is sensitivity rate and FPR is lisensitivity gt These curves are sometimes called sensitivity vs l sensitivity graphs Jones POL 2mm To 1 Methodology Bradford 5 Jones UCrDaviS Dept of Political Science ROC Curves gt Can use ROC curves to evaluate competing models or compare models on subgroups Jon POL 29 on I Melllodolo Bradford 5 Jones UCrDaviS Dept of Political Science ROC Curves gt Can use ROC curves to evaluate competing models or compare models on subgroups gt Implemented in Stata and in R Jon POL 29 on I Melllodolo Bradford 5 Jones UCrDaviS Dept of Political Science ROC Curves gt Can use ROC curves to evaluate competing models or compare models on subgroups gt Implemented in Stata and in R gt In R packages ROCR and Zelig will work Jon POL 29 on I Melllodolo Bradford 5 Jones UCrDaviS Dept of Political Science ROC Curves gt Can use ROC curves to evaluate competing models or compare models on subgroups gt Implemented in Stata and in R gt In R packages ROCR and Zelig will work gt In Zelig the ROC plot will return a plot of the probability of 0 against the probability of 1 Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science ROC Curves gt Can use ROC curves to evaluate competing models or compare models on subgroups gt Implemented in Stata and in R gt In R packages ROCR and Zelig will work gt In Zelig the ROC plot will return a plot of the probability of 0 against the probability of 1 gt Imagine the two extremes in such a plot Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science ROC Curves gt Can use ROC curves to evaluate competing models or compare models on subgroups gt Implemented in Stata and in R gt In R packages ROCR and Zelig will work gt In Zelig the ROC plot will return a plot of the probability of 0 against the probability of 1 gt Imagine the two extremes in such a plot gt Then imagine a 45 degree line connecting these two points Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science ROC Curves gt Can use ROC curves to evaluate competing models or compare models on subgroups gt Implemented in Stata and in R gt In R packages ROCR and Zelig will work gt In Zelig the ROC plot will return a plot of the probability of 0 against the probability of 1 gt Imagine the two extremes in such a plot gt Then imagine a 45 degree line connecting these two points gt Models falling on this line would essentially be equivalent to random guesses Jones POL 2mm Top Methodology l I ROC Curve ChaHengers ncumbents Propomon of 0 5 Correcny Predwcted c x x x x 00 02 04 06 08 10 Propomon of 1 5 Correc y Predwcted Jones POL 29m Topnu m Melhodolo y Bradford 5 Jones UCrDaviS Dept of Political Science ROC Curves and Effects Displays gt Departures from the 45 degree line suggests the model39s improvement over merely guessing on the 45 degree line Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science ROC Curves and Effects Displays gt Departures from the 45 degree line suggests the model39s improvement over merely guessing on the 45 degree line gt Covariates seem to do a betterjob accounting for challengers than for incumbents Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science ROC Curves and Effects Displays gt Departures from the 45 degree line suggests the model39s improvement over merely guessing on the 45 degree line gt Covariates seem to do a betterjob accounting for challengers than for incumbents gt Why Potentially useful question to try and answer Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science ROC Curves and Effects Displays gt Departures from the 45 degree line suggests the model39s improvement over merely guessing on the 45 degree line gt Covariates seem to do a betterjob accounting for challengers than for incumbents gt Why Potentially useful question to try and answer gt Comparing alternative models Jones POL 2mm Top Methodology Bradford 5 Jones UCyDaviS Dept of Political Science ROC Curves and Effects Displays gt Departures from the 45 degree line suggests the model39s improvement over merely guessing on the 45 degree line gt Covariates seem to do a betterjob accounting for challengers than for incumbents gt Why Potentially useful question to try and answer gt Comparing alternative models gt Illustration California field poll data on Prop 86 2006 Jones POL 2mm Top Methodology Bradford 5 Jones UCyDaviS Dept of Political Science ROC Curves and Effects Displays gt Departures from the 45 degree line suggests the model39s improvement over merely guessing on the 45 degree line gt Covariates seem to do a betterjob accounting for challengers than for incumbents gt Why Potentially useful question to try and answer gt Comparing alternative models gt Illustration California field poll data on Prop 86 2006 gt Begin with Zelig model Jones POL 2mm Top Methodology l I gt Settlng edueatuou to At mean and adjustmg the Latuuo eovanate gt gt xlo lta setxzout eonseavatuveo lberal1 1at1uoo gt xh1 lta setxzout eonseavatuveeo lberal1 1at1uo1 gt summarysout lt7 smzout 1110 113111 Model logut Number of suuulatuous 1000 Values of x Intercept logage eonseavatuve lubeaal 1at1uo educatuou suoke1oo latnoeducat10n 1 1 3602 o 1 o 61 983 0 Values of x1 Intercept logage eonseavatuve lubeaal 1at1uo educatuou suoke1oo latnoeducat10n 1 1 3602 o 1 1 6 983 6117 Expected Values me mean sd 257 9767 106623 004161 05764 07382 Paedueted Values Y X 1 0327 0673 Fust Buffereuees 1n Expected Values EYX1EYX sd 257 9767 101016 004304 001470 01828 Rusk Ratuos PY1x1PY1X mean sd 639 9767 11155 00699110221300 gt Jones POL 29m Toms m Melhodolo y l I zelgformula yeson86 logage conservatlve llberal lacmo eduoanom smoke100 model mlogm data fp Devlance Reslduals Mm 1 Medlan 80 Max 72115 0896 70502 1018 2127 Coefflclents Esnmace Std Error 2 Value Prom Intercept 2880 8 288 000285 53 708887 02424 368 000084 var conservatlve O6176 01888 7825 000114 llberal 08142 02182 872 000020 var lacmo 21802 0 6346 410 4 2e 05 eduoanom 01081 00427 253 001185 smoke100 O847O 01738 4188 11e 06 var latnoeducat10n 02738 00888 306 000223 Slgnlf codes 0 Hr 0001 001 005 01 1 Dlsperslon parameter for blnonual fanuly taken to be 1 Hull devlance 88148 Resldual devlance 88158 AIC 8778 on 707 degrees of freedom on 700 degrees of freedom Number of Flsher Scormg lteratlons 4 Jones POL 29m Toms m Melhodolo y Bradford 5 Jones UCrDaviS Dept of Political Science ROC Curves Effects Displays gt Difficult with interaction to understand effect Jones POL 2mm To 1 Methodology Bradford 5 Jones UCrDaviS Dept of Political Science ROC Curves Effects Displays gt Difficult with interaction to understand effect gt We see the conditioning effect is negative Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science ROC Curves Effects Displays gt Difficult with interaction to understand effect gt We see the conditioning effect is negative gt As education increases probability of support decreases among Latinos Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science ROC Curves Effects Displays gt Difficult with interaction to understand effect gt We see the conditioning effect is negative gt As education increases probability of support decreases among Latinos gt Side by side plots non pretty Jones POL 2mm Top Methodology Jone Emma Va ues am 03 DA as me xxx 07 na na xxx Bradford 5 Jones UCrDaviS Dept of Political Science ROC Curves gt Back to ROC plots n Melhodol Bradford 5 Jones UCrDaviS Dept of Political Science ROC Curves gt Back to ROC plots gt Illustrate with reduced model Jon POL 29 on I Melllodolo Bradford 5 Jones UCrDaviS Dept of Political Science ROC Curves gt Back to ROC plots gt Illustrate with reduced model gt Smokers only Jon POL 29 on I Melllodolo Bradford 5 Jones UCrDaviS Dept of Political Science ROC Curves b b b D Jones POL 2mm To 1 Methodology Back to ROC plots Illustrate with reduced model Smokers only Let39s inspect a ROC plot Jone ROC Curve FUH Just Smok Propomon of 0 5 Correcny Predwcted Bradford 5 Jones UCrDaviS Dept of Political Science Effects Displays gt Lots of our models have higher order terms Jon POL 29 on I Melhodolo Bradford 5 Jones UCrDaviS Dept of Political Science Effects Displays gt Lots of our models have higher order terms gt Polynomials gt Quadratics D Interactions Jon POL 29 on I Melliodolo Bradford 5 Jones UCrDaviS Dept of Political Science Effects Displays b b b b b Lots of our models have higher order terms Polynomials Quadratics Interactions Difficult to present results in tabular form sometimes Jon POL 29 on I Melliodolo Bradford 5 Jones UCrDaviS Dept of Political Science Effects Displays gt Lots of our models have higher order terms gt Polynomials gt Quadratics gt Interactions gt Difficult to present results in tabular form sometimes gt John Fox has developed an R package called effects Jones POL 2mm To 1 Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Effects Displays Lots of our models have higher order terms Polynomials Quadratics Difficult to present results in tabular form sometimes D D D gt Interactions D gt John Fox has developed an R package called effects D Useful with higher order terms or with multiequation models Jones POL 2mm To 1 Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Effects Displays gt As learned in POL 212 higher order terms yield complicated standard errors Jones POL 2mm To 1 Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Effects Displays gt As learned in POL 212 higher order terms yield complicated standard errors gt Effects may be conditional Jones POL 2mm To 1 Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Effects Displays gt As learned in POL 212 higher order terms yield complicated standard errors gt Effects may be conditional gt Plots wpredicted effects on the higher order relative might be useful to do Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Effects Displays gt As learned in POL 212 higher order terms yield complicated standard errors gt Effects may be conditional gt Plots wpredicted effects on the higher order relative might be useful to do gt Quick illustration using the Prop 86 data Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Effects Displays gt As learned in POL 212 higher order terms yield complicated standard errors gt Effects may be conditional gt Plots wpredicted effects on the higher order relative might be useful to do gt Quick illustration using the Prop 86 data gt Estimate model with conditional effect Jones POL 2mm Top Methodology Bradford 5 Jones UCrDaviS Dept of Political Science Effects Displays b b b As learned in POL 212 higher order terms yield complicated standard errors Effects may be conditional Plots wpredicted effects on the higher order relative might be useful to do Quick illustration using the Prop 86 data Estimate model with conditional effect Inspect the coefficients and plot them Jones POL 2mm Top Methodology gt supportmod lt7 glmyeson86 10 t conservatlve t 115era1 t 1at1no educatlon t smoke100 f g e allulyb1nonual lnku 1031 H datafp gt gt Summarysupport mod ghuformula yeson86 logage t conservatlve t 115era1 t 1at1no e ucatlon smoke100 fanuly 51nom1a1lt11nk uloglt data fp Devlance Reslduals M1 1Q Medlan 80 Max 72115 0896 70502 1018 2127 Coefflclents Estlmate Std Error 2 Value Prom Intercept 28307 08824 2 8 000285 logage O8687 02424 368 000084 conservatlve so 6176 0 1888 7825 0 00114 H 1 beral 0 8142 0 2182 3 72 0 00020 a 2 1802 05345 4 10 4 2eao5 educatlon 0 1081 00427 2 53 001185 smoke100 8470 01738 488 11eaoe 1at1noeducat1on 02738 00888 306 000223 Slgnlf codes 0 0001 001 005 01 1 Dlsperslon parameter for blnonual fanuly taken to be 1 devlance 88148 on 707 degrees of freedom Resldual devlance 88158 on 700 degrees of freedom AIC 8778 Number of Flsher Scormg lteratlons 4 Jones POL 29m Toms m Melhodolo y l I gt Anovasupp0rtmod Anova Table Type 11 tests Response yeson86 LR cmsq Df Prltgtch1sq 323 1 00028 a e 1 o H conservanve 1076 1 00 103 11beral 14130 1 000016 awe lann 1094 1 000094 awe educanon 159 1 020714 smoke1oo 24131 1 82e707 awe lat1noeducat1on 049 1 000206 Slgnlf codes 0 var 0001 H 001 005 01 gt Jone POL 29m Topnu m Melhodolo y Bradford 5 Jones UCrDaviS Dept of Political Science Effects Displays gt Conditional effect holds Jon POL 29 on I Melliodolo Bradford 5 Jones UCrDaviS Dept of Political Science Effects Displays gt Conditional effect holds gt Consider ROC plot Jones POL 2mm To 1 Methodology l I ROC Curve Propomon of 0 5 Correcny Predwcted c x x x x 00 02 04 06 08 10 Propomon of 1 5 Correc y Predwcted Jones POL 29m Topnu m Melhodolo y Bradford 5 Jones UCrDaviS Dept of Political Science Effects Displays gt Use effects package to plot conditional effect of education by Latino Jones POL 2mm To 1 Methodology l I eff lt7 effect lat1noeducat10n x eve JStCLatJn educanon 1o ploteff multhn FALSE ylabuProbabltySupport rufFALSE support mod H Thanks AKM for the help Jone POL 29m Topnu m Melhodolo y mtinoquoteducation effect 39 ProbameSuppon 2 A E E m educauon Jone POL ZQIIG Topnu In Melhodolo Bradford 5 Jones UCrDaviS Dept of Political Science Effects Displays gt Illustration using Fox39s data on race and arrests Jon POL 29 on I Melliodolo Bradford 5 Jones UCrDaviS Dept of Political Science Effects Displays gt Illustration using Fox39s data on race and arrests gt Data available in effects package Jon POL 29 on I Melliodolo Bradford 5 Jones UCrDaviS Dept of Political Science Effects Displays gt Illustration using Fox39s data on race and arrests gt Data available in effects package gt Some code Jon POL 29 on I Melliodolo l I gt dataArrests gt Arrestsyear ltsasfactorArrestsyear gt arrestsmod lt7 lmltreleased employed t cltlzen t checks t colouryear t colourage t famlly rrests s Error unexpected symbol 1n f llyZblnomlal dataArrests summary gt dataArrests gt Arrestsyear ltsasfactorArrestsyear gt arrestsmod lt7 glm employed t cltlzen t checks t colouryear t colourage t famllyblnonual dataArrests summaryltarrestsmodgt H m H m w m m c Call ghuformula released employed t cltlzen t checks t colour year t colour age famlly blnomlal data Arrests Devlance Reslduals Medlan 3Q Max 2479 0324 0448 0626 1713 Coefflclents e Std Er or 2 value Prom Intercept 031007 111 026665 employedYes 8 77 867 lt 2ea16 cltlzenYes 1 37 515 26e 07 we hec 0 02603 1408 lt 2ea16 we colourwhlte 347 000053 we year1888 166 00877 year1888 so 36 071805 year2000 7004 086647 year2001 082 035541 year2002 391 Jones POL 29m Toms m Melhodolo y l I age 002873 000862 333 000086 H colourWhteyear1998 065196 031349 208 003756 colourwmteyear1999 0 15595 0 30704 051 061152 colourwmteyear2ooo 029575 030620 097 033411 colourwmteyear2oo1 7038054 030405 7125 021073 colourwmteyear2oo2 7061732 041926 7147 014091 colourwmteage 7003737 001020 7366 000025 H Srgmf codes 0 0001 001 005 01 1 Drspersron parameter for brnomral fanuly taken to be 1 1 devranee 47763 on 5225 degrees of freedom n Mul Resrdual devra ce 42571 on 5209 degrees of freedom 4291 Number of Frsher Scorrng rteratrons 5 Jone POL 29m Topnu m Melhodolo y Bradford 5 Jones UCrDaviS Dept of Political Science Effects Displays gt Year is a factor n Melhodol Bradford 5 Jones UCrDaviS Dept of Political Science Effects Displays gt Year is a factor gt and is interacted with race Jon POL 29 on I Melhodolo Bradford 5 Jones UCrDaviS Dept of Political Science Effects Displays gt Year is a factor gt and is interacted with race gt Lots of effects and lots of coefficients to report Jon POL 29 on I Melhodolo Bradford 5 Jones UCrDaviS Dept of Political Science Effects Displays gt Year is a factor gt and is interacted with race gt Lots of effects and lots of coefficients to report gt Consider the effects display given by the following code Jones POL 2mm To 1 Methodology l I gt ploteffect colou ear ge arrestsmod xlevels lStage multlneTRUE ylabuProbab111ty of Release rufFALSE 546 Much returns Jone POL 29m Topnu m Melhodolo y coluur year age effect plot co our Probabmty of Re ease 15 2D 25 an 35 An 45 15 2D 25 an 35 An 45 age Jone POL ZQIIG Topnu In Melhodolo

### BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.

### You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

## Why people love StudySoup

#### "There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

#### "I made $350 in just two days after posting my first study guide."

#### "There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

#### "It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

### Refund Policy

#### STUDYSOUP CANCELLATION POLICY

All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email support@studysoup.com

#### STUDYSOUP REFUND POLICY

StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here: support@studysoup.com

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to support@studysoup.com

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.