Hi! I have a question about the standard deviation function in Eviews. Let's say I have GDP of a country over a period of about 20 years. I want to calculate the standard deviation of it in each year. When I use @stdev function, it gives me the same value for every company in every year. What I want is the standard deviation in each year which means it would change every year for every firms. I tried @stdevsby function but it gives me yearly standard deviation and does not change over companies. So, how to calculate it to get yearly and firmly data?
And I have an industry variable that takes value of 1 to 48 to specify 48 industries. I want to run a regression with a control of industry. However, since I am needed to drop the observations that is less than 20, therefore there are some industries that is dropped which makes the industry variable becomes not continuous. For example, for industry I might only have industry 1, 5, 8, 13, and 21. I want to use @expand(industry, @drop(1)) function in the regression, but it suddenly shows near singular problem. Can anyone help me?
Thank you in advance!
Standard deviation in each year & dummy industry
Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

 Posts: 4
 Joined: Thu Dec 20, 2018 7:04 am

 Posts: 4
 Joined: Thu Dec 20, 2018 7:04 am
Re: Standard deviation in each year & dummy industry
Let me make it clear for the dummy industry
I have read that we can add industry dummy easily by using @expand function. I have 48 industry and I create one variable called "di" and put numbers 1 to 48.
I have added @expand(di,@drop(1)) function in my regression but it keeps giving me "near singular matrix" problem. I have tried to change "1" to the others but still having the same problem.
And for information, I constrain my data to each year and each industry to have more than 20 observations. So, there are some industry that are completely removed which makes the number is not continuous. The remaining industry might not have the data in some years (for example for industry 2 in year 2000, it has only 10 observations, so I delete industry 2 year 2000 data, but if industry 2 in year 2001 have more than 20 observations, then, it will show the data). Would it affect the regression?
For another information, I also have tried to delete the constant and run @expand(di) but still it gives me near singular matrix pop up.
Please help meeeee
Thank you in advance!
I have read that we can add industry dummy easily by using @expand function. I have 48 industry and I create one variable called "di" and put numbers 1 to 48.
I have added @expand(di,@drop(1)) function in my regression but it keeps giving me "near singular matrix" problem. I have tried to change "1" to the others but still having the same problem.
And for information, I constrain my data to each year and each industry to have more than 20 observations. So, there are some industry that are completely removed which makes the number is not continuous. The remaining industry might not have the data in some years (for example for industry 2 in year 2000, it has only 10 observations, so I delete industry 2 year 2000 data, but if industry 2 in year 2001 have more than 20 observations, then, it will show the data). Would it affect the regression?
For another information, I also have tried to delete the constant and run @expand(di) but still it gives me near singular matrix pop up.
Please help meeeee
Thank you in advance!
Who is online
Users browsing this forum: No registered users and 17 guests