Announcement

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

  • Getting Standard Error bars instead desired 95% CI bars

    Dear Statalisters,

    Stata version: 13.1

    Here is my sample dataset below:

    Code:
     id    gender    visit    ir
    1    Girls    5    .45
    2    Girls    5    .21
    3    Girls    5    .53
    4    Boys    5    .21
    11    Boys    5    .44
    14    Boys    5    .58
    1    Girls    6    .21
    2    Girls    6    .37
    3    Girls    6    1.8
    4    Boys    6    .22
    11    Boys    6    .29
    14    Boys    6    .64
    1    Girls    7    .37
    2    Girls    7    .21
    3    Girls    7    1.2
    4    Boys    7    .22
    11    Boys    7    .22
    14    Boys    7    .19
    1    Girls    8    .43
    2    Girls    8    .22
    3    Girls    8    1.1
    4    Boys    8    .37
    11    Boys    8    .22
    14    Boys    8    .21
    1    Girls    9    .42
    2    Girls    9    .29
    3    Girls    9    2.5
    4    Boys    9    .22
    11    Boys    9    .21
    14    Boys    9    .6

    The variables are self explanatory, "ir" stands for "Insulin Resistance". I am using "lgraph" command http://econpapers.repec.org/software...de/s456849.htm to produce a line graph with 95% confidence interval bars for each visit by gender.

    Problem: The graph is being produced with one Standard Error bars instead 95% Confidence Interval bars. I used the following code which can be cross checked by typing "help lgraph" in Stata.

    Code:
    lgraph ir visit gender,err(ci(95)) ///
    xlab(5/16)
    I am not being able to sort out where I am making the mistake. I know I could do it with "twoway connected'' but for that I will have to create variables for "rcap". Since I will need to produce graphs on several other variables, "lgraph" seems does the job quickly and the graphs can be combined afterwards. I just need to sort out the dilemma between SE and CI bars.

    Your help is highly appreciated.

    All the best,
    Roman
    Roman

  • #2
    Okay, it looks fine. double signature
    Roman

    Comment

    Working...
    X