Quantcast
Channel: EViews
Viewing all 24155 articles
Browse latest View live

rename dummy and diagonal dummy

$
0
0
Hello,

if i use the one of previous code (in page two) it doesn't work correctly, and i would to generate all the (d_, t_, b_, d1_, t1_, b1_) not one by one, and the " series {%series_name1} = @recode({%series_name}, @nan({%series_name}(-1), 0)+2 , 0)" generate this t_001= 1 2 2 00000, here i have just make your code for three spanning by week. have you understood me :roll:

!size = 3 'how many weeks per dummy
!first_date_number = @dateval(@otod(1))
for !i = 1 to @obsrange
!week = @datediff(@dateval(@otod(!i)), !first_date_number, "ww")
!id = @floor(!week / !size) + 1
%series_name = "d_" + @str(!id, "i03")
%series_name1 = "t_" + @str(!id, "i03")
%series_name2 = "b_" + @str(!id, "i03")
%series_name3 = "d1_" + @str(!id, "i03")
%series_name4 = "t1_" + @str(!id, "i03")
%series_name5 = "b1_" + @str(!id, "i03")
if not @isobject(%series_name) then
series {%series_name} = @floor(@datediff(@date, !first_date_number, "ww") / !size) + 1 = !id
series {%series_name1} = @recode({%series_name}, @nan({%series_name}(-1), 0)+1, 0)
series {%series_name2} =@recode({%series_name}, 3, 0)
'series {%series_name3}=?
'series {%series_name4}=?
'series {%series_name5}=?
endif
next



rename dummy and diagonal dummy

$
0
0
There are a few bugs. In the line generating series t_*, the series inside the @nan should be %series_name1 not %series_name (note that in my original example it's t_003, not d_003).

Code:

series {%series_name1} = @recode({%series_name}, @nan({%series_name1}(-1), 0)+1, 0)

Generating series b_*, the constant 3 needs to be replaced with the unique identifier for the dummy.

Code:

series {%series_name2} = @recode({%series_name}, !id, 0)

Generating the basic cumulative dummies, d1_*, is almost exactly he same the non-cumulative dummies, d_*, you just accept any identifier less than or equal to the current identifier ("=" becomes "<=").

Code:

series {%series_name3} = @floor(@datediff(@date, !first_date_number, "ww") / !size) + 1 <= !id



Favar QUESTION

$
0
0
After the estimation, variables named _facrot1 _facrot2 ... will be created.


rename dummy and diagonal dummy

$
0
0
Great, thank you for your help EViews Matt. 8)
Nice day.


Weighted Dependent Variable - Linear Regression

$
0
0
I have a linear model, Fixed Effects where I look at sales for roughly 6,400 different items across 84 months. I have been told that I should run a regression where my observations are "weighted by sales volume or market share to better represent the overall market". My question is how can I weight my dependent variable (sales in units) within a regression based on a weight/scale? Do I need to manipulate the variable itself?

Any advice is greatly appreciated, thanks!


panel: Pooling vs Random vs Fixed (with large i & few t)

$
0
0
Hi,
I'm trying to conduct panel data regression.

Among 3 options(pooling, fixed, random),
I'd like to know which one would be best for my analysis.

My input data is unusual. It has a lot of individuals(i) but few periods(t)
Specific input data is as follows:

Periods included : 3
Cross-sections included : 8,194
Total panel (unbalanced) observations: 14,939


After conducting regression, my conclusions are as follows:

1) Pooling regression
- Every coefficient is significant with p-values under 1%.
- But, I think this method is relatively simple and dull...

2) Random effect
- Every coefficient is also significant.
- But fixed effect could be a more suitable model because Hausman test rejects null hypothesis,


3) Fixed effect
- According to the Hausman test, this would be suitable.
- But lots of coefficients are insignificant.
- Moreover, it might cause , owing to asymmetric input data(large cross-section, short periods).

So, I'd like to choose 2) random effect.

Is there any problem I might be missing if I choose 2) random effect ?
I'm concerned about the input data having a very short period.
I've never seen such panel data regression conducted with extremely short periods.


