I've plotted two graphs . However I have to run a long do file of code.
I would like to plot 2 graphs
First one: with -failure reason- over -gender- FOR failures within 2 years
Then plot another graph with -failure reason- over -gender- FOR failures AFTER 2 years
However, as the -graph- does not support -if years2== 1- I keep having to run my long do file
then
drop if years2== 0 run the following code
Then ...
If you could suggest a code where I could keep the dataset and run the above codes without having to -clear all- I could then keep by 2 graphs (years2=0 ; year2=1) on the same graph page by using
thanks
I would like to plot 2 graphs
First one: with -failure reason- over -gender- FOR failures within 2 years
Then plot another graph with -failure reason- over -gender- FOR failures AFTER 2 years
However, as the -graph- does not support -if years2== 1- I keep having to run my long do file
then
drop if years2== 0 run the following code
Code:
graph bar (percent), over(failurereason) over(gender) asyvars
Code:
clear all /// Run the code again drop if years2 == 1 graph bar (percent), over(failurereason) over(gender) asyvars
Code:
graph combine m1 m2
thanks
Comment