Announcement

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

  • How to obtain Wald chi-square from running logistic regressions?

    Hello statalists,

    I was an SPSS user and switched to STATA a couple years ago. I have a question about logistic regression. Below is a screenshot of an SPSS-run logistic regression output:
    Click image for larger version

Name:	1.jpg
Views:	1
Size:	37.4 KB
ID:	1597660



    My questions is, when I run logistic regressions using STATA, how can I obtain the Wald statistics and df for each dependent variable that are shown in this SPSS output?

    I know that I can manually calculate the Wald statistics by squaring the z statistics reported in STATA, but is there any chance that STATA can generate it?

    I no longer have SPSS in my computer and it would be really helpful if I know how to get these numbers.

    Thank you for your help.

  • #2
    I am not aware of any option to the Stata logistic regression command that will give you the Wald chi square. As you note, it is simply the square of the z-statistic. You don't have to calculate those by hand, though. You can automate that process in a loop something like this:

    Code:
    foreach x in age weight gender VO2max _cons {
        local wald= (_b[`x']/_se[`x'])^2
        display "Wald statistic for `x' = " %4.3f `wald'
    }
    Note: You may need to change the names used for the variables in the -foreach- command to make them match what -logit- puts in _b[] and _se[]. So before writing this code, rerun your logitic regression with the -coeflegend- option to see what those are.

    Comment


    • #3
      The z statistic that Stata reports is a Wald statistic. If for some reason you would like to have it in the same format as what SPSS reports, you can square your z statistic.

      Comment


      • #4
        Originally posted by Clyde Schechter View Post
        I am not aware of any option to the Stata logistic regression command that will give you the Wald chi square. As you note, it is simply the square of the z-statistic. You don't have to calculate those by hand, though. You can automate that process in a loop something like this:

        Code:
        foreach x in age weight gender VO2max _cons {
        local wald= (_b[`x']/_se[`x'])^2
        display "Wald statistic for `x' = " %4.3f `wald'
        }
        Note: You may need to change the names used for the variables in the -foreach- command to make them match what -logit- puts in _b[] and _se[]. So before writing this code, rerun your logitic regression with the -coeflegend- option to see what those are.
        Thank you. This is very helpful!

        Comment

        Working...
        X