Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Pooled logistic regression analysis with margins and too many dummies in panel data

    Hi all,

    In my own data, I am currently working on the replication of the following article Currie, J., Duque, V., & Garfinkel, I. (2015). The Great Recession and mothers' health. The Economic Journal, 125(588). (which can be found here: http://onlinelibrary.wiley.com/doi/1...12239/abstract)

    The Currie et al., paper has the following methodology for their analysis:

    They estimate the effect of the local area unemployment rate on mother’s health using two logistic models, one that pools data from years 5 and 9 and controls for a rich set of covariates and year and state fixed-effects, and a second one that accounts for time-invariant mother fixed-effects.

    The following equation describes the first model:

    Click image for larger version

Name:	model 1.png
Views:	2
Size:	7.0 KB
ID:	1423566



    Where Yit denotes mother i’s health outcome measured at time t, UR is the average unemployment rate in baseline states over the last year t from the date of interview, X is
    a matrix of mother characteristics measured at baseline and as and at are vectors of dummies for baseline state and year respectively.

    The baseline state dummies control for any time-invariant state-level factors that are correlated with both state economic conditions and women’s health. The year dummies absorb year specific factors that could affect both the economy and mother’s health; e is the disturbance term. All models are clustered at the baseline state level to account for within-state correlation in the observations. The coefficient of interest is b1. A second logistic model controls for mother-specific fixed-effects later in the article.

    I replicate this pooled analysis in my own similar data, which records mothers health, local area unemployment at the area of the mothers electoral division and several relevant control variables as below:

    My Pooled OLS:
    Click image for larger version

