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)
Related Posts with Problem "too few quotes" by using a graph hbar
Data ManagementHi I need help urgently colleagues with the following I have a large longitudinal panel dataset sp…
Stata returning "no observations r(2000)"Hey I´m trying to perform basic statistics on my dataset, determining whether values are correlated,…
output logisticHi to everybody. I hope that anybody can help me!! I've calculated a crude OR. and I obtained a cert…
Cumulative number of categories vs. cumulative no. membersHi First my dataset is similar to: Code: * Example generated by -dataex-. To install: ssc install d…
How to unpivot columns to create panel data?Hi all, In Excel, i'd usually use power query to unpivot columns and then copy the data into stata,…
Subscribe to:
Post Comments (Atom)
0 Response to Problem "too few quotes" by using a graph hbar
Post a Comment