Margins command error: predict() method not available for random-effects survival models
0 reputation · 10 May 2024, 11:25 UTC
Goal
I want to compute marginal effects after estimating a random‑effects survival model with streg. The margins command fails, returning the error predict() method not available.
Constraints & Uncertainty
This behavior appears to be a limitation of margins for models that lack a built‑in predict() routine. The goal is to obtain reliable marginal effects for random‑effects survival models in Stata 17, without writing custom predict() code. The constraints include using only the standard distribution of Stata, and the uncertainty revolves around whether this limitation is documented, if a workaround exists, or whether newer releases have addressed the issue.
Questions
- Is the error
predict() method not availablea documented limitation ofmarginsfor random‑effects survival models? - Is there a recommended workaround to obtain marginal effects for such models?
- Has Stata updated the
marginscommand to support random‑effects survival models in newer releases?