ereturnlist local a : e(matrices) // 获取以矩阵形式存储的结果名称 local b : e(scalars) // 获取以标量形式存储的结果名称 local c : e(functions) // 获取以函数形式存储的结果名称 local d : e(macros) // 获取以暂元形式存储的结果名称 display "`a'" display "`b'"...
display "The mean of var1 is `mean'" 4.3 使用 ereturn 例如,regress 会返回回归系数等结果: regress y x1 x2 ereturn list // 查看返回值 matrix b = e(b) // 提取回归系数 display "The coefficient for x1 is " b[1,1] 五、Stata 中的各类函数 Stata 提供了丰富的函数库,用于数据操作、统计...
这个命令可以输出更加完整的结果,其中就有系数矩阵e(b)、协方差矩阵e(V)、残差自由度e(df_r),后面会用到。 t统计量 t统计量的通用公式为: t=(估计量-假想值) / 估计量的标准误 零假设的β值一般都是0,所以t可以直接等于估计量 / 该估计量的标准误 这里以foreign变量为例: . display _b[foreign]1767...
Explore. Visualize. Model. Make a difference. Better insight starts with Stata® Discover how New inStataNow™ Machine learning via H2O StataNow puts new features at your fingertips as soon as they are ready. With the latest update, you can use H2O machine le...
display chi2tail(n3,b)(利用LM值求p值,n3表示自由度的损失量,一般等于n1,b为LM值) 十一、异方差的纠正——WLS(weighted least square estimator) (1)基本思路: reg y x1 x2 x3 [aw=x1](将x1作为异方差的来源,对方程进行修正) 上式相当于: reg y/(x1^0.5) 1/(x1^0.5) x1/(x1^0.5) x2/(...
9、ay a colon(冒号) - display a dash (短线) / display a slash(斜线) display a close single quote(右引号) !c display character c (code ! to display an exclamation point)样式 1: Format Sample date in format - %td 07jul1948 %tdM_d,_CY July 7, 1948 %tdY/M/D 48/07/11 %tdM-...
display r(sd)/r(mean) 另一方面,e-类命令的运行结果都存储在“e()”,可以通过输入命令“ereturn list”来显示,比如, reg lnw s 上表列出了运行命令 reg 后Stata 存储的结果,包括标量(scalars)、宏(macros)、矩阵(matrices,即系数矩阵e(b)与协方差矩阵e(V)),以及函数(functions)。
图一:model是模型数,residual是参差数,ss拟合数,df自由度,图二:number of obs是样本数,F统计量,大好,p值大于0.05拒绝原假设。R-scuared就是R^2的意思,是拟合度,越高越好,下面那个调整后的R^2一般不看,root是单位根检验。图三:第一列是各个系数,第二列是拟合系数值,就是你的...
Stata 的暂元(Macro)其实就是以一个简单的单词来指代一串复杂的字符或表达式。比如,想在 Stata 中显示字母 “A B C”,可输入 .display 'A B C' A B C 其中,“display” 中的下划线表示可将 “display” 缩写为 “di”;而 'A B C' 中的双引号表示原封不动地显示双引号中的内容。
Stata 的暂元(Macro)其实就是以一个简单的单词来指代一串复杂的字符或表达式。比如,想在 Stata 中显示字母 “A B C”,可输入 .display 'A B C' A B C 其中,“display” 中的下划线表示可将 “display” 缩写为 “di”;而 'A B C' 中的双引号表示原封不动地显示双引号中的内容。