Simple mean test by category

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

oksanakim
Posts: 58
Joined: Wed Apr 04, 2012 10:38 am

Simple mean test by category

Postby oksanakim » Fri Sep 06, 2013 11:43 am

Hello everyone

Please help with the following, should be a simple program but I do not do any programming with Eviews. For the data series called Ret collected over 25-month period, I need to perform a simple hypothesis test that the mean Ret for each month is not equal to zero. So 25 separate mean tests are required, but is there any more efficient way to do this via say programming? The separate Month categorical variable was crated. How can I do that if at all? Much appreciated!

startz
Non-normality and collinearity are NOT problems!
Posts: 3798
Joined: Wed Sep 17, 2008 2:25 pm

Re: Simple mean test by category

Postby startz » Fri Sep 06, 2013 3:00 pm

You can get the mean, standard deviation, and number of observations from View/Descriptive statistics/Stats by classification and using month as the classifying series. That gets most of the way.

oksanakim
Posts: 58
Joined: Wed Apr 04, 2012 10:38 am

Re: Simple mean test by category

Postby oksanakim » Fri Sep 06, 2013 3:17 pm

That's right but then how can I test that each of those 25 monthly means is statistically different from zero? My original question was more about how to perform a simple mean equality test for each month...

startz
Non-normality and collinearity are NOT problems!
Posts: 3798
Joined: Wed Sep 17, 2008 2:25 pm

Re: Simple mean test by category

Postby startz » Fri Sep 06, 2013 3:20 pm

I'm not sure of the question. Wouldn't you create a t-statistic for each month the way you would for another other mean test?

oksanakim
Posts: 58
Joined: Wed Apr 04, 2012 10:38 am

Re: Simple mean test by category

Postby oksanakim » Fri Sep 06, 2013 3:28 pm

I'm not sure either we are on the same page. A simple hypothesis test allows me to test whether the mean of the entire population is equal to, say, zero - t stats with probability is produced in this test. But what if I need to perform the same mean test for 25 sub samples from this population - separately for each month? Can I do this in Eviews without the need to manually break down the population into 25 sub samples and then separately performing a simple hypothesis test that each of 25 means is equal to zero? Thanks!

startz
Non-normality and collinearity are NOT problems!
Posts: 3798
Joined: Wed Sep 17, 2008 2:25 pm

Re: Simple mean test by category

Postby startz » Fri Sep 06, 2013 3:30 pm

So you want a joint test that all 25 means equal zero?

oksanakim
Posts: 58
Joined: Wed Apr 04, 2012 10:38 am

Re: Simple mean test by category

Postby oksanakim » Fri Sep 06, 2013 3:55 pm

I want 25 independent tests that each of monthly means is equal to zero.

startz
Non-normality and collinearity are NOT problems!
Posts: 3798
Joined: Wed Sep 17, 2008 2:25 pm

Re: Simple mean test by category

Postby startz » Fri Sep 06, 2013 4:02 pm

Code: Select all

ls Ret @expand(month)
will give you a t-statistic for each month, assuming a common variance across months. Or you can use the stats-by-classification output to compute a t-statistic for each month

oksanakim
Posts: 58
Joined: Wed Apr 04, 2012 10:38 am

Re: Simple mean test by category

Postby oksanakim » Fri Sep 06, 2013 4:36 pm

Thanks a lot for your help! Much appreciated.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest