[R] I can't figure out my plm model. Any ideas?

Millo Giovanni Giovanni_Millo at Generali.com
Thu Jul 15 15:47:21 CEST 2010


Dear Salaam,

if I ever get you right (and I'm not sure I do), you are confusing the
residuals with the fixed effects. What you **would** probably be
computing, if you used square brackets like in

>
0.59081533*ADOP[200001]+0.04263590*PE[200002]-0.03717528*WOR[200002]+2.6
6677[200002]

(and amended the last index in your expression, which was wrong...) is
the **fitted value** for '200002'. The difference between this and
ADOP[200002] is the residual: should be ar1$residuals[200002].

Otherwise, your estimation results look "technically" OK to me. Sorry,
if I misunderstood your post.

HTH,
Giovanni

------------------------------

Message: 156
Date: Thu, 15 Jul 2010 13:15:36 +0800
From: Salaam Batur <swordlight20 at gmail.com>
To: r-help at r-project.org
Subject: [R] I can't figure out my plm model. Any ideas?
Message-ID:
	<AANLkTil-Py06oRQSu-lMdDxcRE2x34TTMQuCsXncA1I9 at mail.gmail.com>
Content-Type: text/plain

Dear R users,

I am using plm packege in R to build my model, but from the result I
can't
quite figure out what it is... Can anyone tell me why? Am I missing
something?

R Results:

*> ar1<-plm(formula=ADOP~lag(ADOP,1)+PE+WOR,
+ data=well, effect="time",model="within")
> summary(ar1)*

Oneway (time) effect Within Model

Call:
plm(formula = ADOP ~ lag(ADOP, 1) + PE + WOR, data = well, effect =
"time",
    model = "within")

Unbalanced Panel: n=135, T=1-119, N=10972

Residuals :
    Min.  1st Qu.   Median  3rd Qu.     Max.
-25.9000  -0.8950  -0.0627   0.7210  25.4000

Coefficients :
                Estimate  Std. Error t-value  Pr(>|t|)
lag(ADOP, 1)  0.59081533  0.00598959  98.640 < 2.2e-16 ***
PE            0.04263590  0.00087449  48.755 < 2.2e-16 ***
WOR          -0.03717528  0.00072192 -51.495 < 2.2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Total Sum of Squares:    148890
Residual Sum of Squares: 42814
F-statistic: 8960.98 on 3 and 10850 DF, p-value: < 2.22e-16

*> summary(fixef(ar1, effect="time"))
*       Estimate Std. Error t-value  Pr(>|t|)
200002  2.66677    0.22335 11.9397 < 2.2e-16 ***
200003  2.42303    0.22340 10.8464 < 2.2e-16 ***
200004  2.49954    0.21370 11.6964 < 2.2e-16 ***
200005  2.61619    0.21305 12.2799 < 2.2e-16 ***
200006  3.21967    0.21451 15.0094 < 2.2e-16 ***
200007  1.72400    0.21028  8.1986 2.220e-16 ***
200008  2.58108    0.21009 12.2854 < 2.2e-16 ***
200009  2.59461    0.21566 12.0309 < 2.2e-16 ***
200010  2.69361    0.21605 12.4676 < 2.2e-16 ***
200011  2.35014    0.22084 10.6419 < 2.2e-16 ***
200012  2.33155    0.22047 10.5751 < 2.2e-16 ***
200101  2.92930    0.21892 13.3808 < 2.2e-16 ***
200102  2.58167    0.22187 11.6361 < 2.2e-16 ***
200103  3.13288    0.21851 14.3377 < 2.2e-16 ***
200104  2.32652    0.21682 10.7303 < 2.2e-16 ***
200105  2.93256    0.21576 13.5918 < 2.2e-16 ***
200106  2.49128    0.21177 11.7640 < 2.2e-16 ***
200107  2.33528    0.21472 10.8759 < 2.2e-16 ***
200108  2.38340    0.21325 11.1767 < 2.2e-16 ***
200109  2.58050    0.21202 12.1709 < 2.2e-16 ***
..........so
on....................................................................
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
>
########################################################################


ADOP(200002)=0.59081533*ADOP(200001)+0.04263590*PE(200002)-0.03717528*WO
R(200002)+2.66677
(Feb2000)
....and so on...

*It should look like this, right? When I put the data to this model, the
right hand side and left one is not equal. What did I miss? *

	[[alternative HTML version deleted]]



------------------------------

Giovanni Millo
Research Dept.,
Assicurazioni Generali SpA
Via Machiavelli 4, 
34132 Trieste (Italy)
tel. +39 040 671184 
fax  +39 040 671160 


Ai sensi del D.Lgs. 196/2003 si precisa che le informazi...{{dropped:13}}



More information about the R-help mailing list