黃河泉 发表于 2018-2-28 10:15 
请 help regress 与 help regress postestimation。
reg y X1 X2(求回归,其中y是因变量,x1、x2是自变量或控制变量,stata不区分,只是分析时根据你的专业背景说明哪些是控制变量)
perdict r ,resid (预测残差)
gen logusq=ln(r^2) (取自然对数)
reg lougusq x1 x2 (见第一条) predict g,xb (预测残差)
gen h=exp(g) (次幂函数)
最近在学习STATA,看不懂什么意思,书上说的这里是 predict g,xb (预测模型预测值,也叫拟合值)是这么回事??
本文来自: 人大经济论坛 Stata专版 版,详细出处参考: https://bbs.pinggu.org/forum.php?mod=viewthread&tid=6250291&page=1&from^^uid=7499629