I'm conducting a two-stage study. In the first stage, I use a probit function, and, in the second stage, I want to use the residuals of this probit into two other functions (cox analysis and panel regressions, but not relevant for my question here).
In the first stage of the study, I use a probit function in a dataset that was matched using coarsened exact matching (CEM). Because this matching process came before my study, I wanted to include the CEM weights from the matching in my analysis, as illustrated by the Stata code below:
probit dep.var1 ind.var1 ind.var2 [pweight=cemweights], robust
predict newvar, deviance
But when I'm running this illustrative code, I get the message 'not possible with pweights'.
My question is how can I calculate the residuals (or deviance residuals) of a probit function with weights in Stata?
Thank you!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…