Announcement

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

  • How to obtain standardized Coefficients for my logit model?

    Hi everyone,

    I ran my logit model, this was the command: logit vote armedforces_trust civilsociety_trust government_trust police_trust parties_trust judiciary_trust gender urban_rural age membership_party work_status education i.country

    Now, I am trying to standardized my coefficients, and I have never done that before, can you please help me ?

    Thank you so much .
    Dania.
    Last edited by Dania Arayssi; 24 Mar 2024, 20:52.

  • #2
    Please don't do that. I can see the problem with these *_trust variables, which are probably measured by some scales that were developed specifically for your study and have no generally recognized unit of measurement. But standardizing coefficients dichotomous variables like gender or urban_rural makes them hard to interpret because their meaning depends on the standard deviations of the underlying variables--which people reading your work or listening to your presentation will not know. Similarly age has natural measurement units: every body knows how to interpret a regular coefficient of age. It's the difference in outcome associated with a unit difference in age (presumably you measured age in years). If you stsandardize, it's the difference in outcome associated with a 1sd difference in age, and who knows what that means??

    It is also not a good idea to standardize with respect to your dichotomous outcome, vote, which, suffers from the same problem as dichotomous predictors: the meaning depends on the standard deviation that nobody but you will know (and you probably won't even remember it).

    So what I recommend you do instead is to normalize the coefficients of the *_trust variables, but leave everything else alone. There are two ways to do that. You can either change the *_trust variables themselves to standardized variables (mean 0, std 1) and rerun the logistic regression. Or you can multiply the coefficients you got from the regression you already did by the standard deviation of the variable. To use the second approach:
    Code:
    foreach v of varlist *_trust {
        summ `v' if e(sample)
        local b_`v'_std = _b["`v'"] * r(sd)
    }
    Now you have a local macro for each of those trust variables containing a coefficient that reflects the expected difference in log-odds vote associated with a 1 standard deviation difference in that trust variable. And since the trust variables have no inherent metric, a 1 standard deviation difference in them conveys reasonable information, and information that is consistent across the trust variables.

    Comment


    • #3
      Thanks Clyde, I appreciate your recommendation and help!!

      Comment


      • #4
        I need one more help please, I am trying to run logistic regression and in my datasets I have five countries. I am trying to run login model for each country separately. Do you have any idea how can I do it?
        This is how my dataset looks like and this is the code that I used to run my model with country fixed effects: l
        ogit protest Income_Household economy education urban_rural employment_status neighberhood social_status job_search i.year i.COUNTRY


        Thank you very much.
        Dania.

        Attached Files

        Comment


        • #5
          If all you need for these five separate logistic regressions is a display of the regression output, then it's very easy:
          Code:
          by COUNTRY, sort: logistic protest Income_Household economy education urban_rural employment_status neighberhood social_status job_search i.year
          However, if you need to do post-regression estimations or accumulate regression results in some way for later use, then it would be:
          Code:
          levelsof COUNTRY, local(countries)
          foreach c of local countries {
              logistic protest Income_Household economy education urban_rural employment_status neighberhood social_status job_search i.year if COUNTRY == `c'
              // CODE FOR POST-REGRESSION CALCULATIONS GOES HERE
          }

          Comment


          • #6
            Thank you so much for your help!! I very very much appreciate it! it worked, I am saving all your notes.b

            Comment

            Working...
            X