Name:	model 1.png
Views:	2
Size:	12.4 KB
ID:	1423567



    Where Yit refers to the health outcomes or behaviours at time t for individual i, ai is an individual-specific parameter representing the effect of unobserved individual characteristics, b1(Unemployment Rate)i,t refers to the local area unemployment rate, the b are regression coefficients representing the effects of the observed covariates and eit is an independent error term. x'it is a matrix of individuals characteristics included as controls and ax and ay are a vector of dummies for local area (electoral division) and year. These dummies capture any time or local area specific factors that could affect both local area unemployment and the individuals health.

    Models are clustered at the individual local area level (i.e. at the individuals electoral division) to account for within-area correlation in the observations. The coefficient of interest is b1. Changes in health outcomes for individual i at time t are matched with changes in local area unemployment rates.

    Similar to the Currie et al., analysis, the data that I am looking at comes from a questionnaire recorded on the same individuals every five years for three waves of data collection. Unlike the Currie et al., piece, where local area data refers to American States, mine refers to electoral divisions, which is where the respondents living location is broken up into areas similar to villages.

    My interest is how health changes as local area unemployment changes.

    The data can be described in Stata as follows:


    Code:
    
                  storage   display    value
    variable name   type    format     label      variable label
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    binbmi_overwe~y float   %14.0g     yr10_bin_bmi_overweight Are you overweight based on your BMI (Binary)
                                                  
    psum_unempl~e_y float   %36.0g     labpsum_unemployedgwave_y10 Is local are unemployment greater in this wave than previous waves  (Binary)
                                                  
    own_education_y byte    %58.0g     y0_own_education What is your highest level of education (Categorical)
                                                  
    medical_card_y  byte    %9.0g      y10q_medical_card Do you hold a medical card, a means tested form of government provided health insurance (Binary)
                                                  
    employment_y    byte    %56.0g     y10_employment What is your employment status (Categorical)
                                                  
    maritalstatus_y byte    %20.0g     yr10_Marital_Status What is your marital status (Categorical)
                                                  
    ord_age_y       float   %9.0g      ordered_age_year_10 What is your age group (Categorical)
                                                  
    year            byte    %9.0g                 What year is it? (Categorical)
    
    elec_div_y      str209  %209s     What electoral division do you live in? (Categorical)
    As Currie et al., include dummies on the individuals local area I generate numeric electoral division data from the string data on electoral divisions to include electoral division as local area dummies.

    Code:
     
    encode elec_div_y, gen(elec_div_y1)
    The data starts life in wide format so I reshape it from wide to long

    Code:
    reshape long binbmi_overweight_y psum_unemployed_total_gwave_y own_education_y medical_card_y employment_y maritalstatus_y ord_age_y year elec_div_y, i(id) j(year)
     
    xtset id year
    Following all this setup the actual regression is as below:

    Code:
     
     
    logit binbmi_overweight_y i.psum_unemployed_total_gwave_y i.own_education_y i.medical_card_y i.employment_y i.maritalstatus_y i.ord_age_y i.year i.elec_div_y1 if gender==0, cluster (elec_div_y)
     
    estimates store pooled1
    estimates table pooled1, star stats(N r2 r2_a)

    It is worth noting that I include “if gender==0,” as I only want to consider women in my analysis.

    I have a few issues with the logit approach above however, and I think these will be clear in my attachment of the output from this regression in my next comment, unfortunately I had to post separate comments due to exceeding the word limit.
    Attached Files

  • #2
    Code:
    
    
    note: 1.own_education_y != 0 predicts success perfectly
          1.own_education_y dropped and 1 obs not used
    
    
    note: 9.employment_y != 0 predicts success perfectly
          9.employment_y dropped and 1 obs not used
    
    note: 5.elec_div_y1 != 0 predicts failure perfectly
          5.elec_div_y1 dropped and 1 obs not used
    
    note: 6.elec_div_y1 != 0 predicts failure perfectly
          6.elec_div_y1 dropped and 3 obs not used
    
    note: 8.elec_div_y1 != 0 predicts success perfectly
          8.elec_div_y1 dropped and 5 obs not used
    
    note: 9.elec_div_y1 != 0 predicts success perfectly
          9.elec_div_y1 dropped and 3 obs not used
    
    note: 10.elec_div_y1 != 0 predicts failure perfectly
          10.elec_div_y1 dropped and 1 obs not used
    
    note: 11.elec_div_y1 != 0 predicts success perfectly
          11.elec_div_y1 dropped and 3 obs not used
    
    note: 12.elec_div_y1 != 0 predicts failure perfectly
          12.elec_div_y1 dropped and 1 obs not used
    
    note: 16.elec_div_y1 != 0 predicts failure perfectly
          16.elec_div_y1 dropped and 1 obs not used
    
    note: 17.elec_div_y1 != 0 predicts success perfectly
          17.elec_div_y1 dropped and 1 obs not used
    
    note: 19.elec_div_y1 != 0 predicts failure perfectly
          19.elec_div_y1 dropped and 3 obs not used
    
    note: 20.elec_div_y1 != 0 predicts success perfectly
          20.elec_div_y1 dropped and 2 obs not used
    
    note: 23.elec_div_y1 != 0 predicts success perfectly
          23.elec_div_y1 dropped and 3 obs not used
    
    note: 27.elec_div_y1 != 0 predicts failure perfectly
          27.elec_div_y1 dropped and 1 obs not used
    
    note: 29.elec_div_y1 != 0 predicts failure perfectly
          29.elec_div_y1 dropped and 1 obs not used
    
    note: 30.elec_div_y1 != 0 predicts failure perfectly
          30.elec_div_y1 dropped and 3 obs not used
    
    note: 31.elec_div_y1 != 0 predicts success perfectly
          31.elec_div_y1 dropped and 1 obs not used
    
    note: 34.elec_div_y1 != 0 predicts failure perfectly
          34.elec_div_y1 dropped and 3 obs not used
    
    note: 36.elec_div_y1 != 0 predicts success perfectly
          36.elec_div_y1 dropped and 1 obs not used
    
    note: 39.elec_div_y1 != 0 predicts failure perfectly
          39.elec_div_y1 dropped and 1 obs not used
    
    note: 40.elec_div_y1 != 0 predicts success perfectly
          40.elec_div_y1 dropped and 2 obs not used
    
    note: 41.elec_div_y1 != 0 predicts failure perfectly
          41.elec_div_y1 dropped and 1 obs not used
    
    note: 43.elec_div_y1 != 0 predicts failure perfectly
          43.elec_div_y1 dropped and 2 obs not used
    
    note: 47.elec_div_y1 != 0 predicts success perfectly
          47.elec_div_y1 dropped and 3 obs not used
    
    note: 48.elec_div_y1 != 0 predicts success perfectly
          48.elec_div_y1 dropped and 3 obs not used
    
    note: 49.elec_div_y1 != 0 predicts failure perfectly
          49.elec_div_y1 dropped and 2 obs not used
    
    note: 50.elec_div_y1 != 0 predicts success perfectly
          50.elec_div_y1 dropped and 1 obs not used
    
    note: 54.elec_div_y1 != 0 predicts failure perfectly
          54.elec_div_y1 dropped and 1 obs not used
    
    note: 55.elec_div_y1 != 0 predicts failure perfectly
          55.elec_div_y1 dropped and 1 obs not used
    
    note: 56.elec_div_y1 != 0 predicts failure perfectly
          56.elec_div_y1 dropped and 1 obs not used
    
    note: 57.elec_div_y1 != 0 predicts success perfectly
          57.elec_div_y1 dropped and 2 obs not used
    
    note: 62.elec_div_y1 != 0 predicts success perfectly
          62.elec_div_y1 dropped and 1 obs not used
    
    note: 65.elec_div_y1 != 0 predicts failure perfectly
          65.elec_div_y1 dropped and 1 obs not used
    
    note: 66.elec_div_y1 != 0 predicts failure perfectly
          66.elec_div_y1 dropped and 1 obs not used
    
    note: 67.elec_div_y1 != 0 predicts failure perfectly
          67.elec_div_y1 dropped and 1 obs not used
    
    note: 70.elec_div_y1 != 0 predicts success perfectly
          70.elec_div_y1 dropped and 1 obs not used
    
    note: 74.elec_div_y1 != 0 predicts failure perfectly
          74.elec_div_y1 dropped and 3 obs not used
    
    note: 79.elec_div_y1 != 0 predicts failure perfectly
          79.elec_div_y1 dropped and 3 obs not used
    
    note: 80.elec_div_y1 != 0 predicts success perfectly
          80.elec_div_y1 dropped and 1 obs not used
    
    note: 84.elec_div_y1 != 0 predicts failure perfectly
          84.elec_div_y1 dropped and 1 obs not used
    
    note: 85.elec_div_y1 != 0 predicts success perfectly
          85.elec_div_y1 dropped and 1 obs not used
    
    note: 86.elec_div_y1 != 0 predicts failure perfectly
          86.elec_div_y1 dropped and 1 obs not used
    
    note: 87.elec_div_y1 != 0 predicts failure perfectly
          87.elec_div_y1 dropped and 1 obs not used
    
    note: 88.elec_div_y1 != 0 predicts failure perfectly
          88.elec_div_y1 dropped and 3 obs not used
    
    note: 91.elec_div_y1 != 0 predicts success perfectly
          91.elec_div_y1 dropped and 1 obs not used
    
    note: 94.elec_div_y1 != 0 predicts failure perfectly
          94.elec_div_y1 dropped and 1 obs not used
    
    note: 95.elec_div_y1 != 0 predicts success perfectly
          95.elec_div_y1 dropped and 1 obs not used
    
    note: 97.elec_div_y1 != 0 predicts success perfectly
          97.elec_div_y1 dropped and 1 obs not used
    
    note: 99.elec_div_y1 != 0 predicts failure perfectly
          99.elec_div_y1 dropped and 1 obs not used
    
    note: 100.elec_div_y1 != 0 predicts success perfectly
          100.elec_div_y1 dropped and 1 obs not used
    
    note: 104.elec_div_y1 != 0 predicts failure perfectly
          104.elec_div_y1 dropped and 2 obs not used
    
    note: 105.elec_div_y1 != 0 predicts failure perfectly
          105.elec_div_y1 dropped and 1 obs not used
    
    note: 108.elec_div_y1 != 0 predicts success perfectly
          108.elec_div_y1 dropped and 1 obs not used
    
    note: 110.elec_div_y1 != 0 predicts success perfectly
          110.elec_div_y1 dropped and 2 obs not used
    
    note: 111.elec_div_y1 != 0 predicts failure perfectly
          111.elec_div_y1 dropped and 1 obs not used
    
    note: 115.elec_div_y1 != 0 predicts failure perfectly
          115.elec_div_y1 dropped and 1 obs not used
    
    note: 116.elec_div_y1 != 0 predicts failure perfectly
          116.elec_div_y1 dropped and 2 obs not used
    
    note: 117.elec_div_y1 != 0 predicts failure perfectly
          117.elec_div_y1 dropped and 1 obs not used
    
    note: 119.elec_div_y1 != 0 predicts success perfectly
          119.elec_div_y1 dropped and 1 obs not used
    
    note: 120.elec_div_y1 != 0 predicts success perfectly
          120.elec_div_y1 dropped and 1 obs not used
    
    note: 122.elec_div_y1 != 0 predicts failure perfectly
          122.elec_div_y1 dropped and 1 obs not used
    
    note: 123.elec_div_y1 != 0 predicts failure perfectly
          123.elec_div_y1 dropped and 1 obs not used
    
    note: 124.elec_div_y1 != 0 predicts success perfectly
          124.elec_div_y1 dropped and 1 obs not used
    
    note: 126.elec_div_y1 != 0 predicts success perfectly
          126.elec_div_y1 dropped and 1 obs not used
    
    note: 127.elec_div_y1 != 0 predicts success perfectly
          127.elec_div_y1 dropped and 1 obs not used
    
    note: 128.elec_div_y1 != 0 predicts success perfectly
          128.elec_div_y1 dropped and 1 obs not used
    
    note: 130.elec_div_y1 != 0 predicts failure perfectly
          130.elec_div_y1 dropped and 2 obs not used
    
    note: 141.elec_div_y1 != 0 predicts success perfectly
          141.elec_div_y1 dropped and 1 obs not used
    
    note: 142.elec_div_y1 != 0 predicts failure perfectly
          142.elec_div_y1 dropped and 1 obs not used
    
    note: 143.elec_div_y1 != 0 predicts failure perfectly
          143.elec_div_y1 dropped and 2 obs not used
    
    note: 144.elec_div_y1 != 0 predicts success perfectly
          144.elec_div_y1 dropped and 1 obs not used
    
    note: 149.elec_div_y1 != 0 predicts failure perfectly
          149.elec_div_y1 dropped and 1 obs not used
    
    note: 150.elec_div_y1 != 0 predicts failure perfectly
          150.elec_div_y1 dropped and 1 obs not used
    
    note: 151.elec_div_y1 != 0 predicts failure perfectly
          151.elec_div_y1 dropped and 1 obs not used
    
    note: 153.elec_div_y1 != 0 predicts failure perfectly
          153.elec_div_y1 dropped and 1 obs not used
    
    note: 157.elec_div_y1 != 0 predicts failure perfectly
          157.elec_div_y1 dropped and 3 obs not used
    
    note: 158.elec_div_y1 != 0 predicts failure perfectly
          158.elec_div_y1 dropped and 1 obs not used
    
    note: 160.elec_div_y1 != 0 predicts success perfectly
          160.elec_div_y1 dropped and 2 obs not used
    
    note: 162.elec_div_y1 != 0 predicts failure perfectly
          162.elec_div_y1 dropped and 2 obs not used
    
    note: 163.elec_div_y1 != 0 predicts failure perfectly
          163.elec_div_y1 dropped and 3 obs not used
    
    note: 165.elec_div_y1 != 0 predicts success perfectly
          165.elec_div_y1 dropped and 1 obs not used
    
    note: 166.elec_div_y1 != 0 predicts success perfectly
          166.elec_div_y1 dropped and 1 obs not used
    
    note: 167.elec_div_y1 != 0 predicts failure perfectly
          167.elec_div_y1 dropped and 2 obs not used
    
    note: 168.elec_div_y1 != 0 predicts failure perfectly
          168.elec_div_y1 dropped and 1 obs not used
    
    note: 169.elec_div_y1 != 0 predicts failure perfectly
          169.elec_div_y1 dropped and 4 obs not used
    
    note: 171.elec_div_y1 != 0 predicts success perfectly
          171.elec_div_y1 dropped and 1 obs not used
    
    note: 173.elec_div_y1 != 0 predicts failure perfectly
          173.elec_div_y1 dropped and 3 obs not used
    
    note: 176.elec_div_y1 != 0 predicts failure perfectly
          176.elec_div_y1 dropped and 1 obs not used
    
    note: 177.elec_div_y1 != 0 predicts failure perfectly
          177.elec_div_y1 dropped and 1 obs not used
    
    note: 179.elec_div_y1 != 0 predicts success perfectly
          179.elec_div_y1 dropped and 2 obs not used
    
    note: 181.elec_div_y1 != 0 predicts success perfectly
          181.elec_div_y1 dropped and 2 obs not used
    
    note: 182.elec_div_y1 != 0 predicts success perfectly
          182.elec_div_y1 dropped and 4 obs not used
    
    note: 183.elec_div_y1 != 0 predicts success perfectly
          183.elec_div_y1 dropped and 1 obs not used
    
    note: 185.elec_div_y1 != 0 predicts success perfectly
          185.elec_div_y1 dropped and 1 obs not used
    
    note: 186.elec_div_y1 != 0 predicts failure perfectly
          186.elec_div_y1 dropped and 1 obs not used
    
    note: 187.elec_div_y1 != 0 predicts failure perfectly
          187.elec_div_y1 dropped and 1 obs not used
    
    note: 189.elec_div_y1 != 0 predicts failure perfectly
          189.elec_div_y1 dropped and 5 obs not used
    
    note: 190.elec_div_y1 != 0 predicts success perfectly
          190.elec_div_y1 dropped and 1 obs not used
    
    note: 191.elec_div_y1 != 0 predicts failure perfectly
          191.elec_div_y1 dropped and 1 obs not used
    
    note: 192.elec_div_y1 != 0 predicts success perfectly
          192.elec_div_y1 dropped and 2 obs not used
    
    note: 193.elec_div_y1 != 0 predicts success perfectly
          193.elec_div_y1 dropped and 1 obs not used
    
    note: 194.elec_div_y1 != 0 predicts success perfectly
          194.elec_div_y1 dropped and 1 obs not used
    
    note: 5.employment_y != 0 predicts failure perfectly
          5.employment_y dropped and 1 obs not used
    
    note: 201.elec_div_y1 != 0 predicts failure perfectly
          201.elec_div_y1 dropped and 1 obs not used
    
    note: 202.elec_div_y1 != 0 predicts failure perfectly
          202.elec_div_y1 dropped and 1 obs not used
    
    note: 204.elec_div_y1 != 0 predicts failure perfectly
          204.elec_div_y1 dropped and 2 obs not used
    
    note: 207.elec_div_y1 != 0 predicts failure perfectly
          207.elec_div_y1 dropped and 4 obs not used
    
    note: 208.elec_div_y1 != 0 predicts failure perfectly
          208.elec_div_y1 dropped and 3 obs not used
    
    note: 212.elec_div_y1 != 0 predicts failure perfectly
          212.elec_div_y1 dropped and 1 obs not used
    
    note: 213.elec_div_y1 != 0 predicts success perfectly
          213.elec_div_y1 dropped and 1 obs not used
    
    note: 215.elec_div_y1 != 0 predicts failure perfectly
          215.elec_div_y1 dropped and 1 obs not used
    
    note: 216.elec_div_y1 != 0 predicts success perfectly
          216.elec_div_y1 dropped and 1 obs not used
    
    note: 217.elec_div_y1 != 0 predicts success perfectly
          217.elec_div_y1 dropped and 1 obs not used
    
    note: 219.elec_div_y1 != 0 predicts success perfectly
          219.elec_div_y1 dropped and 1 obs not used
    
    note: 220.elec_div_y1 != 0 predicts failure perfectly
          220.elec_div_y1 dropped and 1 obs not used
    
    note: 221.elec_div_y1 != 0 predicts failure perfectly
          221.elec_div_y1 dropped and 2 obs not used
    
    note: 222.elec_div_y1 != 0 predicts failure perfectly
          222.elec_div_y1 dropped and 1 obs not used
    
    note: 223.elec_div_y1 != 0 predicts success perfectly
          223.elec_div_y1 dropped and 1 obs not used
    
    note: 224.elec_div_y1 != 0 predicts failure perfectly
          224.elec_div_y1 dropped and 1 obs not used
    
    note: 225.elec_div_y1 != 0 predicts success perfectly
          225.elec_div_y1 dropped and 1 obs not used
    
    note: 234.elec_div_y1 != 0 predicts failure perfectly
          234.elec_div_y1 dropped and 1 obs not used
    
    note: 235.elec_div_y1 != 0 predicts failure perfectly
          235.elec_div_y1 dropped and 2 obs not used
    
    note: 237.elec_div_y1 != 0 predicts failure perfectly
          237.elec_div_y1 dropped and 2 obs not used
    
    note: 238.elec_div_y1 != 0 predicts failure perfectly
          238.elec_div_y1 dropped and 3 obs not used
    
    note: 240.elec_div_y1 != 0 predicts failure perfectly
          240.elec_div_y1 dropped and 1 obs not used
    
    note: 244.elec_div_y1 != 0 predicts success perfectly
          244.elec_div_y1 dropped and 1 obs not used
    
    note: 245.elec_div_y1 != 0 predicts failure perfectly
          245.elec_div_y1 dropped and 1 obs not used
    
    note: 247.elec_div_y1 != 0 predicts success perfectly
          247.elec_div_y1 dropped and 1 obs not used
    
    note: 248.elec_div_y1 != 0 predicts failure perfectly
          248.elec_div_y1 dropped and 1 obs not used
    
    note: 249.elec_div_y1 != 0 predicts success perfectly
          249.elec_div_y1 dropped and 1 obs not used
    
    note: 250.elec_div_y1 != 0 predicts failure perfectly
          250.elec_div_y1 dropped and 5 obs not used
    
    note: 251.elec_div_y1 != 0 predicts success perfectly
          251.elec_div_y1 dropped and 3 obs not used
    
    note: 253.elec_div_y1 != 0 predicts failure perfectly
          253.elec_div_y1 dropped and 1 obs not used
    
    note: 255.elec_div_y1 != 0 predicts failure perfectly
          255.elec_div_y1 dropped and 2 obs not used
    
    note: 260.elec_div_y1 != 0 predicts success perfectly
          260.elec_div_y1 dropped and 1 obs not used
    
    note: 261.elec_div_y1 != 0 predicts success perfectly
          261.elec_div_y1 dropped and 2 obs not used
    
    note: 263.elec_div_y1 != 0 predicts success perfectly
          263.elec_div_y1 dropped and 1 obs not used
    
    note: 264.elec_div_y1 != 0 predicts failure perfectly
          264.elec_div_y1 dropped and 1 obs not used
    
    note: 266.elec_div_y1 != 0 predicts failure perfectly
          266.elec_div_y1 dropped and 1 obs not used
    
    note: 268.elec_div_y1 != 0 predicts success perfectly
          268.elec_div_y1 dropped and 1 obs not used
    
    note: 269.elec_div_y1 != 0 predicts failure perfectly
          269.elec_div_y1 dropped and 2 obs not used
    
    note: 271.elec_div_y1 != 0 predicts success perfectly
          271.elec_div_y1 dropped and 1 obs not used
    
    note: 272.elec_div_y1 != 0 predicts failure perfectly
          272.elec_div_y1 dropped and 2 obs not used
    
    note: 273.elec_div_y1 != 0 predicts success perfectly
          273.elec_div_y1 dropped and 1 obs not used
    
    note: 276.elec_div_y1 != 0 predicts failure perfectly
          276.elec_div_y1 dropped and 2 obs not used
    
    note: 277.elec_div_y1 != 0 predicts success perfectly
          277.elec_div_y1 dropped and 1 obs not used
    
    note: 278.elec_div_y1 != 0 predicts success perfectly
          278.elec_div_y1 dropped and 1 obs not used
    
    note: 279.elec_div_y1 != 0 predicts failure perfectly
          279.elec_div_y1 dropped and 1 obs not used
    
    note: 283.elec_div_y1 != 0 predicts failure perfectly
          283.elec_div_y1 dropped and 1 obs not used
    
    note: 289.elec_div_y1 != 0 predicts failure perfectly
          289.elec_div_y1 dropped and 3 obs not used
    
    note: 292.elec_div_y1 != 0 predicts failure perfectly
          292.elec_div_y1 dropped and 1 obs not used
    
    note: 293.elec_div_y1 != 0 predicts failure perfectly
          293.elec_div_y1 dropped and 1 obs not used
    
    note: 294.elec_div_y1 != 0 predicts success perfectly
          294.elec_div_y1 dropped and 1 obs not used
    
    note: 298.elec_div_y1 != 0 predicts failure perfectly
          298.elec_div_y1 dropped and 1 obs not used
    
    note: 299.elec_div_y1 != 0 predicts failure perfectly
          299.elec_div_y1 dropped and 1 obs not used
    
    note: 303.elec_div_y1 != 0 predicts success perfectly
          303.elec_div_y1 dropped and 1 obs not used
    
    note: 305.elec_div_y1 != 0 predicts failure perfectly
          305.elec_div_y1 dropped and 2 obs not used
    
    note: 307.elec_div_y1 != 0 predicts success perfectly
          307.elec_div_y1 dropped and 3 obs not used
    
    note: 309.elec_div_y1 != 0 predicts failure perfectly
          309.elec_div_y1 dropped and 5 obs not used
    
    note: 310.elec_div_y1 != 0 predicts success perfectly
          310.elec_div_y1 dropped and 1 obs not used
    
    note: 314.elec_div_y1 != 0 predicts failure perfectly
          314.elec_div_y1 dropped and 1 obs not used
    
    note: 315.elec_div_y1 != 0 predicts success perfectly
          315.elec_div_y1 dropped and 3 obs not used
    
    note: 316.elec_div_y1 != 0 predicts failure perfectly
          316.elec_div_y1 dropped and 2 obs not used
    
    note: 317.elec_div_y1 != 0 predicts success perfectly
          317.elec_div_y1 dropped and 1 obs not used
    
    note: 318.elec_div_y1 != 0 predicts failure perfectly
          318.elec_div_y1 dropped and 1 obs not used
    
    note: 320.elec_div_y1 != 0 predicts failure perfectly
          320.elec_div_y1 dropped and 1 obs not used
    
    note: 323.elec_div_y1 != 0 predicts failure perfectly
          323.elec_div_y1 dropped and 1 obs not used
    
    note: 325.elec_div_y1 != 0 predicts success perfectly
          325.elec_div_y1 dropped and 3 obs not used
    
    note: 326.elec_div_y1 != 0 predicts failure perfectly
          326.elec_div_y1 dropped and 2 obs not used
    
    note: 327.elec_div_y1 != 0 predicts success perfectly
          327.elec_div_y1 dropped and 1 obs not used
    
    note: 329.elec_div_y1 != 0 predicts failure perfectly
          329.elec_div_y1 dropped and 1 obs not used
    
    note: 330.elec_div_y1 != 0 predicts failure perfectly
          330.elec_div_y1 dropped and 1 obs not used
    
    note: 333.elec_div_y1 != 0 predicts failure perfectly
          333.elec_div_y1 dropped and 5 obs not used
    
    note: 336.elec_div_y1 != 0 predicts failure perfectly
          336.elec_div_y1 dropped and 2 obs not used
    
    note: 337.elec_div_y1 != 0 predicts failure perfectly
          337.elec_div_y1 dropped and 2 obs not used
    
    note: 340.elec_div_y1 != 0 predicts success perfectly
          340.elec_div_y1 dropped and 1 obs not used
    
    note: 342.elec_div_y1 != 0 predicts failure perfectly
          342.elec_div_y1 dropped and 2 obs not used
    
    note: 344.elec_div_y1 != 0 predicts failure perfectly
          344.elec_div_y1 dropped and 2 obs not used
    
    note: 353.elec_div_y1 != 0 predicts failure perfectly
          353.elec_div_y1 dropped and 1 obs not used
    
    note: 355.elec_div_y1 != 0 predicts success perfectly
          355.elec_div_y1 dropped and 2 obs not used
    
    note: 357.elec_div_y1 != 0 predicts failure perfectly
          357.elec_div_y1 dropped and 1 obs not used
    
    note: 359.elec_div_y1 != 0 predicts success perfectly
          359.elec_div_y1 dropped and 1 obs not used
    
    note: 360.elec_div_y1 != 0 predicts failure perfectly
          360.elec_div_y1 dropped and 1 obs not used
    
    note: 361.elec_div_y1 != 0 predicts success perfectly
          361.elec_div_y1 dropped and 2 obs not used
    
    note: 362.elec_div_y1 != 0 predicts failure perfectly
          362.elec_div_y1 dropped and 2 obs not used
    
    note: 364.elec_div_y1 != 0 predicts failure perfectly
          364.elec_div_y1 dropped and 2 obs not used
    
    note: 367.elec_div_y1 != 0 predicts success perfectly
          367.elec_div_y1 dropped and 1 obs not used
    
    note: 368.elec_div_y1 != 0 predicts failure perfectly
          368.elec_div_y1 dropped and 1 obs not used
    
    note: 370.elec_div_y1 != 0 predicts failure perfectly
          370.elec_div_y1 dropped and 2 obs not used
    
    note: 372.elec_div_y1 != 0 predicts success perfectly
          372.elec_div_y1 dropped and 1 obs not used
    
    note: 379.elec_div_y1 != 0 predicts failure perfectly
          379.elec_div_y1 dropped and 1 obs not used
    
    note: 384.elec_div_y1 != 0 predicts success perfectly
          384.elec_div_y1 dropped and 3 obs not used
    
    note: 385.elec_div_y1 != 0 predicts success perfectly
          385.elec_div_y1 dropped and 2 obs not used
    
    note: 386.elec_div_y1 != 0 predicts failure perfectly
          386.elec_div_y1 dropped and 1 obs not used
    
    note: 388.elec_div_y1 != 0 predicts success perfectly
          388.elec_div_y1 dropped and 2 obs not used
    
    note: 391.elec_div_y1 != 0 predicts success perfectly
          391.elec_div_y1 dropped and 1 obs not used
    
    note: 393.elec_div_y1 != 0 predicts failure perfectly
          393.elec_div_y1 dropped and 3 obs not used
    
    note: 395.elec_div_y1 != 0 predicts success perfectly
          395.elec_div_y1 dropped and 3 obs not used
    
    note: 398.elec_div_y1 != 0 predicts failure perfectly
          398.elec_div_y1 dropped and 3 obs not used
    
    note: 399.elec_div_y1 != 0 predicts success perfectly
          399.elec_div_y1 dropped and 1 obs not used
    
    note: 401.elec_div_y1 != 0 predicts failure perfectly
          401.elec_div_y1 dropped and 1 obs not used
    
    note: 404.elec_div_y1 != 0 predicts failure perfectly
          404.elec_div_y1 dropped and 1 obs not used
    
    note: 406.elec_div_y1 != 0 predicts failure perfectly
          406.elec_div_y1 dropped and 1 obs not used
    
    note: 407.elec_div_y1 != 0 predicts failure perfectly
          407.elec_div_y1 dropped and 1 obs not used
    
    note: 409.elec_div_y1 != 0 predicts failure perfectly
          409.elec_div_y1 dropped and 1 obs not used
    
    note: 411.elec_div_y1 != 0 predicts success perfectly
          411.elec_div_y1 dropped and 2 obs not used
    
    note: 419.elec_div_y1 != 0 predicts failure perfectly
          419.elec_div_y1 dropped and 1 obs not used
    
    note: 420.elec_div_y1 != 0 predicts failure perfectly
          420.elec_div_y1 dropped and 1 obs not used
    
    note: 421.elec_div_y1 != 0 predicts success perfectly
          421.elec_div_y1 dropped and 1 obs not used
    
    note: 426.elec_div_y1 != 0 predicts failure perfectly
          426.elec_div_y1 dropped and 1 obs not used
    
    note: 428.elec_div_y1 != 0 predicts failure perfectly
          428.elec_div_y1 dropped and 1 obs not used
    
    note: 434.elec_div_y1 != 0 predicts failure perfectly
          434.elec_div_y1 dropped and 2 obs not used
    
    note: 440.elec_div_y1 != 0 predicts failure perfectly
          440.elec_div_y1 dropped and 2 obs not used
    
    note: 441.elec_div_y1 != 0 predicts failure perfectly
          441.elec_div_y1 dropped and 1 obs not used
    
    note: 443.elec_div_y1 != 0 predicts failure perfectly
          443.elec_div_y1 dropped and 2 obs not used
    
    note: 445.elec_div_y1 != 0 predicts failure perfectly
          445.elec_div_y1 dropped and 1 obs not used
    
    note: 448.elec_div_y1 != 0 predicts failure perfectly
          448.elec_div_y1 dropped and 1 obs not used
    
    note: 450.elec_div_y1 != 0 predicts success perfectly
          450.elec_div_y1 dropped and 1 obs not used
    
    note: 451.elec_div_y1 != 0 predicts failure perfectly
          451.elec_div_y1 dropped and 1 obs not used
    
    note: 456.elec_div_y1 != 0 predicts success perfectly
          456.elec_div_y1 dropped and 1 obs not used
    
    note: 459.elec_div_y1 != 0 predicts failure perfectly
          459.elec_div_y1 dropped and 1 obs not used
    
    note: 460.elec_div_y1 != 0 predicts success perfectly
          460.elec_div_y1 dropped and 1 obs not used
    
    note: 462.elec_div_y1 != 0 predicts success perfectly
          462.elec_div_y1 dropped and 1 obs not used
    
    
    
    note: 463.elec_div_y1 != 0 predicts success perfectly
          463.elec_div_y1 dropped and 1 obs not used
    
    note: 464.elec_div_y1 != 0 predicts failure perfectly
          464.elec_div_y1 dropped and 2 obs not used
    
    note: 466.elec_div_y1 != 0 predicts success perfectly
          466.elec_div_y1 dropped and 1 obs not used
    
    note: 6.own_education_y omitted because of collinearity
    note: 373.elec_div_y1 omitted because of collinearity
    Iteration 0:   log pseudolikelihood = -400.90771  
    Iteration 1:   log pseudolikelihood = -326.57287  
    Iteration 2:   log pseudolikelihood = -325.02145  
    Iteration 3:   log pseudolikelihood = -325.00931  
    Iteration 4:   log pseudolikelihood = -325.00931  
    
    Logistic regression                             Number of obs     =        583
                                                    Wald chi2(21)     =          .
                                                    Prob > chi2       =          .
    Log pseudolikelihood = -325.00931               Pseudo R2         =     0.1893
    
                                                                              (Std. Err. adjusted for 111 clusters in elec_div_y)
    -----------------------------------------------------------------------------------------------------------------------------
                                                                |               Robust
                                            binbmi_overweight_y |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    ------------------------------------------------------------+----------------------------------------------------------------
                                  psum_unemployed_total_gwave_y |
                             Increased local area unemployment  |   .9277997   .5249729     1.77   0.077    -.1011282    1.956728
                                                                |
                                                own_education_y |
                                                  No schooling  |          0  (empty)
                                      Primary school education  |   2.266915   1.033709     2.19   0.028     .2408813    4.292948
                                         Some secondary school  |  -.1409099   .6334532    -0.22   0.824    -1.382455    1.100636
                                  Complete secondary education  |  -.0427339   .4368503    -0.10   0.922    -.8989448     .813477
        Some third level education at college, university, RTC  |   1.067673   .4760282     2.24   0.025     .1346752    2.000672
    Complete third level education at college, university, RTC  |          0  (omitted)
                                                                |
                                                 medical_card_y |
                                                           Yes  |   .7713626   .4087799     1.89   0.059    -.0298312    1.572556
                                                                |
                                                   employment_y |
                                                    Unemployed  |  -.2338671   .6494506    -0.36   0.719    -1.506767    1.039033
      Unable to work owing to permanent sickness or disability  |   1.519354   2.495386     0.61   0.543    -3.371513    6.410221
                                             At school/student  |  -1.531315   1.130034    -1.36   0.175    -3.746141    .6835105
                               Seeking work for the first time  |          0  (empty)
                                                      Employed  |   .1985851    .372323     0.53   0.594    -.5311545    .9283247
                                                 Self Employed  |   .5299429   .6023076     0.88   0.379    -.6505583    1.710444
                                 Wholly retired from paid work  |          0  (empty)
                                                                |
                                                maritalstatus_y |
                                                    Cohabiting  |   .0570354   .4793899     0.12   0.905    -.8825516    .9966223
                                                     Separated  |    1.63462   1.470562     1.11   0.266    -1.247628    4.516869
                                                      Divorced  |   .0153922   1.618676     0.01   0.992    -3.157154    3.187939
                                                       Widowed  |  -1.528111   .8361647    -1.83   0.068    -3.166963    .1107421
                                          Single/Never married  |  -1.084619   .6572477    -1.65   0.099    -2.372801    .2035627
                                                                |
                                                      ord_age_y |
                                                         20-23  |   .4478099   .8017746     0.56   0.576     -1.12364    2.019259
                                                         24-27  |  -.2817488   .8398409    -0.34   0.737    -1.927807    1.364309
                                                         28-32  |  -.3916923   .8773841    -0.45   0.655    -2.111334    1.327949
                                                          33 +  |  -.3619976   .9467763    -0.38   0.702    -2.217645     1.49365
                                                                |
                                                           year |
                                                             5  |    .404549   .4727748     0.86   0.392    -.5220725    1.331171
                                                            10  |   .2082771   .6454092     0.32   0.747    -1.056702    1.473256
                                                                |

    Comment


    • #3
      Code:
                                                             year |
                                                               5  |    .404549   .4727748     0.86   0.392    -.5220725    1.331171
                                                              10  |   .2082771   .6454092     0.32   0.747    -1.056702    1.473256
                                                                  |
                                                      elec_div_y1 |
                                               An Caisleán Gearr  |          0  (empty)
                                                     An Carn Mór  |          0  (empty)
                                                     An Cnoc Buí  |  -.3295866   .4504056    -0.73   0.464    -1.212365    .5531921
                                                      An Crompán  |          0  (empty)
                                                      An Spidéal  |          0  (empty)
                                                      An Turlach  |          0  (empty)
                                                          Annagh  |          0  (empty)
                                                      Annaghdown  |          0  (empty)
                                                    Ardamullivan  |   1.244851    .508612     2.45   0.014       .24799    2.241712
                                                    Arran Quay C  |          0  (empty)
                                                       Ashtown B  |          0  (empty)
                                                         Athenry  |    2.16407   .4679042     4.63   0.000     1.246995    3.081146
                                                 Athy East Urban  |          0  (empty)
                                                      Athy Rural  |          0  (empty)
                                                         Aughrim  |   .4308865   .4795682     0.90   0.369    -.5090499    1.370823
                                                    Baile Chláir  |          0  (empty)
                                 Baile an Teampaill (Part Rural)  |   1.560807   .5087542     3.07   0.002     .5636676    2.557947
                                                Balbriggan Rural  |          0  (empty)
                                                         Ballina  |          0  (empty)
                                                   Ballinacarrig  |          0  (empty)
                                                    Ballinaclash  |          0  (empty)
                                                  Ballinascorney  |  -1.396663   .3582328    -3.90   0.000    -2.098787   -.6945401
                                                     Ballinlough  |          0  (empty)
                                                      Ballinrobe  |   .6561947   .5277982     1.24   0.214    -.3782708     1.69066
                                            Ballinteer-Broadford  |          0  (empty)
                                               Ballinteer-Marley  |  -.4582436   .4753631    -0.96   0.335    -1.389938     .473451
                                                       Ballitore  |          0  (empty)
                                                          Ballon  |          0  (empty)
                                                      Ballyadams  |          0  (empty)
                                                       Ballybaan  |   1.336982   .4893455     2.73   0.006     .3778825    2.296081
                                                      Ballyboden  |          0  (empty)
                                                    Ballycahalan  |   .3231637   .5941997     0.54   0.587    -.8414463    1.487774
                                                     Ballygall A  |          0  (empty)
                                                     Ballyhaunis  |          0  (empty)
                                                      Ballyhooly  |          0  (empty)
                                                      Ballylynan  |          0  (empty)
                                                      Ballymun C  |          0  (empty)
                                                   Ballynacourty  |          0  (empty)
                                                   Ballynadrumny  |          0  (empty)
                                                      Ballynagar  |          0  (empty)
                                                   Ballysax West  |          0  (empty)
                                                    Ballyshannon  |   1.426186   .3355706     4.25   0.000       .76848    2.083893
                                                      Ballyshear  |          0  (empty)
                                                     Ballyvaldon  |          0  (empty)
                                                       Balraheen  |          0  (empty)
                                                           Beagh  |          0  (empty)
                                                          Bearna  |  -2.002788   .2872735    -6.97   0.000    -2.565834   -1.439743
                                                      Beaumont B  |          0  (empty)
                                       Blanchardstown-Blakestown  |   1.399027   .4372417     3.20   0.001     .5420495    2.256006
                                          Blanchardstown-Corduff  |          0  (empty)
                                          Blanchardstown-Delwood  |          0  (empty)
                                                     Blessington  |  -1.617845   .5386476    -3.00   0.003    -2.673575   -.5621148
                                                      Bodenstown  |  -.1847265   .4606301    -0.40   0.688    -1.087545    .7180919
                                                   Bohernabreena  |  -.4365366   .3070749    -1.42   0.155    -1.038392    .1653192
                                                          Boston  |          0  (empty)
                                                       Bracklagh  |          0  (empty)
                                                       Breanrisk  |          0  (empty)
                                                        Breedoge  |          0  (empty)
                                                         Bunowen  |          0  (empty)
                                                         Burgage  |  -.5448205   .4944438    -1.10   0.271    -1.513912    .4242716
                                                    Cabra West B  |          0  (empty)
                                                      Cadamstown  |  -.5457793    .492499    -1.11   0.268     -1.51106     .419501
                                                       Cahermore  |          0  (empty)
                                                         Carbury  |          0  (empty)
                                                    Carlow Rural  |  -1.733985   .9089275    -1.91   0.056     -3.51545    .0474799
                                                           Carna  |          0  (empty)
                                                       Carnalway  |          0  (empty)
                                                         Carragh  |          0  (empty)
                                                       Carrigeen  |   .8967092   1.392953     0.64   0.520    -1.833428    3.626846
                                                    Castledermot  |          0  (empty)
                                                   Castlegregory  |          0  (empty)
                                         Castleknock-Knockmaroon  |  -.8706416   .9760036    -0.89   0.372    -2.783574     1.04229
                                                      Castlequin  |          0  (empty)
                                                     Castlereagh  |   .2409825   .7150952     0.34   0.736    -1.160578    1.642543
                                                   Castlerickard  |          0  (empty)
                               Ceathrú an Bhrúnaigh (Part Rural)  |          0  (empty)
                                                       Celbridge  |   .7658718    .405894     1.89   0.059    -.0296658    1.561409
                                                Cherry Orchard C  |  -1.846924   .3847118    -4.80   0.000    -2.600946   -1.092903
                                            Churchtown-Landscape  |          0  (empty)
                                             Churchtown-Nutgrove  |          0  (empty)
                                                    Cill Aithnín  |          0  (empty)
                                                     Cill Bhríde  |   1.298005   .6886607     1.88   0.059    -.0517452    2.647755
                                                    Cill Chuimin  |          0  (empty)
                                                        Claddagh  |          0  (empty)
                                                           Clane  |  -.3176648    .379209    -0.84   0.402    -1.060901    .4255712
                                                      Clareabbey  |          0  (empty)
                                                     Claremorris  |          0  (empty)
                                                       Claretuam  |          0  (empty)
                                                    Clarinbridge  |  -1.511048   .6311279    -2.39   0.017    -2.748036   -.2740602
                                                         Cleggan  |          0  (empty)
                                                         Clifden  |          0  (empty)
                                                    Cloch na Rón  |          0  (empty)
                                                         Clogher  |          0  (empty)
                                              Clondalkin Village  |  -2.166029   .5809251    -3.73   0.000    -3.304621   -1.027437
                                           Clondalkin-Ballymount  |   .1031526    .616404     0.17   0.867    -1.104977    1.311282
                                          Clondalkin-Cappaghmore  |   .8255498   .5509093     1.50   0.134    -.2542126    1.905312
                                             Clondalkin-Dunawley  |   .6743542   .3511617     1.92   0.055      -.01391    1.362618
                                            Clondalkin-Monastery  |  -1.518198   .5686668    -2.67   0.008    -2.632764   -.4036311
                                            Clondalkin-Moorfield  |   .7695455   .5090148     1.51   0.131    -.2281051    1.767196
                                              Clondalkin-Rowlagh  |  -.7873042   .5781547    -1.36   0.173    -1.920467    .3458582
                                                        Clonmore  |          0  (empty)
                                          Clonskeagh-Farranboley  |          0  (empty)
                                         Clonskeagh-Windy Arbour  |          0  (empty)
                                                 Clontarf East A  |          0  (empty)
                                                           Conga  |          0  (empty)
                                                         Coolboy  |          0  (empty)
                                                        Coolnaha  |          0  (empty)
                                                 Cootehill Rural  |          0  (empty)
                                                      Craughwell  |    .095087   .3192262     0.30   0.766    -.5305848    .7207589
                                                          Creggs  |          0  (empty)
                                                      Crossakeel  |          0  (empty)
                                                       Crumlin A  |  -.6525076   .3551366    -1.84   0.066    -1.348562    .0435474
                                                       Crumlin B  |          0  (empty)
                                                       Crumlin C  |   .5610529   .3164017     1.77   0.076    -.0590832    1.181189
                                                       Crumlin E  |          0  (empty)
                                                       Crumlin F  |          0  (empty)
                                                          Dalgan  |          0  (empty)
                                                 Dalkey-Avondale  |          0  (empty)
                                                          Dangan  |          0  (empty)
                                                       Danganbeg  |          0  (empty)
                                                          Decies  |          0  (empty)
                                                   Derryglassaun  |          0  (empty)
                                                    Donaghcumper  |          0  (empty)
                                                   Donaghpatrick  |          0  (empty)
                                                        Downings  |          0  (empty)
                                 Droichead Nua (Newbridge) Urban  |          0  (empty)
                                                      Drumcreehy  |          0  (empty)
                                                        Drumfinn  |          0  (empty)
                                                      Drumlumman  |          0  (empty)
                                                        Dunboyne  |   1.051592   .4985208     2.11   0.035     .0745097    2.028675
                                             Dundalk Urban No. 3  |          0  (empty)
                                                   Dundrum-Taney  |          0  (empty)
                                                       Dunfierth  |          0  (empty)
                                                        Dunlavin  |          0  (empty)
                                                         Dunleer  |          0  (empty)
                                                       Dunmanoge  |          0  (empty)
                                                   Dunmore North  |          0  (empty)
                                                    Dunshaughlin  |          0  (empty)
                                                          Dysert  |          0  (empty)
                                                    Eanach Dhúin  |   -.134802    .439934    -0.31   0.759    -.9970568    .7274529
                                                     Edmondstown  |  -1.048064   .5188818    -2.02   0.043    -2.065054   -.0310745
                                                     Ennis Rural  |   1.535727   .5508126     2.79   0.005     .4561538      2.6153
                                                      Enniskerry  |          0  (empty)
                                                      Ennistimon  |          0  (empty)
                                                      Fairymount  |          0  (empty)
                                                Firhouse Village  |          0  (empty)
                                            Firhouse-Ballycullen  |          0  (empty)
                                                      Frenchpark  |  -1.066241   1.133739    -0.94   0.347    -3.288328    1.155846
                                                          Gallow  |          0  (empty)
                                                          Garmna  |          0  (empty)
                                                      Glencullen  |          0  (empty)
                                                           Glynn  |          0  (empty)
                                                            Gort  |          0  (empty)
                                                   Graigue Rural  |   .1326024   .4139378     0.32   0.749    -.6787008    .9439055
                                                          Graney  |          0  (empty)
                                                          Grange  |          0  (empty)
                                                        Grange A  |          0  (empty)
                                                       Greethill  |          0  (empty)
                                                          Grilly  |          0  (empty)
                                                     Hacketstown  |          0  (empty)
                                                       Hartstown  |          0  (empty)
                                                        Headford  |    1.16811   .5122354     2.28   0.023     .1641471    2.172073
                                                      Houndswood  |  -.9457951   .4475579    -2.11   0.035    -1.822992   -.0685978
                                                     Inchicore A  |   .9720503   .5273932     1.84   0.065    -.0616213    2.005722
                                                        Innfield  |   -.823829    .430292    -1.91   0.056    -1.667186    .0195279
                                                     Kilbeacanty  |          0  (empty)
                                                       Kilbennan  |          0  (empty)
                                                         Kilcock  |          0  (empty)
                                                         Kilcomb  |          0  (empty)
                                                     Kilconickny  |  -1.239922    .306418    -4.05   0.000     -1.84049   -.6393537
                                                     Kilconierin  |          0  (empty)
                                                       Kilcullen  |    1.07872   .4992415     2.16   0.031     .1002242    2.057215
                                                         Kildare  |   1.322617   .4799913     2.76   0.006     .3818516    2.263383
                                                      Kilfiddane  |          0  (empty)
                                                       Kilgorman  |          0  (empty)
                                                        Kilkelly  |          0  (empty)
                                                            Kill  |          0  (empty)
                                                         Killard  |          0  (empty)
                                                        Killeely  |          0  (empty)
                                                         Killeen  |          0  (empty)
                                                   Killeenavarra  |  -.3671645    .377446    -0.97   0.331    -1.106945    .3726161
                                                       Killilagh  |          0  (empty)
                                                        Killimor  |          0  (empty)
                                                  Killiney North  |  -.1148087    .510697    -0.22   0.822    -1.115756     .886139
                                                    Killogilleen  |   .5221271   .5966834     0.88   0.382    -.6473509    1.691605
                                                      Killorglin  |          0  (empty)
                                                          Killua  |          0  (empty)
                                                        Killursa  |  -.9085869   .5288204    -1.72   0.086    -1.945056     .127882
                                                     Kilmacanoge  |          0  (empty)
                                                        Kilmaine  |          0  (empty)
                                                    Kilmainham A  |   1.304753   .4791827     2.72   0.006     .3655722    2.243934
                                                    Kilmainham B  |          0  (empty)
                                                    Kilmainham C  |  -.2698379   .6502125    -0.41   0.678    -1.544231    1.004555
                                                  Kilmeage North  |          0  (empty)
                                                  Kilmeage South  |          0  (empty)
                                                         Kilrush  |          0  (empty)
                                                   Kilrush Rural  |          0  (empty)
                                                       Kilshanvy  |          0  (empty)
                                                       Kiltartan  |   .0012474   .5428931     0.00   0.998    -1.062803    1.065298
                                                       Kilteevan  |          0  (empty)
                                                      Kilteskill  |          0  (empty)
                                                      Kiltullagh  |          0  (empty)
                                                       Kimmage A  |          0  (empty)
                                                       Kimmage B  |   .6505712   .4510949     1.44   0.149    -.2335586    1.534701
                                                       Kimmage E  |   .8476407   .5382179     1.57   0.115    -.2072469    1.902528
                                                         Kineagh  |          0  (empty)
                                                        Kinnegad  |  -.0942534   .3272896    -0.29   0.773    -.7357292    .5472225
                                                     Knock North  |   .2850603   .4595707     0.62   0.535    -.6156818    1.185802
                                                     Knocknagore  |          0  (empty)
                                                        Kylemore  |   .5816362   .4093527     1.42   0.155    -.2206803    1.383953
                                                   Lady's Island  |          0  (empty)
                                                        Ladytown  |          0  (empty)
                                                          Laragh  |          0  (empty)
                                                    Leacach Beag  |   1.716254   .5128219     3.35   0.001     .7111418    2.721367
                                                         Leixlip  |  -1.372366   .3065703    -4.48   0.000    -1.973233   -.7714992
                                                     Liscananaun  |          0  (empty)
                                                   Lismore Urban  |          0  (empty)
                                                  Loughrea Rural  |          0  (empty)
                                                  Loughrea Urban  |  -.6563787   .4505802    -1.46   0.145      -1.5395    .2267423
                                                   Lucan Heights  |          0  (empty)
                                                     Lucan-Esker  |  -.5700818   .3270264    -1.74   0.081    -1.211042    .0708782
                                               Lucan-St. Helen's  |          0  (empty)
                                                   Maigh Cuilinn  |          0  (empty)
                                              Mallow North Urban  |          0  (empty)
                                                        Maynooth  |  -.0562897   .3564852    -0.16   0.875    -.7549877    .6424084
                                                          Maíros  |  -.4964948   .5297586    -0.94   0.349    -1.534803    .5418131
                                                Merchants Quay A  |          0  (empty)
                                                Merchants Quay C  |          0  (empty)
                                                Merchants Quay F  |          0  (empty)
                                                          Mervue  |          0  (empty)
                                                        Milltown  |          0  (empty)
                                                        Mionlach  |   .1863977   .4259391     0.44   0.662    -.6484275    1.021223
                                                           Moate  |          0  (empty)
                                                    Monasterevin  |   .4844287   .3757484     1.29   0.197    -.2520247    1.220882
                                                Morristownbiller  |   .2606363   .3749341     0.70   0.487    -.4742209    .9954936
                                                    Mount Bellew  |          0  (empty)
                                                      Mounthazel  |          0  (empty)
                                                           Moyne  |          0  (empty)
                                                       Muckanagh  |          0  (empty)
                                                 Mullingar Rural  |          0  (empty)
                                                         Murneen  |          0  (empty)
                                                        Murroogh  |   .6989364   .4733078     1.48   0.140    -.2287297    1.626603
                                                      Naas Urban  |          0  (empty)
                                                     Navan Rural  |   .6582351   .3636934     1.81   0.070    -.0545909    1.371061
                                                     Navan Urban  |          0  (empty)
                                                           Neale  |          0  (empty)
                                                       Newcastle  |   2.378412   .5136238     4.63   0.000     1.371728    3.385096
                                                 Newcastle Lower  |   1.198493   .3995493     3.00   0.003     .4153905    1.981595
                                                 Newcastle Upper  |          0  (empty)
                                                    North Dock C  |          0  (empty)
                                          Noughaval / Castletown  |          0  (empty)
                                                     Nuns Island  |   1.165529   .6278211     1.86   0.063     -.064978    2.396035
                                                        Oranmore  |   1.334983   .7844572     1.70   0.089     -.202525    2.872491
                                                      Oughterard  |  -.0214015   .3995788    -0.05   0.957    -.8045616    .7617586
                                                 Palmerston West  |  -1.345532   .3340637    -4.03   0.000    -2.000285   -.6907791
                                                 Pembroke West A  |          0  (empty)
                                             Portarlington South  |          0  (empty)
                               Portlaoighise (Maryborough) Urban  |          0  (empty)
                                                    Priorswood D  |          0  (empty)
                                                         Querrin  |          0  (empty)
                                                          Rahill  |          0  (empty)
                                                          Rahoon  |          0  (empty)
                                                       Rathcoole  |          0  (empty)
                                                      Rathdangan  |   .9204956   .4590469     2.01   0.045     .0207802    1.820211
                                                        Rathdrum  |   .1680835   .5709192     0.29   0.768    -.9508975    1.287065
                                                       Rathernan  |          0  (empty)
                                          Rathfarnham-St. Enda's  |          0  (empty)
                                                Rathmines West D  |          0  (empty)
                                                Rathmines West F  |   .3112243   .7021698     0.44   0.658    -1.065003    1.687452
                                                       Rathvilly  |          0  (empty)
                                                         Ratoath  |          0  (empty)
                                                      Riverstown  |   .8777617   .4921161     1.78   0.074     -.086768    1.842292
                                                      Rockbarton  |  -.8496172   .3429267    -2.48   0.013    -1.521741   -.1774932
                                                      Rodanstown  |          0  (empty)
                                                        Salthill  |          0  (empty)
                                                        Scarriff  |          0  (empty)
                                                        Shankill  |          0  (empty)
                                             Shankill-Shanganagh  |   1.371761   .7543881     1.82   0.069    -.1068121    2.850335
                                                       Shantalla  |          0  (empty)
                                                        Sillerna  |   .3058759   .5093645     0.60   0.548    -.6924601    1.304212
                                               Sliabh an Aonaigh  |          0  (empty)
                                         St. Mary's (Part Rural)  |          0  (empty)
                                                     St. Peter's  |          0  (empty)
                                                       Stamullin  |  -.4040237   .4314135    -0.94   0.349    -1.249579    .4415312
                                                      Stradbally  |          0  (empty)

      Comment


      • #4
        Code:
                                                        Stradbally  |          0  (empty)
                                                          Straffan  |          0  (empty)
                                                        Summerhill  |   1.753766   .6573832     2.67   0.008     .4653184    3.042213
                                                            Sutton  |          0  (empty)
                                                    Swords-Forrest  |          0  (empty)
                                                   Swords-Glasmore  |  -.6785089   .2137448    -3.17   0.002    -1.097441   -.2595767
                                                           Tailtin  |          0  (empty)
                                                  Tallaght-Avonbeg  |          0  (empty)
                                              Tallaght-Fettercairn  |  -.6626539   .6290184    -1.05   0.292    -1.895507    .5701995
                                                 Tallaght-Glenview  |          0  (empty)
                                                 Tallaght-Jobstown  |   .0214372   .4458372     0.05   0.962    -.8523876     .895262
                                              Tallaght-Killinardan  |          0  (empty)
                                              Tallaght-Kilnamanagh  |   .3763309    .476169     0.79   0.429    -.5569432    1.309605
                                                Tallaght-Kiltipper  |    1.67275   .3011907     5.55   0.000     1.082427    2.263073
                                                Tallaght-Kingswood  |   -.186877    .360649    -0.52   0.604     -.893736     .519982
                                                Tallaght-Millbrook  |   .2272013   .5278142     0.43   0.667    -.8072956    1.261698
                                              Tallaght-Springfield  |  -.6640142   .3561472    -1.86   0.062     -1.36205    .0340214
                                                    Tallaght-Tymon  |   .3460644   .3083975     1.12   0.262    -.2583836    .9505123
                                                      Taylors Hill  |          0  (empty)
                                                Templeogue-Cypress  |          0  (empty)
                                          Templeogue-Kimmage Manor  |          0  (empty)
                                               Templeogue-Limekiln  |   -1.15512   .3809206    -3.03   0.002    -1.901711   -.4085297
                                                 Templeogue-Orwell  |  -.5800691   .4533984    -1.28   0.201    -1.468714    .3085755
                                              Terenure-Cherryfield  |          0  (empty)
                                               Terenure-Greentrees  |  -.3526167   .3824177    -0.92   0.356    -1.102141    .3969082
                                                Terenure-St. James  |          0  (empty)
                                                     Timahoe South  |   1.560015   .4288113     3.64   0.000     .7195601     2.40047
                                                            Togher  |          0  (empty)
                                                        Trim Rural  |      .6016   .4058631     1.48   0.138     -.193877    1.397077
                                                        Tuam Rural  |   -.507977   .4548404    -1.12   0.264    -1.399448    .3834938
                                                        Tuam Urban  |  -2.083885    1.36254    -1.53   0.126    -4.754414    .5866438
                                                          Tuckmill  |          0  (empty)
                                              Tulaigh Mhic Aodháin  |          0  (empty)
                                                      Tullow Rural  |          0  (empty)
                                                      Tullow Urban  |   .3903211   .5183572     0.75   0.451    -.6256404    1.406283
                                                            Tynagh  |          0  (empty)
                                                            Ullard  |          0  (empty)
                                                          Ushers A  |          0  (empty)
                                                          Ushers B  |          0  (empty)
                                                          Ushers C  |  -.6554296   .4419911    -1.48   0.138    -1.521716    .2108571
                                                          Virginia  |   1.238889   .7616799     1.63   0.104    -.2539763    2.731754
                                                     Walkinstown A  |          0  (empty)
                                                     Walkinstown C  |  -.4310939   .4869502    -0.89   0.376    -1.385499    .5233109
                                                     Wexford Rural  |          0  (empty)
                                                       Whitehall C  |          0  (empty)
                                                     Wicklow Rural  |     .10772   .1374345     0.78   0.433    -.1616467    .3770867
                                                       Wood Quay A  |          0  (empty)
                                                       Wood Quay B  |          0  (empty)
                                                          Woodford  |          0  (empty)
                                                          Wormhole  |   .4169283   .3514278     1.19   0.235    -.2718575    1.105714
                                                            Árainn  |          0  (empty)
                                                                    |
                                                              _cons |  -.7937904   1.045474    -0.76   0.448    -2.842883    1.255302
        -----------------------------------------------------------------------------------------------------------------------------
        
        .












        Comment


        • #5
          My concerns:

          1) In the Currie et al., paper when they included dummies on the respondents local area, they had data on something in the order of 15 states to analysze, I have roughly 465 electoral divisions in my own data, which of course creates a lot of dummies.

          2) Estimating like this leaves me with a lot of dummies reporting zero coefficients and “(empty)” standard errors which is a result that I don't really understand.

          3) My understanding of factor variable notation is that dummies are compared to some reference group, but I don’t understand how a reference group can make any sense here for address location, i.e. if I use factor variable notation (i.elec_div_y) to create and include electoral division dummies surely all the different electoral divisions are being compared to one electoral division which has been omitted.

          Although this would make sense in a regression which included i.education, where I could say that if “less than a high school degree” was the omitted group, that individuals with high levels of education report better health outcomes than those with "less than a high school degree", I’m not sure how much sense this would make in terms of comparing geographical information? Or what the interpretation could possibly be here?

          Thus I was thinking of dropping the i.elec_div_y dummies from my own analysis. Can anyone point out why this may be a mistake or if there is a better approach to including these? What is a good theoretical reason for keeping or leaving these.

          4) Where the models are clustered is something that I am very conflicted about. I am trying to remain as true to the original analysis by clustering at the local area level (i.e. at the individuals electoral division) to account for within-area correlation in the observations. However, this is a pooled regression in panel data. That is to say, although the observations may be independent across groups (clusters) this may not necessarily be true within groups. So, I am aware that when clustvar specifies to which group each observation belongs, in data with repeated observations on individuals it is common to cluster on the individual, for example, cluster (personid). However, the analysis that I am trying to replicate clusters on the local area level instead.

          Would it acceptable to point out that I know that the pooled OLS estimator ignores the panel structure of the data but to refer the reader to the fixed effects analysis I do of this relationship later in this paper, in order to account for this? I feel this is the logic Currie et al., took in their own analysis which similarly made use of panel data in a pooled analysis and clustered at the area level.

          Powering through to the interpretation of results, for the tables I will produce in this paper I would like to provide the raw coefficients from the analysis, and then something that it more easily interpretable by the reader, thus I do the following:

          Code:
          margins if gender==0, dydx(psum_unemployed_total_gwave_y) post
           
          outreg2 using test.doc, word replace ctitle(Marginal effects)
          I only include the unemployment variable here because this is the only result that I wish to report in my tables, the effect of local area unemployment level on health outcomes.

          Code:
          . margins if gender==0, dydx(psum_unemployed_total_gwave_y) post
          
          Average marginal effects                        Number of obs     =        583
          Model VCE    : Robust
          
          Expression   : Pr(binbmi_overweight_y), predict()
          dy/dx w.r.t. : 1.psum_unemployed_total_gwave_y
          
          ----------------------------------------------------------------------------------------------------
                                             |            Delta-method
                                             |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
          -----------------------------------+----------------------------------------------------------------
               psum_unemployed_total_gwave_y |
          Increased local area unemployment  |   .1802942   .0996892     1.81   0.071     -.015093    .3756813
          ----------------------------------------------------------------------------------------------------
          Note: dy/dx for factor levels is the discrete change from the base level.
          
          . 
          . outreg2 using test.doc, word replace ctitle(Marginal effects)
          test.doc
          dir : seeout
          My understanding is that marginal effects describe the increases or decreases in percentage points that independent variables might cause for the dependent variable. Thus, my interpretation is that if "has local area unemployment increased in the past three waves" changes from false to true (i.e. zero to one for this binary variable), at any point during the three waves of data collected, that the probability of being overweight increases by 18%.

          Put another way, as the local area unemployment variable is a binary variable which describes whether or not local area unemployment increased in any of the three waves in the data (zero meaning that it hasn't and one meaning that it has), my understanding of the (average) marginal effect of local area unemployment on the probability of being overweight is that the average marginal effect of local area unemployment is 18 percentage points. That is, everything else equal, I would expect an 18 percentage point increase in the proportion of respondents who report being overweight if their local area unemployment changes from not having increased at some point over the past three waves to having increased at some point over the past three waves.

          Is this a correct interpretation of results?

          I have also read that margins would give the wrong answers if I did not use factor variables, but I don’t understand why that is the case? Can anyone describe the logic behind this?

          I also apologize for the way my question was posted, I ran out of characters and wasn't sure how else to provide a full explanation of my analysis, I know that Statalist prefers to see code in its entirety and is not a fan of images of code being uploaded, my apologies again.

          Many thanks for any help provided here,

          Kindest regards,

          John

          Sources:

          https://www.stata.com/meeting/german.../de13_jann.pdf

          http://www.princeton.edu/~otorres/Margins.pdf

          https://www3.nd.edu/~rwilliam/stats/Margins01.pdf

          https://www.statalist.org/forums/for...tic-regression

          Comment


          • #6
            I can respond to some, but not all, of your concerns.

            1. Yes, that's a lot of indicators ("dummies.") The question is whether your data set is rich enough to meaningfully analyze the data at this fine level of disaggregation. The results make that seem questionable, as, in the end, you have only 583 observations in the estimation sample, which is rather skimpy for this number of variables.

            2. So, you have a long list of electoral districts that are excluded because of perfect prediction. "Perfect prediction" means that, after weeding out observations that can't be part of the estimation sample due to missing values on predictors, all of the respondents in that electoral district have the same value for the outcome variable. Remember that -logit- estimates model parameters by maximum likelihood. When a regressor variable perfectly predicts the outcome in a logistic model, the maximum likelihood estimate for its coefficient will be infinte (positive or negative, depending on whether it's all 1's or all 0's.) So there is no way that maximum likelihood estimation can converge if these observations and indicators are included in the model. Stata resolves this problem by removing them. For practical purposes, there is no way around this. While there are other approaches to logistic model estimation, as implemented, for example,-exlogistic-, these approaches are quite computationally intensive and I doubt that they would finish running on an example of this complexity in your lifetime (unless they ran out of memory and terminated without results). Even if you got results from these, it seems that your data set is too small for this fine-grained an analysis, and the results would probably not be useful.

            3. Your understanding of factor-variable notation is correct. This is the standard way of representing categorical predictors in regression models. There are other ways of handling categorical regressors as well. But all of them have in common that something, somewhere has to get left out. The reason is that with a complete set of indicators for each level of the categorical variable and a constant term in the model, you have an exact linear relationship: constant = sum of indicators. This leaves the model unidentified. Some assumption must be made to identify the model, and whatever constraint on the relationship among the indicators and constant is imposed in order to do that, a degree of freedom is lost as a result. This is a mathematical necessity. You can't program around it, and you won't find any software that is exempt from it. The usual approach is to constrain the coefficient of a selected level of the categorical predictor, usually referred to as the base or reference category, to zero (or, equivalently, omitting that indicator.) This is what factor-variable notation does. It has a default rule for which to select, although it can be over-ridden if you like. See -help fvvarlist-. That said, if you wish to see predicted margins (expected probabilities) for each election district, you can do that with the -margins- command by running -margins elec_div_y1-. These expected probabilities are all identified, and -margins- will not omit any reference level from the output. (In your situation, however, many of the levels are excluded from your regression, so they will not be represented.)

            If you run the model without the election district indicators, it is a different model, embodying different assumptions, from the one including them. The coefficients of other variables may differ, even greatly, even to the extent of having opposite signs. It is a substantive question, not a statistical one, whether the model with or without these indicators is the correct model to answer your research question. I imagine that were I to read the Currie article you cited (thank you for the complete reference) I could discern which approach is appropriate here. I have not done that, and I doubt my institution has access to it. But that is the task that faces you here: you have to decide which model answers the research questions by understanding the substance of the question and the meaning of each model. There are no statistical issues in this aspect of model selection, and you will not be able to cite any reference to support your model choice because it is idosyncratic to your particular research question.

            My understanding is that marginal effects describe the increases or decreases in percentage points that independent variables might cause for the dependent variable. Thus, my interpretation is that if "has local area unemployment increased in the past three waves" changes from false to true (i.e. zero to one for this binary variable), at any point during the three waves of data collected, that the probability of being overweight increases by 18%.
            The only part of this that I disagree with is the use of "cause." It may well be that the conditions of your study design justify causal inference here. You would know if that is true; I do not. But, in general, you cannot make causal inferences from observational data alone. So in the absence of external support for causal inference, it would be better to refer to expected differences associated with rather than "cause"d by the predictor.

            That is, everything else equal, I would expect an 18 percentage point increase in the proportion of respondents who report being overweight if their local area unemployment changes from not having increased at some point over the past three waves to having increased at some point over the past three waves. [emphasis added]
            Here, only you know whether observations that differ on the predictor do so because of a "change" or whether they just happen to be different. If you have observational data that does not show changes in this variable over time within the same observational unit, then your inference must be about differences between units, not changes within them. Again, the issue I am raising here is a matter of study design and nothing about this can be inferred from regression outputs.

            I have also read that margins would give the wrong answers if I did not use factor variables, but I don’t understand why that is the case? Can anyone describe the logic behind this?
            There are a number of reasons, different ones applying in different circumstances. In your situation, the issue is with calculation of marginal effects. When you have a discrete predictor, the marginal effect of interest is the difference between p(x+1) and p(x). (delta p). When you have a continuous predictor x, and result p (probability of outcome y), the marginal effect is defined as dp/dx. We often refer to this as "the change in p associated with a unit change in x," that is, delta p. But that is, in fact, an abuse of language. If dp/dx were constant, delta p would equal dp/dx. But in non-linear models such as logistic regression, dp/dx is not constant. So calling dp/dx "the change in p associated with a unit change in x" is equivalent to saying "We're going to go 40 km in the next hour" when all that is really happening is that the speedometer reads 40 km/h at this particular moment. If you do not use factor variable notation, -margins- would not know that the variable is discrete and it would calculate the marginal effect incorrectly as dp/dx instead of correctly calculating delta p.

            Comment

            Working...
            X