Hi, I need your help in my regression model:
I have a panel data for 6 year at state level (50 states).
The dependent variable is logged (ln Y), with explanatory variables: X1 (%), X2 (level), X3 (level), X4 (level), X5 (control variable).
Most of the control variables, including the main variables of interest (X1, X2, X3, X4) seem endogenous.
In other words, many factors that affect changes in these endogenous variables are likely to be correlated with the error term in the main specification.
Is the lagged dependent variable possible with the log format? Or, I need to add lagged dependent variable as a new explanatory variable:
fe<-plm(log(Y)~lag(Y)+X1+X2+X3+X4+X5,data=pdata,model= "within")
re<-plm(log(Y)~lag(Y)+X1+X2+X3+X4+X5,data=pdata,model= "random")
Thanks,
Related Posts with Solving Endogeneity in Panel Data Analysis: (R coding)
File not found error when looping over files in a directoryDear Statalists, I am trying to import some excel files from the same directory and merge them into…
generating a new variable in survey dataHi, I need to generate a new variable from the dataset that contains the number of children in the f…
how to add up length of stays in hospital for certain hospitalizationshi all, I ve been trying to perform this task for a week now with no luck. I have a data set (each …
How to generate wealth share of the top 10% in wealth distribution using weighted data?Dear Listers, I have data which provides me with information on wealth of each household. ID is the…
Dummy variable that changes per group of observationsHello everyone, I have two dummy variables ger1 and ger2. Essentially what I need to do is to crea…
Subscribe to:
Post Comments (Atom)
0 Response to Solving Endogeneity in Panel Data Analysis: (R coding)
Post a Comment