Page 1 of 1

Calculating By Group Statistics only for cross sections with more than 3 annual observations

Posted: Wed Jul 11, 2018 6:41 am
by GraemeSmith
Hi All,

I want to calculate by-group standard deviations for each fund (cross section) in my 2001-2017 sample, however, I only want to do so for funds with more than 3 annual observations to improve the robustness of the standard deviation measure and subsequent analysis. How would I go about doing this?

Re: Calculating By Group Statistics only for cross sections with more than 3 annual observations

Posted: Wed Jul 11, 2018 7:35 am
by EViews Gareth

Code: Select all

show @stdevsby(y, @crossid, "if @obsby(y, @crossid)>3")

Re: Calculating By Group Statistics only for cross sections with more than 3 annual observations

Posted: Wed Jul 11, 2018 8:56 am
by GraemeSmith
Thanks for the prompt response Gareth, it worked!