Hello
I am trying to graph a histogram or a bar chard by using the if and by commands but I have some problems . I have an EBITDA Variable for several firms and a YR Variable for the Year 2004-2014 but only want to display the YR 2006-2010. But both comands result in an error.
Code:
graph hbar (mean) EBITDA if YR== 2006,2007,2008,2009,2010, over(IND) over(YR)
graph hbar (mean) EBITDA if YR==2006-2010, over(IND) over(YR)
The samen Problem I have if I like to graph a bar with MLEV which is the median leverage over IND (Industry) by Year. Where IND is the original Variable were all Industries are in. IND1-9 are Industry dummies. I like to have a graph wehre I can see the median Leverage over industries and over years.
Code:
graph bar (asis) MLEV, over(IND1, IND2, IND3, IND4, IND5, IND6, IND7, IND8, IND9) over(YR)
invalid 'IND3'
r(198);
graph hbar (asis) EBITDA, over(YR)
variables YR _variables do not uniquely identify the observations
r(459);
Many Thanks for your help.
I couldn't give you a dataex as my set is too long and a shorter range need a by command where I have my problems. Sorry
I am trying to graph a histogram or a bar chard by using the if and by commands but I have some problems . I have an EBITDA Variable for several firms and a YR Variable for the Year 2004-2014 but only want to display the YR 2006-2010. But both comands result in an error.
Code:
graph hbar (mean) EBITDA if YR== 2006,2007,2008,2009,2010, over(IND) over(YR)
graph hbar (mean) EBITDA if YR==2006-2010, over(IND) over(YR)
The samen Problem I have if I like to graph a bar with MLEV which is the median leverage over IND (Industry) by Year. Where IND is the original Variable were all Industries are in. IND1-9 are Industry dummies. I like to have a graph wehre I can see the median Leverage over industries and over years.
Code:
graph bar (asis) MLEV, over(IND1, IND2, IND3, IND4, IND5, IND6, IND7, IND8, IND9) over(YR)
invalid 'IND3'
r(198);
graph hbar (asis) EBITDA, over(YR)
variables YR _variables do not uniquely identify the observations
r(459);
Many Thanks for your help.
I couldn't give you a dataex as my set is too long and a shorter range need a by command where I have my problems. Sorry
Comment