hist vs distplot

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

maxchen
Posts: 191
Joined: Fri Oct 10, 2008 4:03 pm

hist vs distplot

Postby maxchen » Thu Sep 02, 2010 5:27 pm

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?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13600
Joined: Tue Sep 16, 2008 5:38 pm

Re: hist vs distplot

Postby EViews Gareth » Thu Sep 02, 2010 7:18 pm

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".

maxchen
Posts: 191
Joined: Fri Oct 10, 2008 4:03 pm

Re: hist vs distplot

Postby maxchen » Thu Sep 02, 2010 11:55 pm

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.

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: hist vs distplot

Postby EViews Glenn » Fri Sep 03, 2010 8:56 am

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.

maxchen
Posts: 191
Joined: Fri Oct 10, 2008 4:03 pm

Re: hist vs distplot

Postby maxchen » Fri Sep 03, 2010 4:49 pm

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"


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests