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

📄 ivtobit.dlg

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 DLG
字号:
/*
  ivtobit

*!  VERSION 1.0.4  30mar2005

  keyword:  eclass

*/

VERSION 9.0

INCLUDE _std_large
DEFINE _dlght 375
INCLUDE header

HELP hlp1, view("help ivtobit")
RESET res1

DIALOG main, tabtitle("Model") ///
	label("ivtobit - Tobit estimation with endogenous regressors")
BEGIN
  INCLUDE _dviv
  TEXT     tx_vars2	_lft	_ls	_iwd	.,	///
	label("Endogenous variables:")
  VARLIST  vl_vars2	@	_ss	@	.,	///
	label("Endogenous variables")			///
	allowcat allowts

  TEXT     tx_ivars	@	_ls	@	.,	///
	label("Instrument variables:")
  VARLIST  vl_ivars	@	_ss	@	.,	///
	label("Instrument variables")			///
	allowcat allowts

  GROUPBOX gb_censor	_lft	+35	_iwd	_ht8h,	///
	label("Specify at least one censoring limit")
  RADIO    rb_noll	_indent	_ss	_cwd2	.,	///
	first						///
	label("No left-censoring limit")		///
	onclickon(main.en_ll.disable)
  DEFINE y @y
  RADIO    rb_ll	@	_ss	@	.,	///
	label("Left-censoring at minimum")		///
	onclickon(main.en_ll.disable) option(ll)	///
	default(1)
  RADIO    rb_llarg	@	_ss	@	.,	///
	last label("Left-censoring limit: (optional)")	///
	onclickon(main.en_ll.enable)
  EDIT     en_ll	_indent2 _ss	_en14wd	.,	///
	label("Left-censoring limit")			///
	numonly	  option("ll")

  RADIO    rb_noul	_lft2	y	_cwd2	.,	///
	first						///
	onclickon(main.en_ul.disable)			///
	label("No right-censoring limit")
  RADIO    rb_ul	@	_ss	@	.,	///
	label("Right-censoring at maximum")		///
	onclickon(main.en_ul.disable)			///
	option(ul)
  RADIO    rb_ularg	@	_ss	@	.,	///
	last						///
	label("Right-censoring limit: (optional)")	///
	onclickon(main.en_ul.enable)
  EDIT     en_ul	_indent2 _ss	_en14wd	.,	///
	label("Right-censoring limit") numonly		///
	option(ul)

  CHECKBOX ck_newey	_lft	_xxls	_iwd	.,	///
	option(twostep)					///
	onclickon(script main_newey_on)			///
	onclickoff(script main_newey_off)		///
	label("Use Newey's two-step estimator instead of maximum likelihood estimator")

  TEXT     tx_constr	_lft	_ms	_iwd	.,	///
	label("Constraints: (optional)")
  COMBOBOX cb_constr	@	_ss	@	.,	///
	append						///
	dropdown					///
	contents(constraint)				///
	label("Constraints")				///
	option(constraints)
END

SCRIPT main_newey_on
BEGIN
	// THE ORDER MATTERS
	script se_switchToJknifeBstrap
	script se_setN2step_on
	script weights_setLayout_f
	script max_disable
	main.tx_constr.disable
	main.cb_constr.disable
END

SCRIPT main_newey_off
BEGIN
	// THE ORDER MATTERS
	script max_enable
	script se_setN2step_off
	script se_switchToJknifeBstrapML
	script weights_setLayout_fpi
	main.tx_constr.enable
	main.cb_constr.enable
END

INCLUDE byifin
INCLUDE weights_fpi
INCLUDE se

SCRIPT PREINIT
BEGIN
	script se_createAsJknifeBstrapML
END

DIALOG rpt, tabtitle("Reporting")
BEGIN
  DEFINE _x _lft
  DEFINE _cx _spr2b
  DEFINE _y _top
  INCLUDE _sp_level

  CHECKBOX ck_first	_lft	_ls	_iwd	.,	///
	label("Report first-stage regression") option(first)

END

PROGRAM rpt_output
BEGIN
	optionarg /hidedefault rpt.sp_level
	option rpt.ck_first
END

INCLUDE max_ml

PROGRAM command_sub
BEGIN
	varlist main.vl_vars2
	put "="
	varlist main.vl_ivars
END

PROGRAM command
BEGIN
	allowxi
	put /program by_output " "
	put "ivtobit "
	varlist main.vn_dv [main.vl_iv]
	put "("
	put /program command_sub
	put ")"
	INCLUDE _weights_pr
	INCLUDE _ifin_pr
	beginoptions
		if main.rb_noll & main.rb_noul {
			stopbox stop				///
			`"On the "Model" tab,"'			///
			`"at least one censoring limit must be specified"'
		}
		if main.rb_llarg {
			require main.en_ll
			optionarg main.en_ll
		}
		if main.rb_ularg {
			require main.en_ul
			optionarg main.en_ul
		}
		option main.rb_ll
		option main.rb_ul
		option main.ck_newey
		optionarg main.cb_constr
		put " " /program se_output
		put " " /program rpt_output
		put " " /program max_output
	endoptions
END

⌨️ 快捷键说明

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