⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lvr2plot_7.ado

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 ADO
字号:
*! version 3.0.7  05sep2001
program define lvr2plot_7 /* leverage vs. residual squared */
	version 6
	_isfit cons anovaok
	syntax [, XLIne(string) YLIne(string) *]

	if "`e(vcetype)'"=="Robust" { 
		di in red "leverage plot not available after robust estimation"
		exit 198
	}

	tempvar h r 
	quietly { 
		_predict `h' if e(sample), hat
		_predict `r' if e(sample), resid
		replace `r'=`r'*`r'
		sum `r', mean
		replace `r'=`r'/(r(mean)*r(N))
		local x=1/r(N)
		local y=(e(df_m)+1)*`x'
	}
	if "`xline'"!="" {
		if "`xline'"!="." { local xline "xline(`xline')" }
		else local xline
	}
	else	local xline "xline(`x')"
	if "`yline'"!="" {
		if "`yline'"!="." { local yline "yline(`yline')" }
		else local yline
	}
	else	local yline "yline(`y')"

	label var `h' "Leverage"
	label var `r' "Normalized residual squared"
	gr7 `h' `r', `options' `xline' `yline'
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -