Empty Range
Posted: Wed Sep 05, 2018 12:23 am
Hello,
I'm trying to draw the histogram of a series BOA, graphs it as a bar graph, overlay it with the normal density with the sample mean and variance, and display
the mean, standard deviation, skewness and kurtosis in the upper right corner.
I have used the following code:
density(maxgrid=50,type=histogram) BOA / fBOA dBOA
set nBOA = 1.0/sqrt(%variance)*%density((fBOA-%mean)/sqrt(%variance))
spgraph
scatter(style=bargraph,overlay=line,ovsamescale,header="Bank of America") 2
# fBOA dBOA
# fBOA nBOA
display(store=s) "Mean" %mean "\\Std Error" sqrt(%variance) $
"\\Skewness" %skewness "\\Excess Kurtosis" %kurtosis
grtext(position=upright) s
spgraph(done)
This works fine when I use it for all the observations (3200 approximately). However, when I used this for a lesser range by specifying a different time period in the Data command and then run the code, I get the error "nBOA is an empty range".
Why is this happening?
Thanks!
I'm trying to draw the histogram of a series BOA, graphs it as a bar graph, overlay it with the normal density with the sample mean and variance, and display
the mean, standard deviation, skewness and kurtosis in the upper right corner.
I have used the following code:
density(maxgrid=50,type=histogram) BOA / fBOA dBOA
set nBOA = 1.0/sqrt(%variance)*%density((fBOA-%mean)/sqrt(%variance))
spgraph
scatter(style=bargraph,overlay=line,ovsamescale,header="Bank of America") 2
# fBOA dBOA
# fBOA nBOA
display(store=s) "Mean" %mean "\\Std Error" sqrt(%variance) $
"\\Skewness" %skewness "\\Excess Kurtosis" %kurtosis
grtext(position=upright) s
spgraph(done)
This works fine when I use it for all the observations (3200 approximately). However, when I used this for a lesser range by specifying a different time period in the Data command and then run the code, I get the error "nBOA is an empty range".
Why is this happening?
Thanks!