Announcement

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

  • Creation of a single graph for several variables mentioned in a loop

    Dear Statalist Users,

    I am writing to you because I would like to create a loop that will allow me to make a single graph with these variables. The graph in question that I would like to create is a graph hbar with confidence intervals (like rcap or rspike), using by option.
    In my case, I would like to do a graph hbar with the variables mentioned below regarding to the type of bachelor students obtained.

    Thanks in advance to the good soul for his/her help and answer.
    Here is the loop I created:

    Code:
    forvalues i = 1/4{
    *
    local ba_hes Bachelor_hes
    foreach c of local ba_hes    {
        svy,subpop(`c'`i'):mean k_uebertritt2
        }
    }
    *
    forvalues i=1/3{
    *    
    local ba_heu Bachelor_heu
    foreach c of local ba_heu    {
        svy,subpop(`c'`i'):mean k_uebertritt2
        }
    }
    Last edited by Michael Duarte Goncalves; 04 Nov 2022, 09:29.

  • #2
    See your previous thread https://www.statalist.org/forums/for...th-survey-data in which it was explained that graph hbar cannot be combined with those twoway elements.

    This is a surprise and disappointment to many Stata users, but it's been explained now!

    Comment

    Working...
    X