gprobit_8.ado
来自「是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到」· ADO 代码 · 共 41 行
ADO
41 行
*! version 3.3.7 20dec2004
program define gprobit_8, eclass byable(recall)
version 6.0, missing
local options `"Level(cilevel)"'
if `"`*'"'==`""' | substr(`"`1'"',1,1)==`","' {
if `"`e(cmd)'"'!=`"gprobit"' { error 301 }
if _by() { error 190 }
syntax [, `options']
parse
}
else {
syntax varlist(min=2) [if] [in] [, `options']
marksample touse
tokenize `varlist'
local lhs1 "`1'"
local lhs "`1' `2'"
tempvar S P PROBIT
quietly {
gen long `S'=`1' if `1'>=0
gen long `P'=`2' if `2'>=0 & `1'<=`2'
gen double `PROBIT'=invnorm(`S'/`P') if `touse'
mac shift 2
reg `PROBIT' `*' /*
*/ [aw=(exp(-`PROBIT'^2)/(2*_pi))*(`P'/((`S'/`P')*((`P'-`S')/`P')))] /*
*/ if `touse', depname(`lhs1')
}
est local cmd
est local wexp
est local wtype
est local ll
est local ll_0
est local depvar "`lhs'"
est local predict "gprobi_p"
est local cmd "gprobit"
global S_E_cmd "gprobit" /* double save */
}
noisily di _n in gr /*
*/ `"Weighted least-squares probit estimates for grouped data"'
regress, level(`level')
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?