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

📄 lvr2plot.ado

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 ADO
字号:
*! version 3.2.0  29sep2004
program define lvr2plot /* leverage vs. residual squared */
	version 6
	if _caller() < 8 {
		lvr2plot_7 `0'
		exit
	}

	_isfit cons anovaok
	syntax [, * ]

	_get_gropts , graphopts(`options') getallowed(plot addplot)
	local options `"`s(graphopts)'"'
	local plot `"`s(plot)'"'
	local addplot `"`s(addplot)'"'

	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'
	}

	label var `h' "Leverage"
	local yttl : var label `h'
	label var `r' "Normalized residual squared"
	local xttl : var label `r'
	version 8: graph twoway		///
	(scatter `h' `r',		///
		ytitle(`"`yttl'"')	///
		xtitle(`"`xttl'"')	///
		yline(`y')		///
		xline(`x')		///
		`options'		///
	)				///
	|| `plot' || `addplot'		///
	// blank
end

⌨️ 快捷键说明

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