Page 1 of 1

Calculating conditional mean

Posted: Wed Nov 16, 2011 7:26 am
by Imhlanga
Hi;
I want to calculate a conditional mean of a series, however i am new to Eviews proigraming. i have ordered observations from largest to smallest. what i want to do is to calculate the mean of all the observations that are smaller than a particular value x.

given a series y, i want to find the mean(y|y<x)

your help will be very much appreciated.

Thanks

Alexy.

Re: Calculating conditional mean

Posted: Wed Nov 16, 2011 7:36 am
by EViews Gareth

Code: Select all

smpl if y<x scalar mean = @mean(y)

Re: Calculating conditional mean

Posted: Wed Nov 16, 2011 10:00 am
by Imhlanga
Thank you so much Gareth, now am going to finish my thesis! much appreciated.
Alexy