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

📄 ztcox_5.ado

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 ADO
字号:
*! version 5.0.1  15sep2004
program define ztcox_5
	version 5.0, missing
	di in gr "(you are running stcox from Stata version 5)"

	if "`1'"=="" | substr("`1'",1,1)=="," {
		local options "ESTImate noHR *"
		parse "`*'"
		if "`estimat'"=="" {
			if "$S_E_cmd2" != "stcox" {
				error 301 
			}
			if "`hr'"=="" { local hr "hr" }
			else local hr 
			if "$S_E_svn"=="" {
				local h "Cox regression"
			}
			else	local h "Stratified Cox regr."
			if "$S_E_t0"=="" {
				local t0 0
			}
			else	local t0 $S_E_t0
			di _n in gr "`h' -- entry time `t0'" _n
			zt_hcd_5
			di
			cox, nohead `hr' `options'
			exit
		}
	}

	zt_is_5


	local varlist "opt ex none"
	local options "CLuster(string) CMD ESTImate noHR Level(integer $S_level) Robust noSHow *"
	local if "opt"
	local in "opt"
	parse "`*'" 

	local id : char _dta[st_id]
	local t : char _dta[st_t]
	local t0 : char _dta[st_t0]
	local d : char _dta[st_d]
	local id : char _dta[st_id]
	local w  : char _dta[st_w]
	local wt : char _dta[st_wt]

	tempvar touse 
	zt_smp_5 `touse' "`if'" "`in'" "`cluster'"
	markout `touse' `varlist'

	if "`wt'"=="pweight" {
		local robust "robust"
	}

	if "`robust'"!="" & "`cluster'"=="" & "`id'"!="" {
		local cluster "`id'"
	}
	if "`cluster'"!="" {
		local cluster "cluster(`cluster')"
	}

	if "`t0'" != "" {
		local t0 "t0(`t0')"
	}

	if "`d'" != "" { 
		local d "dead(`d')"
	}

	zt_sho_5 `show'

	if "`cmd'"!="" {
		di _n in gr "-> cox `t' `varlist' `w' `if' `in', `robust' `cluster' `t0' `hr' `d' `options'"
		exit
	}
	cox `t' `varlist' `w' if `touse', `robust' `cluster' `t0' `d' `options' nocoef
	if _result(1)==0 | _result(1)>=. { 
		exit 2001
	}
	global S_E_ll = _result(2)
	global S_E_chi2 = _result(6)
	global S_E_mdf = _result(3)
	zt_hc_5 `touse'
	global S_E_cmd2 "stcox"
	stcox, `hr' level(`level')
end

⌨️ 快捷键说明

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