Hey Folks,
i want to create a 100-Percent-Graph--bar with 14 Variables . For this i already have a working Syntaxx. But now Stata says that in my syntaxx are "too few quotes" to label the Variables. I don't understand why the Syntaxx doesn't working. I only change den values of the labels (" xyz"). I hope that you can help me to solve the "little few problem".
Best regards,
Fritzi
Syntaxx:
label define itemlabels 1 "Selbsterkenntnis" 2 "Probleme bewältigen" 3 "Organisation"/*
*/4 `" "Aufschieben" "' /*
*/5 `" "Verunsicherung bei Kontakten" "' /*
*/6 "Schwäche zeigen" 7 "Fachwechsel / Studienabbruch" 8 `" "weniger zukunfstängste" "' /*
*/9 `" "weniger Stress" "' 10 `" "weniger bedrohliche Lebenssituation" "' 11 "Standpunkt in Beziehungen" /*
*/12 `" "bessere Techniken für Bewältigung Studienanforderungen" "' /*
*/13 `" "weniger Selbstzweifel" "' /*
*/14 `" "Mehr Zeit und Psychotherapie für Problembewältigung" "'
label values item itemlabels1
tab a47_ ,g(zahl) nof
graph hbar zahl* , over(item, label(labsize(vsmall)) relabel( 1 "Selbsterkenntnis" 2 "Problemebewältigen" "Organisation"/*
*/4 `" "Aufschieben" "' /*
*/5 `" "Verunsicherung bei Kontakten" "' /*
*/6 "Schwäche zeigen" 7 "Fachwechsel / Studienabbruch" 8 `" "weniger Zukunfstängste" "' /*
*/9 `" "weniger Stress" "' 10 `" "weniger bedrohliche Lebenssituation" "' 11 "Standpunkt in Beziehungen"*/12 `" "bessere Techniken für Bewältigung Studienanforderungen" "' /*
*/13 `" "weniger Selbstzweifel" "' /*
*/14 `" "Mehr Zeit und Psychotherapie für Problembewältigung" "')) /*
*/ percent stack legend(rows(2) position(6) size(small) region(lc(none))) ///
legend(size(small)) legend(label(1 "nicht") label(2 "gering") ///
label(3 "stärker") label(4 "Sehr Stark")) ///
bar (1, bcolor(green)) bar (2, bcolor(midgreen)) bar (3, bcolor(orange_red)) bar (4, bcolor(red)) ///
blabel(bar, position(center) size(vsmall) format(%4,0f) color(white)) bar(1, color(green)) bar (2, color(midgreen)) bar (3, color (orange_red)) bar (4, color(red)) ///
ytitle ("Prozent", size(small)) ylabel(,labsize(small)) title ("Studienbezogene Probleme", size(medium) color(black)) ///
graphregion(color(white)) bgcolor(white)
0 Response to Problem "too few quotes" by using a graph hbar
Post a Comment