代码是
set seed 123
ddml init partial, kfolds(4)
ddml E[Y|X]: pystacked $Y $X, methods(ols lasso ridgecv rf gradboost) xvars2(c.($X)##c.($X)) xvars3(c.($X)##c.($X))
ddml E[D|X]: pystacked $D $X, methods(ols lasso ridgecv rf gradboost) xvars2(c.($X)##c.($X)) xvars3(c.($X)##c.($X))
ddml crossfit
ddml extract, show(pystacked)
ddml estimate, robust
报错是
. ddml crossfit
Cross-fitting E[y|X] equation:
Cross-fitting fold 1 something required (这里是报错)
r(100);
varlist required
= exp required
using required
by() option required
Certain commands require a varlist or another element of the
language. The message specifies the required item that was
missing from the command you gave. See the command's syntax
diagram. For example, merge requires using to be specified;
perhaps you meant to type append. Or, ranksum requires a
by() option; see help signrank.
好像是缺少一个必须项,但是我看陈强老师的代码里直接ddml crossfit没有问题,求助一下大家,感谢🙇