Announcement

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

  • Graph estimates with CIs

    Dear All,

    I am seeking some help for plotting saved point estimates with their confidence intervals. Here is the data:
    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input byte wks float(maxpats2 stderr t lci uci)
     1  .0789427  .018762   4.21  .0421693   .115716
     2  .0251792 .0189584   1.33 -.0119792  .0623376
     3  .0119432 .0179944    .66 -.0233258  .0472121
     4  .0572453 .0183201   3.12   .021338  .0931526
     5 -.2768689  .017557 -15.77 -.3112805 -.2424574
     6  .0597798  .019366   3.09  .0218226  .0977371
     7 -.0040323 .0187176   -.22 -.0407187  .0326542
     8 -.0119816 .0190239   -.63 -.0492682  .0253051
     9  -.328213 .0208534 -15.74 -.3690856 -.2873404
    10   .097171 .0188849   5.15  .0601567  .1341853
    11 -.0488863 .0191673  -2.55 -.0864541 -.0113185
    12  -.200192  .018594 -10.77 -.2366361 -.1637479
    13 -.1769457 .0209511  -8.45 -.2180098 -.1358816
    14 -.1387737 .0204021   -6.8 -.1787618 -.0987856
    15 -.1424091  .019632  -7.25 -.1808877 -.1039305
    16  -.155978 .0180407  -8.65 -.1913376 -.1206183
    17 -.0998592  .019478  -5.13  -.138036 -.0616824
    18 -.3661162 .0201902 -18.13 -.4056889 -.3265435
    19 -.0743728 .0200399  -3.71 -.1136508 -.0350947
    20  -.124872 .0192225   -6.5  -.162548  -.087196
    21 -.1492704 .0195233  -7.65  -.187536 -.1110048
    22 -.1611751 .0213354  -7.55 -.2029924 -.1193579
    23 -.1656554 .0213577  -7.76 -.2075163 -.1237945
    24 -.1571429 .0223354  -7.04   -.20092 -.1133657
    25 -.1657834 .0223708  -7.41   -.20963 -.1219369
    26 -.1907578 .0213239  -8.95 -.2325525 -.1489631
    27  -.090297 .0221071  -4.08 -.1336267 -.0469672
    28 -.0391577 .0216921  -1.81 -.0816741  .0033587
    end
    I want to plot the 28 estimates along with each estimates lower (lci) and uppper (uci) confidence interval. I know it should be doable but I am really strugling with it. I will really appreciate any help.
    Sincerely,
    Sumedha.

  • #2
    Code:
    twoway (scatter maxpats2 wks, msym(s) mcol(black)) || ///
            (rcap  lci uci wks, lcol(black))
    Roman

    Comment

    Working...
    X