I'm not super experienced graphing with Stata so this is a somewhat basic question. I am making a simple bar graph that is something like graph bar (sum) dollars, over(product_type) over(cat_var). If my cat_var was, say, is_teenager with values of 0/1, would it be possible to use the over command to divide the graph so that it showed all values of 0/1 (corresponding to all observations) and just the values of 1(corresponding to teenagers) rather than the default split of 0 (not teenagers) and 1(teenagers)? Basically I want to section the graph by a subset grouping rather than a disjoint grouping and am wondering if you can do this with the over command or if there is a better approach. Thanks!
Related Posts with bar graph using over to look at subset and total of a categorical variable
Merging, tsfill, expand or collapse(max)?Hello, Please, I am trying to merge two datasets. Could anyone help me? I have the following variab…
Simulate Autoregressive ProcessI wanna simulate an AR process like this (see section 2). I've tried this Code: clear set obs 2…
Problem creating a combined bar and line graph with two y-axesHi, I am attempting to create a combined bar and line graph with two y-axes including a legend and …
command collapse(sum)imports is unrecognizedI have the following data Code: * Example generated by -dataex-. To install: ssc install dataex cl…
Error in MLE "too few variables specified"Hello sir, I am doing MLE estimation experimental data, and putting programs for the estimation. it …
Subscribe to:
Post Comments (Atom)
0 Response to bar graph using over to look at subset and total of a categorical variable
Post a Comment