[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

# Re: st: standard error of prediction (with weights)

 From "Joao Ricardo F. Lima" <[email protected]> To [email protected] Subject Re: st: standard error of prediction (with weights) Date Tue, 16 Sep 2008 09:22:40 -0300

```Hans,

If you use -prvalue- , that you can get with -findit spost9-, you will
find the confidence interval for predicted values. Perhaps it can be
useful.

*******begin example******************
webuse lbw2
logit low age lwt race2 race3 smoke ptl ht ui [pweight= lwt], or
prvalue
*****end******************************

. logit low age lwt race2 race3 smoke ptl ht ui [pweight= lwt], or

(sum of wgt is   2.4536e+04)
Iteration 0:   log pseudolikelihood = -114.43179
Iteration 1:   log pseudolikelihood = -97.434363
Iteration 2:   log pseudolikelihood = -96.574062
Iteration 3:   log pseudolikelihood = -96.561074
Iteration 4:   log pseudolikelihood = -96.561069

Logistic regression                               Number of obs   =        189
Wald chi2(8)    =      31.44
Prob > chi2     =     0.0001
Log pseudolikelihood = -96.561069                 Pseudo R2       =     0.1562

------------------------------------------------------------------------------
|               Robust
low | Odds Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
age |   .9753859   .0320464    -0.76   0.448     .9145558    1.040262
lwt |   .9836637   .0068743    -2.36   0.018     .9702823    .9972297
race2 |   3.759388   1.949516     2.55   0.011     1.360528    10.38788
race3 |      2.298   .9872278     1.94   0.053     .9900823    5.333703
smoke |   2.731918   1.054756     2.60   0.009      1.28183    5.822438
ptl |   1.661432    .677697     1.24   0.213     .7469269    3.695618
ht |   6.340138   4.046999     2.89   0.004     1.814533      22.153
ui |   2.447706   1.260358     1.74   0.082     .8922027    6.715136
------------------------------------------------------------------------------

. prvalue

logit: Predictions for low

Confidence intervals by delta method

95% Conf. Interval
Pr(y=1|x):          0.2754   [ 0.2038,    0.3471]
Pr(y=0|x):          0.7246   [ 0.6529,    0.7962]

Hope this helps

Joao Lima

2008/9/16 Hans Olav Melberg <[email protected]>:
> When using the following:
>
> logit c6 \$x6 [pweight=w2all], or
> mfx compute, at(gateway=0)
>
> I get:
> Marginal effects after logit
>      y  = Pr(c6) (predict)
>         =  .00067379
> etc
>
> How do I find standard error of the predicted value?
>
> The predicted value (y = 0.00067) is calculated using weights as well
> as at the mean of the variables, except for one variable which is 0.
> I found some commands that might be useful, but they did not accept weights.
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>

--
-------------------------------
Joao Ricardo Lima
Professor
UFPB-CCA-DCFS
+553138923914
-------------------------------
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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