Hello,
I am trying to use catplot to graph a categorical variable for two groups. I would like to have a blue bar and a red bar side by side. My data are below. I want to graph rmvl_rtrn_rsn1 by inc_parent (which equals 1 or 0). Have a blue bar if it equals 0 and a red bar if it equals 1 and have them side by side. I tried using over and by, but this just separates them into two different graphs and I would like them side by side as they have the same reasons. TIA for any help- CJ
I am trying to use catplot to graph a categorical variable for two groups. I would like to have a blue bar and a red bar side by side. My data are below. I want to graph rmvl_rtrn_rsn1 by inc_parent (which equals 1 or 0). Have a blue bar if it equals 0 and a red bar if it equals 1 and have them side by side. I tried using over and by, but this just separates them into two different graphs and I would like them side by side as they have the same reasons. TIA for any help- CJ
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str63 rmvl_rtrn_rsn1 float inc_parent "Return Home" 0 "Return Home" 1 "Return Home" 1 "Return Home" 0 "Return Home" 1 "Return Home" 1 "Return Home" 0 "Return Home" 0 "No Data" 1 "Return Home" 0 "Youth is 18+ and No Affidavit/Conciliation" 0 "Return Home" 1 "Return Home" 0 "Return Home" 0 "Return Home" 0 "Return Home" 0 "No Data" 1 "Return Home" 0 "Youth is 18+ and No Affidavit/Conciliation" 0 "Permanent Legal Custodianship" 1 "Return Home" 1 "Return Home" 0 "Return Home" 0 "Return Home" 1 "Return Home" 0 "No Data" 0 "Return Home" 0 "Return Home" 1 "Return Home" 0 "Return Home" 0 "No Data" 0 "No Data" 0 "No Data" 0 "No Data" 1 "Permanent Legal Custodianship" 1 "Return Home" 0 "Return Home" 1 "Return Home" 0 "Return Home" 0 "Return Home" 0 "Return Home" 0 "Youth is 18+ and No Affidavit/Conciliation" 1 "Return Home" 1 "Return Home" 0 "Return Home" 0 "Return Home" 1 "Return Home" 1 "Return Home" 1 "Return Home" 0 "Return Home" 0 "Return Home" 0 "Return Home" 0 "Youth is 18+ and No Affidavit/Conciliation" 0 "Youth is 18+ and No Affidavit/Conciliation" 0 "Youth is 18+ and No Affidavit/Conciliation" 1 "Return Home" 0 "No Data" 0 "No Data" 0 "No Data" 0 "Return Home" 0 "Return Home" 0 "Return Home" 1 "Return Home" 1 "Return Home" 0 "Return Home" 0 "Adoption" 1 "No Data" 0 "Return Home" 0 "No Data" 0 "Return Home" 1 "Return Home" 1 "Adoption" 0 "No Data" 1 "Return Home" 0 "Return Home" 0 "No Data" 0 "No Data" 0 "Return Home" 0 "Youth is 18+ and No Affidavit/Conciliation" 0 "Permanent Legal Custodianship" 1 "Return Home" 0 "Return Home" 0 "Return Home" 0 "Return Home" 1 "Return Home" 1 "Return Home" 1 "Return Home" 0 "Return Home" 0 "Return Home" 1 "Return Home" 0 "Return Home" 0 "No Data" 0 "Return Home" 0 "Return Home" 0 "Permanent Placement in the Home of a 'Fit and Willing' Relative" 1 "No Data" 0 "Return Home" 1 "Return Home" 1 "Return Home" 0 "Return Home" 1 end

Comment