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

📄 nl_p_7.ado

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 ADO
字号:
*! version 1.1.2  09nov2004
program define nl_p_7
	version 6, missing
	/* Note that this predictor does not call back into predict */

	if "`e(cmd)'"!="nl" {
		/* we do this to ensure that clearing macros e`(params)'
		   will do no damage */
		error 301 
	}
	capture noisily Predict `0'
	mac drop `e(params)'
	exit _rc
end

program define Predict
	syntax newvarname [if] [in] [, Yhat Residuals ]

	if "`yhat'"!="" & "`residua'"!="" { 
		di in red "may not specify both yhat and residual options"
		exit 198
	}

	if "`yhat'"=="" & "`residua'"=="" {
		di in gr "(option yhat assumed; fitted values)"
	}

	tempvar touse new 
	mark `touse' `if' `in'

	quietly {
		local k 1
		while `k' <= e(k) { 
			local word : word `k' of `e(params)'
			global `word' = _b[`word']
			local k=`k'+1
		}
		gen double `new' = . 
		`e(version)' nl`e(function)' `new' `e(f_args)' , `e(options)'
	}

	if "`residua'"!="" {
		if e(log_t) {
			gen `typlist' `varlist' = ln((`e(depvar)'-e(lnlsq))/ /*
				*/ (`new'-e(lnlsq))) if `touse'
			local x = trim(string(e(lnlsq),"%8.0g"))
			label var `varlist' "ln((`e(depvar)'-`x')/(yhat-`x'))"
		}
		else {
			gen `typlist' `varlist' = `e(depvar)'-`new' if `touse'
			label var `varlist' "Residuals"
		}
	}
	else {
		gen `typlist' `varlist' = `new' if `touse'
		label var `varlist' "Fitted values"
	}
end

⌨️ 快捷键说明

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