Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: axis bar starting from 0 on graph (not the label)
From
lreine ycenna <[email protected]>
To
[email protected]
Subject
st: axis bar starting from 0 on graph (not the label)
Date
Thu, 20 Oct 2011 06:11:11 +0100
HI,
Is it possible to have the axis line start from where 0 is on the
y-axis? (I'm not talking about labeling my x-axis from 0, but the
x-axis bar) i.e. I have both positive and negative values on my y-axis
and currently the x-xaxis bar starts from the very bottom end of my
y-axis which is negative. Here's the command I use.
xtreg Y A B AxB, fe
generate income=((_n-1)/10)
matrix b=e(b)
matrix V=e(V)
scalar b1=b[1,1]
scalar b2=b[1,2]
scalar b3=b[1,3]
scalar varb1=V[1,1]
scalar varb2=V[2,2]
scalar varb3=V[3,3]
scalar covb1b3=V[1,3]
scalar covb2b3=V[2,3]
scalar list b1 b2 b3 varb1 varb2 varb3 covb1b3 covb2b3
gen lab=b1+b3*income
gen conse=sqrt(varb1+varb3*(income^2)+2*covb1b3*income)
gen a=1.96*conse
gen upper=conb+a
gen lower=conb-a
graph twoway (line lab income, clwidth(medium) clcolor(blue) clcolor(black))
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/