Announcement

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

  • test format


    I was attempting to write up something on logistic regression and wanted to include information about the "baseline" odds to help with the interpretation of the OR's; I wanted a "simple" example and remembered your tip 107 from vol 12(1) of the _Stata Journal_; of course my regression result matched the one in your tip
    HTML Code:
    However, I then went to the next stage:  . ta union if c_grade==0 & high_occ==0        union |      worker |      Freq.     Percent        Cum. ------------+-----------------------------------    nonunion |        478       76.11       76.11       union |        150       23.89      100.00 ------------+-----------------------------------       Total |        628      100.00  . di 150/478 .31380753  This, of course, does not match the intercept from the regression (which is .3358115).
    I tried some other example and found that the intercept gets farther away from the tabulated results as I include numeric predictors; further, with more than one categorical predictor, the intercept only matches the simple table if I include the interaction term but even this does not work with "continuous" predictors (e.g., treating c.grade as continuous and entering "logistic union c.c_grade##i.high_occ" gives an intercept of ".3352503") So, I believe I am doing something wrong -- any idea what it is?

  • #2
    Code:
     
     I was attempting to write up something on logistic regression and wanted to include information about the "baseline" odds to help with the interpretation of the OR's; I wanted a "simple" example and remembered your tip 107 from vol 12(1) of the _Stata Journal_; of course my regression result matched the one in your tip  However, I then went to the next stage:  . ta union if c_grade==0 & high_occ==0        union |      worker |      Freq.     Percent        Cum. ------------+-----------------------------------    nonunion |        478       76.11       76.11       union |        150       23.89      100.00 ------------+-----------------------------------       Total |        628      100.00  . di 150/478 .31380753  This, of course, does not match the intercept from the regression (which is .3358115).  I tried some other example and found that the intercept gets farther away from the tabulated results as I include numeric predictors; further, with more than one categorical predictor, the intercept only matches the simple table if I include the interaction term but even this does not work with "continuous" predictors (e.g., treating c.grade as continuous and entering "logistic union c.c_grade##i.high_occ" gives an intercept of ".3352503")  So, I believe I am doing something wrong -- any idea what it is?

    Comment


    • #3
      Testing a supposed feature. Nothing to do with my friend Rich or his questions.

      Comment


      • #4
        test2

        Comment

        Working...
        X