Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: RE: RE: Create P value for Z score


From   narazani <[email protected]>
To   [email protected]
Subject   Re: st: RE: RE: Create P value for Z score
Date   Sun, 11 Dec 2005 18:51:15 +0100

Dear all,

I ran a multinomial logit with constraints and after that I used the command
"predict" to get the predicted probabilities. Stata result was: same
probabilities for 3 alternatives. Do you know any other command to predict the
probabilities when mlogit with constraints is used?



mlogit av20 time cost1  if (location>1|location<6|location>6)&purpose==1,
cons(1-3) basecat(1)

Iteration 0:   log likelihood = -479.42809
Iteration 1:   log likelihood = -259.55111
Iteration 2:   log likelihood = -256.78928
Iteration 3:   log likelihood = -256.74805
Iteration 4:   log likelihood = -256.74804

Multinomial logistic regression                   Number of obs   =        324
                                                  LR chi2(-1)     =     445.36
                                                  Prob > chi2     =          .
Log likelihood = -256.74804                       Pseudo R2       =     0.4645

 ( 1)  [2]time - [3]time = 0
 ( 2)  [2]cost1 - [3]cost1 = 0
 ( 3)  [2]_cons - [3]_cons = 0
 ( 4)  [3]time - [5]time = 0
 ( 5)  [3]cost1 - [5]cost1 = 0
 ( 6)  [3]_cons - [5]_cons = 0
 ( 7)  [4]time - [5]time = 0
 ( 8)  [4]cost1 - [5]cost1 = 0
 ( 9)  [4]_cons - [5]_cons = 0
------------------------------------------------------------------------------
        av20 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
2            |
        time |   -.015983   .0048032    -3.33   0.001    -.0253971    -.006569
       cost1 |  -.0072383   .0013861    -5.22   0.000     -.009955   -.0045216
       _cons |  (dropped)
-------------+----------------------------------------------------------------
3            |
        time |   -.015983   .0048032    -3.33   0.001    -.0253971    -.006569
       cost1 |  -.0072383   .0013861    -5.22   0.000     -.009955   -.0045216
       _cons |  (dropped)
-------------+----------------------------------------------------------------
4            |
        time |   -.015983   .0048032    -3.33   0.001    -.0253971    -.006569
       cost1 |  -.0072383   .0013861    -5.22   0.000     -.009955   -.0045216
       _cons |  (dropped)
-------------+----------------------------------------------------------------
5            |
        time |   -.015983   .0048032    -3.33   0.001    -.0253971    -.006569
       cost1 |  -.0072383   .0013861    -5.22   0.000     -.009955   -.0045216
       _cons |  -.9755993   .3746739    -2.60   0.009    -1.709947    -.241252
------------------------------------------------------------------------------
(av20==1 is the base outcome)

. predict p1 p2 p3 p4 p5  if e(sample)
(option pr assumed; predicted probabilities)
(69 missing values generated)

. sum p1-p5

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
          p1 |       324    .7788082    .0914454   .5147507   .9966482
          p2 |       324    .0655002    .0270792   .0009926   .1436939
          p3 |       324    .0655002    .0270792   .0009926   .1436939
          p4 |       324    .0655002    .0270792   .0009926   .1436939
          p5 |       324    .0246914    .0102079   .0003742   .0541678

Scrive Nick Cox <[email protected]>:

> In fact, you have a choice between norm(-z) or 1 - norm(z).
>
> In principle, on a machine with infinite precision,
> these should always give the same answer.
>
> In practice they usually do, to the precision that
> you care about. But far out in the tails the extra
> subtraction is a complication you would better avoid.
>
> Any program would be sometimes better off, and never
> worse off, using norm(-z).
>
> Nick
> [email protected]
>
> FEIVESON, ALAN
>
> > If Z is a Stata variable and you want a two-sided p-value
> > (what is reported
> > in standard Stata output) then use
> >
> > gen pv=2*(1-norm(abs(Z)))
>
> [email protected]
>
> > I have a variable which is the Z score of Beta coeffcient
> > (Standard normal
> > distribution). I also want to create a new variable which is
> > the p value of
> > the Z score. Does anybody have the command or programs to share?
>
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>




----------------------------------------------------------------
This message was sent using IMP - Facolta' di Economia - Torino.

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index