frac_pv.ado

来自「是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到」· ADO 代码 · 共 16 行

ADO
16
字号
program define frac_pv, rclass /* P-value calculation */
	version 6
	* 1=normal (1=yes), 2=weight type, 3=nobs, 4=d (deviance),
	* 5=n1 (df for numerator), 6=n2 (df for denominator).
	* Returns P-value in r(P).

	args normal e nobs d n1 n2

	if (`normal' & substr("`e'",1,2)=="iw") | !`normal' {
		ret scalar P = chiprob(`n1',`d')
	}
	else {
		ret scalar P = fprob(`n1',`n2',(exp(`d'/`nobs')-1)*`n2'/`n1')
	}
end

⌨️ 快捷键说明

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