Announcement

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

  • anyone here use JMP?

    I am working with someone who uses JMP and we are doing ordered logistic regression; JMP offers something they call "expected value" but I can't quite figure out what it is; the only documentation either of us has been able to find says:

    "Save Expected Value (Available only when the response is
    numeric and has the ordinal modeling type.) Creates a column in the
    current data table called Ord Expected. This column contains the linear
    combination of the response values with the fitted response
    probabilities for each row and gives the expected value."
    If anyone has an idea of what this means or how this is calculated, I would greatly appreciate hearing

    added in edit - the following dataex output might help:
    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input str3 Subject byte(LL BFs) double(OrdExpected Linear Prob1 Prob2 Prob3 Prob4 Prob5)
    "1" 3 5 2.097943900856179 1.820143431235861 .4082699058359035 .2625658366342866 .2114464109345694 .0583861440282089 .0593317025670317
    "2" 3 2 2.848690452884622 .7280573724943443 .1879771330914454 .2181211507211049 .3093786872978927  .126280187990496 .1582428408990609
    "3" 2 4 2.334116924448643 1.456114744988689 .3240654378901853 .2620522009020323 .2527994389969234 .0778658432906726 .0832170789201865
    "4" 5 2 2.848690452884622 .7280573724943443 .1879771330914454 .2181211507211049 .3093786872978927  .126280187990496 .1582428408990609
    "5" 5 0 3.383117137636134                 0 .1005375922317004 .1476735010778116 .3001566440090465 .1713987021855363 .2802335604959052
    end
    Note that LL is the outcome and BFs is the only predictor and "OrdExpected" is what I am trying to figure out; Linear is the linear predictor and Prob* are the probabilities of each of the 5 ordered categories
    Last edited by Rich Goldstein; 13 Feb 2023, 14:15.

  • #2
    seems like predict or predictnl would get you that.

    HTML Code:
    help ologit postestimation

    Comment


    • #3
      nope, unable to match using predict - so far - but maybe you can suggest something?

      Comment


      • #4
        Apparently, it is a weighted average of the outcomes where the probabilities are the weights:
        Code:
        * Example generated by -dataex-. For more info, type help dataex
        clear
        input str3 Subject byte(LL BFs) double(OrdExpected Linear Prob1 Prob2 Prob3 Prob4 Prob5)
        "1" 3 5 2.097943900856179 1.820143431235861 .4082699058359035 .2625658366342866 .2114464109345694 .0583861440282089 .0593317025670317
        "2" 3 2 2.848690452884622 .7280573724943443 .1879771330914454 .2181211507211049 .3093786872978927  .126280187990496 .1582428408990609
        "3" 2 4 2.334116924448643 1.456114744988689 .3240654378901853 .2620522009020323 .2527994389969234 .0778658432906726 .0832170789201865
        "4" 5 2 2.848690452884622 .7280573724943443 .1879771330914454 .2181211507211049 .3093786872978927  .126280187990496 .1582428408990609
        "5" 5 0 3.383117137636134                 0 .1005375922317004 .1476735010778116 .3001566440090465 .1713987021855363 .2802335604959052
        end
        
        gen double exp2 = Prob1 + 2*Prob2 + 3*Prob3 + 4*Prob4 + 5*Prob5
        list OrdExpected exp2
        The above yields:
        Code:
        . list OrdExpected exp2
        
             +-----------------------+
             | OrdExpe~d        exp2 |
             |-----------------------|
          1. | 2.0979439   2.0979439 |
          2. | 2.8486905   2.8486905 |
          3. | 2.3341169   2.3341169 |
          4. | 2.8486905   2.8486905 |
          5. | 3.3831171   3.3831171 |
             +-----------------------+

        Comment


        • #5
          are the values in the dataex from a regression on those 5 observations?

          Comment


          • #6
            see what this gets you if you haven't already.

            Code:
            ologit LL BFs
            predict fitp1 fitp2 fitp3 fitp4 fitp5 , p

            Comment


            • #7
              thank you to Joerg Luedicke who gave me a similar answer to that from tech support (and tech support also supplied a way to get CI's using -lincom-); the "odd" thing is that is what I had originally thought but I must have made a typo in my command as my values were slightly too small (e.g., 2.04 for #1))

              Comment


              • #8
                Those who spent some time thinking about your problem might like to see the answer.

                Comment


                • #9
                  here is what I received from tech support:
                  Code:
                   This is the follow-up email. I find how the “Ord Expected” variable is calculated. It is computed by averaging   1*Prob[1]+2*Prob[2]+3*Prob[3]+4*Prob[4]+5*Prob[5]  for each #BFs group.  Please run the following code to reproduce the values of the “Ord Expected” variable in Stata:  ********  use for_ologit, clear *make y =LL in order to match JMP's result generate y=q6_1b+1 summarize ologit y numq5 predict p1-p5 list in 1/10 generate Ord_expected=1*p1+2*p2+3*p3+4*p4+5*p5 bysort numq5: summarize Ord_expected margins, over(numq5) predict()  post coeflegend /* 1._predict: Pr(y==1), predict(pr outcome(1)) 2._predict: Pr(y==2), predict(pr outcome(2)) 3._predict: Pr(y==3), predict(pr outcome(3)) 4._predict: Pr(y==4), predict(pr outcome(4)) 5._predict: Pr(y==5), predict(pr outcome(5))  --------------------------------------------------------------------------------                |     Margin   Legend ---------------+---------------------------------------------------------------- _predict#numq5 |          1  0  |   .1005375  _b[1bn._predict#0bn.numq5]          1  1  |   .1385677  _b[1bn._predict#1.numq5]          1  2  |   .1879771  _b[1bn._predict#2.numq5]          1  3  |   .2498936  _b[1bn._predict#3.numq5]          1  4  |   .3240654  _b[1bn._predict#4.numq5]          1  5  |   .4082699  _b[1bn._predict#5.numq5]          1  6  |   .4982267  _b[1bn._predict#6.numq5]          1  7  |   .5882985  _b[1bn._predict#7.numq5]          1  8  |   .6728194  _b[1bn._predict#8.numq5]          1  9  |   .7474378  _b[1bn._predict#9.numq5]          1 10  |   .8098479  _b[1bn._predict#10.numq5]          2  0  |   .1476734  _b[2._predict#0bn.numq5]          2  1  |     .18353  _b[2._predict#1.numq5]          2  2  |   .2181211  _b[2._predict#2.numq5]          2  3  |   .2460839  _b[2._predict#3.numq5]          2  4  |   .2620521  _b[2._predict#4.numq5]          2  5  |   .2625658  _b[2._predict#5.numq5]          2  6  |   .2475088  _b[2._predict#6.numq5]          2  7  |   .2201601  _b[2._predict#7.numq5]          2  8  |   .1858223  _b[2._predict#8.numq5]          2  9  |   .1499087  _b[2._predict#9.numq5]          2 10  |   .1165146  _b[2._predict#10.numq5]          3  0  |   .3001565  _b[3._predict#0bn.numq5]          3  1  |   .3139164  _b[3._predict#1.numq5]          3  2  |   .3093787  _b[3._predict#2.numq5]          3  3  |   .2875196  _b[3._predict#3.numq5]          3  4  |   .2527995  _b[3._predict#4.numq5]          3  5  |   .2114464  _b[3._predict#5.numq5]          3  6  |   .1694181  _b[3._predict#6.numq5]          3  7  |   .1310173  _b[3._predict#7.numq5]          3  8  |   .0985105  _b[3._predict#8.numq5]          3  9  |   .0724854  _b[3._predict#9.numq5]          3 10  |   .0524797  _b[3._predict#10.numq5]          4  0  |    .171399  _b[4._predict#0bn.numq5]          4  1  |   .1510523  _b[4._predict#1.numq5]          4  2  |   .1262804  _b[4._predict#2.numq5]          4  3  |   .1009659  _b[4._predict#3.numq5]          4  4  |   .0778659  _b[4._predict#4.numq5]          4  5  |   .0583862  _b[4._predict#5.numq5]          4  6  |   .0428584  _b[4._predict#6.numq5]          4  7  |   .0309693  _b[4._predict#7.numq5]          4  8  |   .0221241  _b[4._predict#8.numq5]          4  9  |   .0156762  _b[4._predict#9.numq5]          4 10  |    .011043  _b[4._predict#10.numq5]          5  0  |   .2802336  _b[5._predict#0bn.numq5]          5  1  |   .2129336  _b[5._predict#1.numq5]          5  2  |   .1582428  _b[5._predict#2.numq5]          5  3  |    .115537  _b[5._predict#3.numq5]          5  4  |    .083217  _b[5._predict#4.numq5]          5  5  |   .0593317  _b[5._predict#5.numq5]          5  6  |    .041988  _b[5._predict#6.numq5]          5  7  |   .0295549  _b[5._predict#7.numq5]          5  8  |   .0207237  _b[5._predict#8.numq5]          5  9  |    .014492  _b[5._predict#9.numq5]          5 10  |   .0101148  _b[5._predict#10.numq5] -------------------------------------------------------------------------------- */ *Compute the CIs the Ord Expected for #BFs=0 lincom  _b[1bn._predict#0bn.numq5]*1+ _b[2._predict#0bn.numq5]*2+ /// _b[3._predict#0bn.numq5]*3+_b[4._predict#0bn.numq5]*4+ /// _b[5._predict#0bn.numq5]*5 /* ------------------------------------------------------------------------------              | Coefficient  Std. err.      z    P>|z|     [95% conf. interval] -------------+----------------------------------------------------------------          (1) |   3.383118    .127296    26.58   0.000     3.133622    3.632613 ------------------------------------------------------------------------------ */ *Compute the CIs the Ord Expected for #BFs=1 lincom  _b[1bn._predict#1.numq5]*1+ _b[2._predict#1.numq5]*2+ /// _b[3._predict#1.numq5]*3+_b[4._predict#1.numq5]*4+ /// _b[5._predict#1.numq5]*5 /* ------------------------------------------------------------------------------              | Coefficient  Std. err.      z    P>|z|     [95% conf. interval] -------------+----------------------------------------------------------------          (1) |   3.116254   .1080101    28.85   0.000     2.904558     3.32795 ------------------------------------------------------------------------------ */ *Compute the CIs the Ord Expected for #BFs=2,...,10 forvalues i=2(1)10{ lincom _b[1bn._predict#`i'.numq5]*1+ _b[2._predict#`i'.numq5]*2+ /// _b[3._predict#`i'.numq5]*3+_b[4._predict#`i'.numq5]*4+ /// _b[5._predict#`i'.numq5]*5 } /*  ( 1)  1bn._predict#2.numq5 + 2*2._predict#2.numq5 + 3*3._predict#2.numq5 + 4*4._predict#2.numq5 + 5*5._predict#2.numq5 = 0  ------------------------------------------------------------------------------              | Coefficient  Std. err.      z    P>|z|     [95% conf. interval] -------------+----------------------------------------------------------------          (1) |   2.848691   .0894196    31.86   0.000     2.673432     3.02395 ------------------------------------------------------------------------------   ( 1)  1bn._predict#3.numq5 + 2*2._predict#3.numq5 + 3*3._predict#3.numq5 + 4*4._predict#3.numq5 + 5*5._predict#3.numq5 = 0  ------------------------------------------------------------------------------              | Coefficient  Std. err.      z    P>|z|     [95% conf. interval] -------------+----------------------------------------------------------------          (1) |   2.586169   .0749321    34.51   0.000     2.439305    2.733033 ------------------------------------------------------------------------------   ( 1)  1bn._predict#4.numq5 + 2*2._predict#4.numq5 + 3*3._predict#4.numq5 + 4*4._predict#4.numq5 + 5*5._predict#4.numq5 = 0  ------------------------------------------------------------------------------              | Coefficient  Std. err.      z    P>|z|     [95% conf. interval] -------------+----------------------------------------------------------------          (1) |   2.334117   .0673553    34.65   0.000     2.202103    2.466131 ------------------------------------------------------------------------------   ( 1)  1bn._predict#5.numq5 + 2*2._predict#5.numq5 + 3*3._predict#5.numq5 + 4*4._predict#5.numq5 + 5*5._predict#5.numq5 = 0  ------------------------------------------------------------------------------              | Coefficient  Std. err.      z    P>|z|     [95% conf. interval] -------------+----------------------------------------------------------------          (1) |   2.097944   .0668117    31.40   0.000     1.966995    2.228892 ------------------------------------------------------------------------------   ( 1)  1bn._predict#6.numq5 + 2*2._predict#6.numq5 + 3*3._predict#6.numq5 + 4*4._predict#6.numq5 + 5*5._predict#6.numq5 = 0  ------------------------------------------------------------------------------              | Coefficient  Std. err.      z    P>|z|     [95% conf. interval] -------------+----------------------------------------------------------------          (1) |   1.882872   .0699561    26.92   0.000     1.745761    2.019983 ------------------------------------------------------------------------------   ( 1)  1bn._predict#7.numq5 + 2*2._predict#7.numq5 + 3*3._predict#7.numq5 + 4*4._predict#7.numq5 + 5*5._predict#7.numq5 = 0  ------------------------------------------------------------------------------              | Coefficient  Std. err.      z    P>|z|     [95% conf. interval] -------------+----------------------------------------------------------------          (1) |   1.693322   .0727029    23.29   0.000     1.550827    1.835817 ------------------------------------------------------------------------------   ( 1)  1bn._predict#8.numq5 + 2*2._predict#8.numq5 + 3*3._predict#8.numq5 + 4*4._predict#8.numq5 + 5*5._predict#8.numq5 = 0  ------------------------------------------------------------------------------              | Coefficient  Std. err.      z    P>|z|     [95% conf. interval] -------------+----------------------------------------------------------------          (1) |    1.53211   .0725487    21.12   0.000     1.389918    1.674303 ------------------------------------------------------------------------------   ( 1)  1bn._predict#9.numq5 + 2*2._predict#9.numq5 + 3*3._predict#9.numq5 + 4*4._predict#9.numq5 + 5*5._predict#9.numq5 = 0  ------------------------------------------------------------------------------              | Coefficient  Std. err.      z    P>|z|     [95% conf. interval] -------------+----------------------------------------------------------------          (1) |   1.399876   .0688454    20.33   0.000     1.264941     1.53481 ------------------------------------------------------------------------------   ( 1)  1bn._predict#10.numq5 + 2*2._predict#10.numq5 + 3*3._predict#10.numq5 + 4*4._predict#10.numq5 + 5*5._predict#10.numq5 = 0  ------------------------------------------------------------------------------              | Coefficient  Std. err.      z    P>|z|     [95% conf. interval] -------------+----------------------------------------------------------------          (1) |   1.295062   .0622247    20.81   0.000     1.173104     1.41702 ------------------------------------------------------------------------------ */
                  Last edited by Rich Goldstein; 14 Feb 2023, 07:02. Reason: added in edit - the above is clearly not formed correctly but I don't know how to fix - I hope there is enough there to pick it out; note that the set-up from tech support is slightly different from t

                  Comment


                  • #10
                    here is another try:
                    Code:
                    This is the follow-up email. I find how the “Ord Expected” variable is calculated. It is computed by averaging
                                 1*Prob[1]+2*Prob[2]+3*Prob[3]+4*Prob[4]+5*Prob[5]
                     for each #BFs group.
                     Please run the following code to reproduce the values of the “Ord Expected” variable in Stata:
                     ********
                     use for_ologit, clear
                    *make y =LL in order to match JMP's result
                    generate y=q6_1b+1
                    summarize
                    ologit y numq5
                    predict p1-p5
                    list in 1/10
                    generate Ord_expected=1*p1+2*p2+3*p3+4*p4+5*p5
                    bysort numq5: summarize Ord_expected
                    margins, over(numq5) predict()  post coeflegend
                    /*
                    1._predict: Pr(y==1), predict(pr outcome(1))
                    2._predict: Pr(y==2), predict(pr outcome(2))
                    3._predict: Pr(y==3), predict(pr outcome(3))
                    4._predict: Pr(y==4), predict(pr outcome(4))
                    5._predict: Pr(y==5), predict(pr outcome(5))
                     
                    --------------------------------------------------------------------------------
                                   |     Margin   Legend
                    ---------------+----------------------------------------------------------------
                    _predict#numq5 |
                             1  0  |   .1005375  _b[1bn._predict#0bn.numq5]
                             1  1  |   .1385677  _b[1bn._predict#1.numq5]
                             1  2  |   .1879771  _b[1bn._predict#2.numq5]
                             1  3  |   .2498936  _b[1bn._predict#3.numq5]
                             1  4  |   .3240654  _b[1bn._predict#4.numq5]
                             1  5  |   .4082699  _b[1bn._predict#5.numq5]
                             1  6  |   .4982267  _b[1bn._predict#6.numq5]
                             1  7  |   .5882985  _b[1bn._predict#7.numq5]
                             1  8  |   .6728194  _b[1bn._predict#8.numq5]
                             1  9  |   .7474378  _b[1bn._predict#9.numq5]
                             1 10  |   .8098479  _b[1bn._predict#10.numq5]
                             2  0  |   .1476734  _b[2._predict#0bn.numq5]
                             2  1  |     .18353  _b[2._predict#1.numq5]
                             2  2  |   .2181211  _b[2._predict#2.numq5]
                             2  3  |   .2460839  _b[2._predict#3.numq5]
                             2  4  |   .2620521  _b[2._predict#4.numq5]
                             2  5  |   .2625658  _b[2._predict#5.numq5]
                             2  6  |   .2475088  _b[2._predict#6.numq5]
                             2  7  |   .2201601  _b[2._predict#7.numq5]
                             2  8  |   .1858223  _b[2._predict#8.numq5]
                             2  9  |   .1499087  _b[2._predict#9.numq5]
                             2 10  |   .1165146  _b[2._predict#10.numq5]
                             3  0  |   .3001565  _b[3._predict#0bn.numq5]
                             3  1  |   .3139164  _b[3._predict#1.numq5]
                             3  2  |   .3093787  _b[3._predict#2.numq5]
                             3  3  |   .2875196  _b[3._predict#3.numq5]
                             3  4  |   .2527995  _b[3._predict#4.numq5]
                             3  5  |   .2114464  _b[3._predict#5.numq5]
                             3  6  |   .1694181  _b[3._predict#6.numq5]
                             3  7  |   .1310173  _b[3._predict#7.numq5]
                             3  8  |   .0985105  _b[3._predict#8.numq5]
                             3  9  |   .0724854  _b[3._predict#9.numq5]
                             3 10  |   .0524797  _b[3._predict#10.numq5]
                             4  0  |    .171399  _b[4._predict#0bn.numq5]
                             4  1  |   .1510523  _b[4._predict#1.numq5]
                             4  2  |   .1262804  _b[4._predict#2.numq5]
                             4  3  |   .1009659  _b[4._predict#3.numq5]
                             4  4  |   .0778659  _b[4._predict#4.numq5]
                             4  5  |   .0583862  _b[4._predict#5.numq5]
                             4  6  |   .0428584  _b[4._predict#6.numq5]
                             4  7  |   .0309693  _b[4._predict#7.numq5]
                             4  8  |   .0221241  _b[4._predict#8.numq5]
                             4  9  |   .0156762  _b[4._predict#9.numq5]
                             4 10  |    .011043  _b[4._predict#10.numq5]
                             5  0  |   .2802336  _b[5._predict#0bn.numq5]
                             5  1  |   .2129336  _b[5._predict#1.numq5]
                             5  2  |   .1582428  _b[5._predict#2.numq5]
                             5  3  |    .115537  _b[5._predict#3.numq5]
                             5  4  |    .083217  _b[5._predict#4.numq5]
                             5  5  |   .0593317  _b[5._predict#5.numq5]
                             5  6  |    .041988  _b[5._predict#6.numq5]
                             5  7  |   .0295549  _b[5._predict#7.numq5]
                             5  8  |   .0207237  _b[5._predict#8.numq5]
                             5  9  |    .014492  _b[5._predict#9.numq5]
                             5 10  |   .0101148  _b[5._predict#10.numq5]
                    --------------------------------------------------------------------------------
                    */
                    *Compute the CIs the Ord Expected for #BFs=0
                    lincom  _b[1bn._predict#0bn.numq5]*1+ _b[2._predict#0bn.numq5]*2+ ///
                            _b[3._predict#0bn.numq5]*3+_b[4._predict#0bn.numq5]*4+ ///
                                   _b[5._predict#0bn.numq5]*5
                    /*
                    ------------------------------------------------------------------------------
                                 | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
                    -------------+----------------------------------------------------------------
                             (1) |   3.383118    .127296    26.58   0.000     3.133622    3.632613
                    ------------------------------------------------------------------------------
                    */
                    *Compute the CIs the Ord Expected for #BFs=1
                    lincom  _b[1bn._predict#1.numq5]*1+ _b[2._predict#1.numq5]*2+ ///
                            _b[3._predict#1.numq5]*3+_b[4._predict#1.numq5]*4+ ///
                                   _b[5._predict#1.numq5]*5
                    /*
                    ------------------------------------------------------------------------------
                                 | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
                    -------------+----------------------------------------------------------------
                             (1) |   3.116254   .1080101    28.85   0.000     2.904558     3.32795
                    ------------------------------------------------------------------------------
                    */
                    *Compute the CIs the Ord Expected for #BFs=2,...,10
                    forvalues i=2(1)10{
                    lincom _b[1bn._predict#`i'.numq5]*1+ _b[2._predict#`i'.numq5]*2+ ///
                            _b[3._predict#`i'.numq5]*3+_b[4._predict#`i'.numq5]*4+ ///
                                   _b[5._predict#`i'.numq5]*5
                    }
                    /*
                     ( 1)  1bn._predict#2.numq5 + 2*2._predict#2.numq5 + 3*3._predict#2.numq5 + 4*4._predict#2.numq5 + 5*5._predict#2.numq5 = 0
                     
                    ------------------------------------------------------------------------------
                                 | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
                    -------------+----------------------------------------------------------------
                             (1) |   2.848691   .0894196    31.86   0.000     2.673432     3.02395
                    ------------------------------------------------------------------------------
                     
                     ( 1)  1bn._predict#3.numq5 + 2*2._predict#3.numq5 + 3*3._predict#3.numq5 + 4*4._predict#3.numq5 + 5*5._predict#3.numq5 = 0
                     
                    ------------------------------------------------------------------------------
                                 | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
                    -------------+----------------------------------------------------------------
                             (1) |   2.586169   .0749321    34.51   0.000     2.439305    2.733033
                    ------------------------------------------------------------------------------
                     
                     ( 1)  1bn._predict#4.numq5 + 2*2._predict#4.numq5 + 3*3._predict#4.numq5 + 4*4._predict#4.numq5 + 5*5._predict#4.numq5 = 0
                     
                    ------------------------------------------------------------------------------
                                 | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
                    -------------+----------------------------------------------------------------
                             (1) |   2.334117   .0673553    34.65   0.000     2.202103    2.466131
                    ------------------------------------------------------------------------------
                     
                     ( 1)  1bn._predict#5.numq5 + 2*2._predict#5.numq5 + 3*3._predict#5.numq5 + 4*4._predict#5.numq5 + 5*5._predict#5.numq5 = 0
                     
                    ------------------------------------------------------------------------------
                                 | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
                    -------------+----------------------------------------------------------------
                             (1) |   2.097944   .0668117    31.40   0.000     1.966995    2.228892
                    ------------------------------------------------------------------------------
                     
                     ( 1)  1bn._predict#6.numq5 + 2*2._predict#6.numq5 + 3*3._predict#6.numq5 + 4*4._predict#6.numq5 + 5*5._predict#6.numq5 = 0
                     
                    ------------------------------------------------------------------------------
                                 | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
                    -------------+----------------------------------------------------------------
                             (1) |   1.882872   .0699561    26.92   0.000     1.745761    2.019983
                    ------------------------------------------------------------------------------
                     
                     ( 1)  1bn._predict#7.numq5 + 2*2._predict#7.numq5 + 3*3._predict#7.numq5 + 4*4._predict#7.numq5 + 5*5._predict#7.numq5 = 0
                     
                    ------------------------------------------------------------------------------
                                 | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
                    -------------+----------------------------------------------------------------
                             (1) |   1.693322   .0727029    23.29   0.000     1.550827    1.835817
                    ------------------------------------------------------------------------------
                     
                     ( 1)  1bn._predict#8.numq5 + 2*2._predict#8.numq5 + 3*3._predict#8.numq5 + 4*4._predict#8.numq5 + 5*5._predict#8.numq5 = 0
                     
                    ------------------------------------------------------------------------------
                                 | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
                    -------------+----------------------------------------------------------------
                             (1) |    1.53211   .0725487    21.12   0.000     1.389918    1.674303
                    ------------------------------------------------------------------------------
                     
                     ( 1)  1bn._predict#9.numq5 + 2*2._predict#9.numq5 + 3*3._predict#9.numq5 + 4*4._predict#9.numq5 + 5*5._predict#9.numq5 = 0
                     
                    ------------------------------------------------------------------------------
                                 | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
                    -------------+----------------------------------------------------------------
                             (1) |   1.399876   .0688454    20.33   0.000     1.264941     1.53481
                    ------------------------------------------------------------------------------
                     
                     ( 1)  1bn._predict#10.numq5 + 2*2._predict#10.numq5 + 3*3._predict#10.numq5 + 4*4._predict#10.numq5 + 5*5._predict#10.numq5 = 0
                     
                    ------------------------------------------------------------------------------
                                 | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
                    -------------+----------------------------------------------------------------
                             (1) |   1.295062   .0622247    20.81   0.000     1.173104     1.41702
                    ------------------------------------------------------------------------------
                    */          
                     
                    *********
                     
                    Both -generate Ord_expected=1*p1+2*p2+3*p3+4*p4+5*p5- and -margins, over(numq5) predict()  post coeflegend- can compute the values of the “Ord Expected” variable. I apply -lincom- to the result of -margins- to compute the confidence intervals of the “Ord Expected” variable. You can compare my calculations with the JMP’s result.

                    Comment


                    • #11
                      Cool. Turned out to be pretty straightforward.

                      Comment

                      Working...
                      X