Page 1 of 1

hist vs distplot

Posted: Thu Sep 02, 2010 5:27 pm
by maxchen
see the following code

Code: Select all

%ex7 = "\Example Files\EV7 Manual Data" %ch13 = "\Chapter 13 - Graphing Data" %wf = @evpath + %ex7 +%ch13 +"\geyser" wfopen %wf freeze(gf00) length.hist freeze(gf10) length.distplot hist freeze(gf11) length.distplot hist(rightclosed) %wf = @evpath + %ex7 +%ch13 +"\cdrate" pageload(page=CDrate) %wf freeze(gf00) cdrate.hist freeze(gf10) cdrate.distplot hist freeze(gf11) cdrate.distplot hist(rightclosed)
note that in Geyser's data, gf00 is similar to gf11, although the x-tick is less 0.1. However, in page CDrate, gf00 is similar to gf10. How to understand the behavior of cmd hist?

Re: hist vs distplot

Posted: Thu Sep 02, 2010 7:18 pm
by EViews Gareth
Not sure what you're asking.

The hist command just shows a representative histogram of the data, where bin width etc.. are chosen to make the histogram "nice".

Re: hist vs distplot

Posted: Thu Sep 02, 2010 11:55 pm
by maxchen
Thanks.
I first think that "hist" is equivalent to "distplot hist". now I know it is not, "hist" may adjust something like bin, anchor and how obs on end-point are handled.

Re: hist vs distplot

Posted: Fri Sep 03, 2010 8:56 am
by EViews Glenn
displot chooses a set of defaults for the bin placement and width that may differ from those in hist. If you look at the options for the histogram in distplot/hist you will see that you have greater ability in distplot to control those items.

Re: hist vs distplot

Posted: Fri Sep 03, 2010 4:49 pm
by maxchen
thanks
on histograms, distplot is more full-featured and customizable. I just feel a bit odd that hist sometimes behave like "distplot hist(rightclosed)" and at other time like "distplot hist"