'How to obtain the marginal effect for a panel data logistic regression in R
I have a panel data logistic regression model and I would like to produce the marginal effects for those estimates.
the model is estimated using pglm() from pglm package as below.
library(pglm)
Model2 <- pglm(AidDep~Infl + I_GDP + I_S_GDP + FDI_GDP + GDP_G,
na.action=na.omit, data = P_DF,
family = binomial(link = "logit"), model = "random")
If it were a glm model I could have just used
library(margins)
margins(Model2)
however in the case of pglm the function produces error
Error in x$terms %||% attr(x, "terms") %||% stop("no terms component nor attribute") :
no terms component nor attribute
Is there any existing package that I can use to perform such task?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
