*结果为: *-----------------------------------result.begin-------------------------------- . xpoivregress lwage (educ=$inst), controls($exog) rseed(12345) selection(plugin) Cross-fit fold 1 of 10 ... Estimating lasso for lwage using plugin Estimating lasso for educ using plugin Cross-fit fold 2 of 10 ... Estimating lasso for lwage using plugin Estimating lasso for educ using plugin Cross-fit fold 3 of 10 ... Estimating lasso for lwage using plugin Estimating lasso for educ using plugin Cross-fit fold 4 of 10 ... Estimating lasso for lwage using plugin Estimating lasso for educ using plugin Cross-fit fold 5 of 10 ... Estimating lasso for lwage using plugin Estimating lasso for educ using plugin Cross-fit fold 6 of 10 ... Estimating lasso for lwage using plugin Estimating lasso for educ using plugin Cross-fit fold 7 of 10 ... Estimating lasso for lwage using plugin Estimating lasso for educ using plugin Cross-fit fold 8 of 10 ... Estimating lasso for lwage using plugin Estimating lasso for educ using plugin Cross-fit fold 9 of 10 ... Estimating lasso for lwage using plugin Estimating lasso for educ using plugin Cross-fit fold 10 of 10 ... Estimating lasso for lwage using plugin Estimating lasso for educ using plugin Cross-fit fold 1 of 10 ... Estimating lasso for pred(educ) using plugin Cross-fit fold 2 of 10 ... Estimating lasso for pred(educ) using plugin Cross-fit fold 3 of 10 ... Estimating lasso for pred(educ) using plugin Cross-fit fold 4 of 10 ... Estimating lasso for pred(educ) using plugin Cross-fit fold 5 of 10 ... Estimating lasso for pred(educ) using plugin Cross-fit fold 6 of 10 ... Estimating lasso for pred(educ) using plugin Cross-fit fold 7 of 10 ... Estimating lasso for pred(educ) using plugin Cross-fit fold 8 of 10 ... Estimating lasso for pred(educ) using plugin Cross-fit fold 9 of 10 ... Estimating lasso for pred(educ) using plugin Cross-fit fold 10 of 10 ... Estimating lasso for pred(educ) using plugin
Cross-fit partialing-out Number of obs = 428 IV linear model Number of controls = 27 Number of instruments = 9 Number of selected controls = 4 Number of selected instruments = 3 Number of folds in cross-fit = 10 Number of resamples = 1 Wald chi2(1) = 10.84 Prob > chi2 = 0.0010 ------------------------------------------------------------------------------ | Robust lwage | Coefficient std. err. z P>|z| [95% conf. interval] -------------+---------------------------------------------------------------- educ | .0727853 .0221045 3.29 0.001 .0294612 .1161094 ------------------------------------------------------------------------------ Endogenous: educ Note: Chi-squared test is a Wald test of the coefficients of the variables of interest jointly equal to zero. Lassos select controls for model estimation. Type lassoinfo to see number of selected variables in each lasso. . end of do-file .
xpoivregress lwage (educ=$inst), controls($exog) selection(cv) rseed(12345) *结果为: *-----------------------------------result.begin-------------------------------- xpoivregress lwage (educ=$inst), controls($exog) selection(cv) rseed(12345) Cross-fit partialing-out Number of obs = 428 IV linear model Number of controls = 27 Number of instruments = 9 Number of selected controls = 20 Number of selected instruments = 7 Number of folds in cross-fit = 10 Number of resamples = 1 Wald chi2(1) = 7.68 Prob > chi2 = 0.0056 ------------------------------------------------------------------------------ | Robust lwage | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- educ | .0645424 .0232832 2.77 0.006 .0189082 .1101765 ------------------------------------------------------------------------------ Endogenous: educ Note: Chi-squared test is a Wald test of the coefficients of the variables of interest jointly equal to zero. Lassos select controls for model estimation. Type lassoinfo to see number of selected variables in each lasso. . end of do-file . *-----------------------------------result.over--------------------------------
use morz.dta edit desc *被解释变量 label var lwage 已婚妇女工资的对数值 *解释变量 label var educ 受教育年数 label var exper 工作年限 label var expersq 工作年限平方 *工具变量 label var fatheduc 已婚妇女的父亲的受教育年数 label var motheduc 已婚妇女的母亲的受教育年限