Hi Alex,
 Welcome to the R-help list. 

This is of no help with your question but a general suggestion. Including your 
code was great but it probably would help if you also included some sample 
data. 

The best way to supply data is to use dput(). See ?dput or have a look 
athttp://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
 and/or http://adv-r.had.co.nz   for information on it and other suggestions 
for asking questions on R-help.

dput() provides a 'perfect' copy of your data and ensures that R-help readers 
see the data exactly as you do on your computer.

John Kane
Kingston ON Canada


> -----Original Message-----
> From: alexier...@hotmail.com
> Sent: Sun, 1 Nov 2015 18:40:36 +0000
> To: r-help@r-project.org
> Subject: [R] Fixed effects estimators doesn't drop or omit
> 
> The title says it all, really. Fixed effects in the plm package still
> estimates coefficients for time invariant variables. Now, if this isn't
> normal, you might think this is a data entry issue, but I don't think it
> is a data entry issue. Hausman-Taylor in the plm package correctly
> distinguishes the time invariants from the time variants using the same
> data.
> 
> So, is this normal? Am I supposed to omit them myself? Do I run the
> regression including them but excluding their results when I display it
> to my reader? See below for the code I am using.
> 
> 
> library(plm)
> mydata <- read.csv(file="FILE.csv",head=TRUE,sep=",")
> 
> 
> Y <- cbind(mydata$lnTRADE)
> X <- cbind(mydata$lnGDPi, mydata$lnGDPj, mydata$lnDIST, mydata$lnIPRi,
> mydata$lnIPRj, mydata$lnGDP.SIM, mydata$C.BORD, mydata$C.LANG,
> mydata$EUZ)
> 
> 
> # Fixed effects panel regression
> fixed <- plm(Y ~ X, data=pdata, model= "within")
> summary(fixed)
> pbgtest(fixed)
> coeftest(fixed, vcov = vcovHC(fixed, type = "HC0"))
> 
> 
> library(plm)
> mydata <- read.csv(file="FILE.csv",head=TRUE,sep=",")
> 
> Y <- cbind(mydata$lnTRADE)
> X <- cbind(mydata$lnGDPi, mydata$lnGDPj, mydata$lnDIST, mydata$lnIPRi,
> mydata$lnIPRj, mydata$lnGDP.SIM, mydata$C.BORD, mydata$C.LANG,
> mydata$EUZ)
> 
> # Fixed effects panel regression
> fixed <- plm(Y ~ X, data=pdata, model= "within")
> summary(fixed)
> pbgtest(fixed)
> coeftest(fixed, vcov = vcovHC(fixed, type = "HC0"))
>       [[alternative HTML version deleted]]

____________________________________________________________
Can't remember your password? Do you need a strong and secure password?
Use Password manager! It stores your passwords & protects your account.

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to