[R] Marginal effects with plm

Miluji Sb miluji@b @ending from gm@il@com
Thu Sep 6 00:30:09 CEST 2018


Dear all,

I am running the following panel regression;

plm1 <- plm(formula = log(y) ~ x1 + I(x1^2) + heat*debt_dummy + tt, data =
df, index=c("region","year"))

where 'df' is a pdata.frame. I would like to obtain marginal effects of 'y'
for the variable 'x1'. I have tried the packages 'prediction' and 'margins'
without luck.

Is it possible to obtain marginal effects with 'plm'? Any help will be
highly appreciated. Thank you.

Error in UseMethod("predict") :
  no applicable method for 'predict' applied to an object of class
"c('plm', 'panelmodel')"

Sincerely,

Milu

	[[alternative HTML version deleted]]



More information about the R-help mailing list