Hi,
I have panel data, two of my variables are equity issuance which is 0 if the firm did not issue equity in the year and 1 if it issue equity that year. the other variable is the leverage ratio. I want to find the mean leverage for firms that issue equity at the year of issuance, three years before the year of issuance and three years after the year of issuance. then test the hypothesis that the mean of leverage three years before and now are equal. also the leverage three years after issuance and now are equal (equality of means).
How to do it in eviews.
Appreciate your help
The mean of observations that satisfy a condition
Moderators: EViews Gareth, EViews Moderator
-
- Posts: 3
- Joined: Sat Aug 06, 2011 12:19 am
-
- EViews Developer
- Posts: 2672
- Joined: Wed Oct 15, 2008 9:17 am
Re: The mean of observations that satisfy a condition
There are a bunch of dimensions here about which we need to be clear before we can figure out how to proceed.
You have multiple firms observed over multiple years. You have a variable which indicates for each firm/year whether there was issuance.
Now if I understand correctly, you want to compute the means of a variable over firms/time for firms in the periods in which they issued? Similarly for lag 3 and lead 3 using the contemporaneous values?
You have multiple firms observed over multiple years. You have a variable which indicates for each firm/year whether there was issuance.
Now if I understand correctly, you want to compute the means of a variable over firms/time for firms in the periods in which they issued? Similarly for lag 3 and lead 3 using the contemporaneous values?
-
- Posts: 3
- Joined: Sat Aug 06, 2011 12:19 am
Re: The mean of observations that satisfy a condition
Yes, thats right. How to to do it? Any suggestions
-
- EViews Developer
- Posts: 2672
- Joined: Wed Oct 15, 2008 9:17 am
Re: The mean of observations that satisfy a condition
Computation of the means is easy, testing is more problematic.
The problem in testing is that there is likely to be correlation in the mean values. It is not clear how you wish to handle this.
I'm assuming that it is possible for a given firm to issue both in period t and in period t-3 or t+3. If it is not possible, then we can do the calculations in one-go and perform tests (though again, the presence of correlation between observations makes that potentially problematic).
Code: Select all
smpi if issue = 1
scalar mean1 = @mean(y)
smpl if issue(-3) = 1
scalar mean2 = @mean(y)
smpl if issue(3) = 1
scalar mean3 = @mean(y)
The problem in testing is that there is likely to be correlation in the mean values. It is not clear how you wish to handle this.
I'm assuming that it is possible for a given firm to issue both in period t and in period t-3 or t+3. If it is not possible, then we can do the calculations in one-go and perform tests (though again, the presence of correlation between observations makes that potentially problematic).
-
- Posts: 3
- Joined: Sat Aug 06, 2011 12:19 am
Re: The mean of observations that satisfy a condition
What I am really trying to do is to replicate the attached two Tables from Hovakimian (2006) using my data. The idea will be the same for all cases once I know how to do one of them.
- Attachments
-
- Tables to replicate.docx
- (174.69 KiB) Downloaded 372 times
-
- EViews Developer
- Posts: 2672
- Joined: Wed Oct 15, 2008 9:17 am
Re: The mean of observations that satisfy a condition
To be honest, I can't really figure out exactly what's going on from that table...
Return to “General Information and Tips and Tricks”
Who is online
Users browsing this forum: No registered users and 46 guests