Announcement

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

  • tsline command with confidence intervals

    Hi,

    My STATA version is 13.
    I have a variable named 'Average' over a period of time (time variable 'Month'). I also have standard errors associated with Average stored as variable 'se'.

    Sample data:
    Code:
    Month  Average se
    1may2013 16.4 .19
    1jun2013 16.7 .18
    1jul2013 15.8 .11
    1aug2013 14.7 .10
    I am trying to generate a tsline graph:

    Code:
    tsset Month
    tsline Average, lc(black) tlabel(, format(%tdmy)) legend(off) tline(1jul2013, lc(black)) ytitle("Log(sales units)")
    How do I add confidence intervals to this tsline plot (using the standard errors stored in se).
    The area between the upper and lower limits need to be shaded.

    I also have variables 'upper' and 'lower' generated using Average +/- 1.96*se

    Please advice.

    Thanks.


  • #2
    Code:
    help serrbar

    Comment

    Working...
    X