Create mean (time series data) from panel data

For questions regarding programming in the EViews programming language.

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

sarah_ec
Posts: 7
Joined: Mon Aug 24, 2015 4:25 am

Create mean (time series data) from panel data

Postby sarah_ec » Tue Oct 20, 2015 1:14 am

Hi all,

I have a panel data set and I would like to create a series with the mean of the cross-sectional data per year, so that I get time series data afterwards. However, I want to use only data from those id-series, where a specific condition is met. Can anyone help me out with the command?

So if I have a panel data series "A" I want to have the mean per period of all those data points where a condition "B" is met.

Thanks to everyone who reads this!

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

Re: Create mean (time series data) from panel data

Postby EViews Gareth » Tue Oct 20, 2015 4:32 am

Code: Select all

series timemeans = @meansby(X, @date, "if condition")


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests