Different coefficient? what is the problems

Econometrics questions and discussions
eigenjin

Different coefficient? what is the problems

Unread post by eigenjin »

First of all, Thank you for your help.

Thanks to your help, I could solve the previous problem "Restriction with SUR model(AIDS case)" problems
It works well. It produce the same coefficient which I expected.
Actually, I replicate it using RATS written by different Statistical Software. (R-language)

I do similar thing in the "Rotterdam model", too.
using same data set, and same method, nonlinsystem,
I exactly follow the introduction in the CONSUMER.RPF example (page UG-141 in RATS v8)

But estimated parameters are different from the originals.
Some of them, has the similar values, but some of them are not.

According to the Original
the estimated parameters are satisfied the economic assumption on Rotteram
for example, for all p[i,i] has the negative value,
and the marginal expenditure share (theta) have all positive sign

but the estimated parameters from RATS has the different situation
1. one of the theta is "negative" this means that it is a inferior goods.
I know that the Rotterdam model assume that the all goods are normal...
the estimated value are violate this assumption.

2. one of the p[i,i] has the positive sign.
this mean that if I compute the estimated elasticity of this good, this good will has positive sign of own price elasticity.
It is of course weird....


-->
I am not sure what is the problem of this situation.
first of all, I am sure the estimation method of both two are same..I have double checked..
It can be proved by the AIDS cases...it has the exactly same parameter values....

But, the Rotterdam case,,,has the different parameters from the original estimation.
but...parameters in Orignal case are more reasonable thatn...RATSs case..

Any suggestion?
or Can you give any information why this kinds of thing happens...?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Different coefficient? what is the problems

Unread post by TomDoan »

You'll have to attach your program and data and indicate which coefficients you think are wrong.
eigenjin

Re: Different coefficient? what is the problems

Unread post by eigenjin »

According to the etimation result from R using systemfit package
using the attached data, I have the following coefficient

Rotterdam estimation result from R

theta p1 p2 p3 p4
[1,] 0.10430604 -0.067096490 -0.002333494 -0.010096492 0.083681910
[2,] 0.35081000 -0.002333494 -0.007815808 -0.045823838 0.034702882
[3,] 0.06810146 -0.010096492 -0.045823838 -0.016593741 0.056256779
[4,] 0.37589082 0.083681910 0.034702882 0.056256779 -0.213269207
[5,] 0.01981670 -0.051296545 0.084532565 -0.003824605 -0.002041086
[6,] 0.08107499 0.047141110 -0.063262306 0.020081897 0.040668722
p5 p6
[1,] -0.051296545 0.04714111
[2,] 0.084532565 -0.06326231
[3,] -0.003824605 0.02008190
[4,] -0.002041086 0.04066872
[5,] -0.046517255 0.01914693
[6,] 0.019146925 -0.06377635


But Rotterdam estimation result from R

1. A1 0.112082192 0.050177969 2.23369 0.02550326
2. A2 0.342071335 0.069069224 4.95259 0.00000073
3. A3 0.072226390 0.024797621 2.91263 0.00358395
4. A4 0.577641865 0.129874616 4.44769 0.00000868
5. A5 0.020660674 0.024092951 0.85754 0.39114642
6. P11 -0.048314242 0.071201558 -0.67856 0.49741925
7. P12 -0.019354207 0.000000000 0.00000 0.00000000
8. P13 0.002351814 0.000000000 0.00000 0.00000000
9. P14 0.083164526 0.000000000 0.00000 0.00000000
10. P15 -0.051189134 0.000000000 0.00000 0.00000000
11. P16 0.033341242 0.033816597 0.98594 0.32416102
12. P21 -0.019354207 0.078590008 -0.24627 0.80547476
13. P22 0.050303613 0.132106230 0.38078 0.70336536
14. P23 -0.049399617 0.000000000 0.00000 0.00000000
15. P24 0.008676457 0.000000000 0.00000 0.00000000
16. P25 0.077658916 0.000000000 0.00000 0.00000000
17. P26 -0.067885164 0.047272925 -1.43603 0.15099485
18. P31 0.002351814 0.019821130 0.11865 0.90555116
19. P32 -0.049399617 0.030328222 -1.62883 0.10334833
20. P33 -0.011978183 0.012176771 -0.98369 0.32526733
21. P34 0.052737938 0.000000000 0.00000 0.00000000
22. P35 -0.000589187 0.000000000 0.00000 0.00000000
23. P36 0.006877233 0.014520394 0.47363 0.63576680
24. P41 0.083164526 0.034692407 2.39720 0.01652105
25. P42 0.008676457 0.052046980 0.16670 0.86760269
26. P43 0.052737938 0.016964985 3.10863 0.00187954
27. P44 -0.269346592 0.082259164 -3.27437 0.00105899
28. P45 -0.000071125 0.000000000 0.00000 0.00000000
29. P46 0.124838795 0.042113367 2.96435 0.00303322
30. P51 -0.051189134 0.029449215 -1.73822 0.08217254
31. P52 0.077658916 0.039412549 1.97041 0.04879130
32. P53 -0.000589187 0.011554823 -0.05099 0.95933306
33. P54 -0.000071125 0.017520336 -0.00406 0.99676092
34. P55 -0.048602686 0.024453189 -1.98758 0.04685809
35. P56 0.022793215 0.022420284 1.01663 0.30932774


As I mentioned previous post,
But estimated parameters are different from R, Some of them, has the similar values, but some of them are not.

According to the Original(R)
the estimated parameters are satisfied the economic assumption on Rotteram
for example, for all p[i,i] has the negative value,
and the marginal expenditure share (theta) have all positive sign

but the estimated parameters from RATS has the different situation
1. one of the theta is "negative" this means that it is a inferior goods.
I know that the Rotterdam model assume that the all goods are normal...
the estimated value are violate this assumption.

<<sum of the A1+A2+A3+A4+A5 >0, so..the A6 should have a negative sign to satisfy the homogeneity restriction>>


2. one of the p[i,i] has the positive sign.
this mean that if I compute the estimated elasticity of this good, this good will has positive sign of own price elasticity.
It is of course weird....

<< P22 0.050303613 0.132106230 0.38078 0.70336536>>

The following is the code of estimation I used
I also attached the exel file

Code: Select all

****************************************************************************
* Rotterdam Demand System Estimation Using RATS
***************************************************************************

DATA(FORMAT=XLS,ORG=COLUMNS) 1 25 dq1	dq2	dq3	dq4	dq5	dq6	sw1	sw2	sw3	sw4	sw5	sw6	dp1	dp2	dp3	dp4	dp5	dp6



*********Divisia Quantity Index *******************
set DivisiaQ = sw1*dq1 +  sw2*dq2 +  sw3*dq3 +  sw4*dq4 +  sw5*dq5 +  sw6*dq6


********* dependent variable in Rotterdam demand system
set wdq1 = sw1*dq1 ; set wdq2 =sw2*dq2
set wdq3 = sw3*dq3 ; set wdq4 =sw2*dq4
set wdq5 = sw5*dq5 ; set wdq6 =sw6*dq6


*check the variable after generating process
tables


******************************************************************
**** Rotterdam demand Analysis
*****************************************************************

********* define the Rotterdam demand system
set Rdq = wdq1 +wdq2 +wdq3 + wdq4 +wdq5 +wdq6


**** Create the parameter and Demand system
* 1. Define the parameters which are used in the Rotterdam demand system
nonlin(parms=base) a1 a2 a3 a4 a5  p11 p12 p13 p14 p15 p21 p22 p23 p24 p25 p31 p32 p33 p34 p35 p41 p42 p43 p44 p45 p51 p52 p53 p54 p55

nonlin(parms=relax) ep16 ep26 ep36 ep46 ep56

* Symmetry condition
nonlin(parms=symmetry) p12=p21 p13=p31 p14=p41 p15=p51 p23=p32 p24=p42 p25=p52 p34=p43 p35=p53 p45=p54

*********************************************************
*** Set up the Rotterdam demand system
***********************************************************

frml eq1 wdq1= a1*DivisiaQ + p11*(dp1-dp6) + p12*(dp2-dp6) + p13*(dp3-dp6) + p14*(dp4-dp6) + p15*(dp5-dp6) + ep16*dp6
frml eq2 wdq2= a2*DivisiaQ + p21*(dp1-dp6) + p22*(dp2-dp6) + p23*(dp3-dp6) + p24*(dp4-dp6) + p25*(dp5-dp6) + ep26*dp6
frml eq3 wdq3= a3*DivisiaQ + p31*(dp1-dp6) + p32*(dp2-dp6) + p33*(dp3-dp6) + p34*(dp4-dp6) + p35*(dp5-dp6) + ep36*dp6
frml eq4 wdq4= a4*DivisiaQ + p41*(dp1-dp6) + p42*(dp2-dp6) + p43*(dp3-dp6) + p44*(dp4-dp6) + p45*(dp5-dp6) + ep46*dp6
frml eq5 wdq5= a5*DivisiaQ + p51*(dp1-dp6) + p52*(dp2-dp6) + p53*(dp3-dp6) + p54*(dp4-dp6) + p55*(dp5-dp6) + ep56*dp6

***************************************************************
**** set up the initial values of parameters
****************************************************************
compute a1=a2=a3=a4=a5=0.0
compute p11=p12=p13=p14=p15=p16=p21=p22=p23=p24=p25=p26=p31=p32=p33=p34=p35=p36=p41=p42=p43=p44=p45=p46=p51=p52=p53=p54=p55=p56=0.0
compute ep16=ep26=ep36=ep46=ep56=0.0


*********************************************************************
*** estimate the demand system
*********************************************************************

* 1. with Homogeniety only
nlsystem(parmset=base) / eq1 eq2 eq3 eq4 eq5
nlsystem(parmset=base+relax) / eq1 eq2 eq3 eq4 eq5

* 2. with Symmetric and Homogeneity
compute ep16=ep26=ep36=ep46=ep56=0.0
nlsystem(parmset=base+symmetry)  / eq1 eq2 eq3 eq4 eq5
Last edited by eigenjin on Tue Jan 10, 2012 7:48 pm, edited 1 time in total.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Different coefficient? what is the problems

Unread post by TomDoan »

Code: Select all

********* dependent variable in Rotterdam demand system
set wdq1 = sw1*dq1 ; set wdq2 =sw2*dq2
set wdq3 = sw3*dq3 ; set wdq4 =sw2*dq4
set wdq5 = sw5*dq5 ; set wdq6 =sw6*dq6
You have a typo in your definition of wdq4.
eigenjin

Re: Different coefficient? what is the problems

Unread post by eigenjin »

Thank you very much...
I checked that it is same....
Post Reply