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,