You can check r(r) after tabulate and see how many levels there are in your variable and then use if for your labels.
if (`r(r()' ==2) {
B4 = "Female" ///
B5 = "Male"
}
else {
....
B4 = "Female"
....
}
You can check r(r) after tabulate and see how many levels there are in your variable and then use if for your labels.
if (`r(r()' ==2) {
B4 = "Female" ///
B5 = "Male"
}
else {
....
B4 = "Female"
....
}