Hi ,
I am working on the Panel data regression in R with the help of plm package.
I am unable to interpret the results and understand the model output.
I used below R code
attach(UserData)
Pdata <- plm.data(UserData, index=c("UserId", "TimeID"))
Y <- cbind(Answers)
X <- cbind(NoofDaysInWeek,Reputation,ReputationForAccept,BronzeCount,GoldCount,SilverCount,CommentCount,CommentScore)
fixed <- plm(Y~X ,data=Pdata,model=c("within"),effect = "individual")
random <- plm(Y~X ,data=Pdata,model=c("random"),effect = "individual")
plmtest(fixed)
plmtest(random)
#Hausman Test
phtest(random,fixed)
#Breusch-Pagan test
plmtest(random,effect = "individual",type = "bp")
library(stargazer)
stargazer(random, fixed,
se=list(clse(random),clse(fixed)),
title="Panel regressions, clustered SEs", type="text",
column.labels=c("Pooled OLS", "State FE", "St-Yr FE"),
df=FALSE, digits=4)
Can anyone please help me in completing the task.
Regards,
Mithra