insongkim / PanelMatch

113 stars 34 forks source link

glm.fit: fitted probabilities numerically 0 or 1 occurred #85

Open hhliuzoe opened 2 years ago

hhliuzoe commented 2 years ago

Thank you for your usefull package! My question is about a warning message, my depent variables(amountq) include a large number of 0, when I run "PM.results.listwise <- PanelMatch(lag = 4, time.id = "t", unit.id = "subind1", treatment = "tq", refinement.method = "mahalanobis", data = ma1, match.missing = FALSE, listwise.delete = TRUE, covs.formula = ~ ln_currency + ln_fasset + roa +roe +nprofit_s + ln_inasset +alr + salex_s + tima, size.match = 5, qoi = "att", outcome.var = "amountq", lead = 0:4, forbid.treatment.reversal = FALSE, use.diagonal.variance.matrix = TRUE)" R returns a warning message "glm.fit: fitted probabilities numerically 0 or 1 occurred ". How can I fix this problem? Do I need to transfer my depent variables such as using log()? Kind regards