Favar QUESTION

$
0
0
dakila wrote:After the estimation, variables named _facrot1 _facrot2 ... will be created.

aftar the estimation variables are create. now how i estimation FAVAR model?How to obtain the number of lags?
thank u.


determining dynamic factors

$
0
0
Hi,

I am trying to implement a dynamic factor model to choose the dynamic factors based on Bai and Ng (2007) criterion. for which, I need the residual co variance of the VAR in the static factors. So does that mean, we have to run a VAR on all the static factors taken together? If so what is the dependent variable? or, should we be running a VAR on factors one by one and then use the make resid option within Eviews?

Thanks in advance, any help will be appreciated.



Dependent variable and market power measure

$
0
0
In a journal I have read called 'Bank competition and financial stability' Allen Berger, I have seen how they have the dependent variable for example being the Z-index and then have multiple market power measures such as the Lerner index and test these on a number of variables such as loans to assets, and get different results because of the different market power measures. Is this possible to do in EViews as I'm relatively new to using it and only see the option of having the dependent variable and not sure if I can set a market power measure.

So for example I would have the dependent variable as Z-score and then would test this on all of my other variables using 2SLS, but from reading journals and seeing their tables it seems as if it is possible to use the market power measure separately to generate different results on the other variables. If so how?


FOR LOOP

$
0
0
I have the following formula,
frml r_l_loan_bs = l_loan_bs - l_cpi

How to write FOR loop above formula in case of many variables?

Actually, I have written like this

frml r_l_loan_bs = l_loan_bs - l_cpi
for %x l_loan_min l_loan_agr l_loan_manu l_loan_elec l_loan_cons l_loan_trade l_loan_ser
frml r_{%x} = {%x} - l_cpi

But it didn't work. Please help me!


FOR LOOP

$
0
0
Not sure what frml is, why not use genr?

Something like:
Code:
genr r_l_loan_bs = l_loan_bs - l_cpi
for %x l_loan_min l_loan_agr l_loan_manu l_loan_elec l_loan_cons l_loan_trade l_loan_ser
genr r_{%x} = {%x} - l_cpi
next



FOR LOOP

Stacking Area Bands?

Stacking Area Bands?

Monthly data by quarter

$
0
0
Hi

I would like to use monthly data in a quarterly page. For quarters where all 3 months are available the simple average across monthly values option is fine, but I don't want to waste any available months past the last full quarter.

How can I use monthly series in a quarterly page so that the months are average except when there are only 1 or 2 months in the last quarter, in which case I would want to repeat the last available month for the empty months in that quarter and only then average the 3 months.

Thanks!



Basic Rolling Regression

$
0
0
Thank you very much "The Yoyo", it worked. I changed it to +22 instead of +23.


Monthly data by quarter

$
0
0
I think the easiest way would be on the monthly page to create a new series that is equal to the original series, but fills in the missing months with the previous month's value.
If it is always only the last month of a quarter that is missing something as simple as:
Code:

series x = @recode(y=na, x(-1), y)

would do the trick (assuming the very first observations is not an NA).


Monthly returns

$
0
0
Hey, i have a 389 observation serie. Is an index serie( index quote) and i want to get all the log monthly returns. I have no idea how to write the equation ln(yt/yt-1). I dont even know if i should generate a new variable. Sorry for my english( its not my language). Ill be very gratefull for your help


Monthly returns

Monthly data by quarter

$
0
0
If your monthly data doesn't fall on quarter boundaries, or you don't want to extend it so that Gareth's solution could be applied, you could also explicitly "clean up" the last observation of the quarterly data. For example, for a fictitious series x on two pages "Monthly" and "Quarterly":

Code:

pageselect Monthly
if @mod(@datepart(@dateval(y.@last), "mm"), 3) = 2 then
    smpl @last-1 @last
    !avg = (@first(x) + 2 * @last(x)) / 3
    pageselect Quarterly
    smpl @last @last
    x = !avg
endif



Viewing all 24155 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>