xtregar.dlg

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

DLG
159
字号
/*
  xtregar

*!  VERSION 1.0.3  01apr2005

  keyword:  eclass

*/

VERSION 8.0

INCLUDE _std_large
INCLUDE _ht330
INCLUDE header

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

DIALOG main, /*
*/ label("xtregar - Fixed- and random-effects linear models with an AR(1) disturbance")/*
*/ tabtitle("Model")
BEGIN
  /*--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+*/
  DEFINE _x _xsetbu
  DEFINE _y _top
  INCLUDE _bu_tsset
  INCLUDE _dviv_ts4set

  GROUPBOX gb_model  _lft      _ls       _iwd      _ht2,		/*
		*/ label("Model type")					/*
		*/
  RADIO    rb_re     _indent   _ss       _cwd2       .,			/*
		*/ label("Random-effects")				/*
		*/ first						/*
		*/ option("re")						/*
		*/
  RADIO    rb_fe     _lft2     @         @           .,			/*
		*/ label("Fixed-effects")				/*
		*/ last							/*
		*/ option("fe")						/*
		*/

  GROUPBOX gb_rhotype _lft     _xls      _iwd      _ht8h,		/*
		*/ label("Method to compute autocorrelation")		/*
		*/
  RADIO    rb_dw     _indent   _ss       _cwd2     .,			/*
		*/ label("Based on Durbin-Watson")			/*
		*/ clickon("script rhotypeon")				/*
		*/ first						/*
		*/ option("rhotype(dw)")				/*
		*/
  DEFINE y @y
  RADIO    rb_reg    @         _ss       @         .,			/*
		*/ label("Single lag OLS of residuals")			/*
		*/ clickon("script rhotypeon")				/*
		*/ option("rhotype(regress)")				/*
		*/
  RADIO    rb_freg   @         _ss       @         .,			/*
		*/ label("Single lead OLS of residuals")		/*
		*/ clickon("script rhotypeon")				/*
		*/ option("rhotype(freg)")				/*
		*/
  RADIO    rb_tscorr @         _ss       @         .,			/*
		*/ label("Autocorrelation of residuals")		/*
		*/ clickon("script rhotypeon")				/*
		*/ option("rhotype(tscorr)")				/*
		*/
  RADIO    rb_theil  _lft2     y         @         .,			/*
		*/ label("Adjusted autocorrelation")			/*
		*/ clickon("script rhotypeon")				/*
		*/ option("rhotype(theil)")				/*
		*/
  RADIO    rb_nagar  @         _ss       @         .,			/*
		*/ label("Adjusted Durbin-Watson")			/*
		*/ clickon("script rhotypeon")				/*
		*/ option("rhotype(nagar)")				/*
		*/
  RADIO    rb_onestep @        _ss       @         .,			/*
		*/ label("One-step")					/*
		*/ clickon("program rhofon")				/*
		*/ option("rhotype(onestep)")				/*
		*/
  RADIO    rb_rhof    @        _ss       _rbwd     .,			/*
		*/ label("")						/*
		*/ clickon("program rhofon")				/*
		*/ last							/*
		*/ option(NONE)						/*
		*/
  EDIT     en_rhof   _rbsep    @         _en7wd    .,			/*
		*/ label("User-supplied")				/*
		*/ numonly						/*
		*/ option("rhof")					/*
		*/
  TEXT     tx_rhof   _en7sep   @         _rben7r2b .,			/*
		*/ label("User-supplied")				/*
		*/

  CHECKBOX ck_twostep _lft     _xxls     _cwd2     .,			/*
		*/ label("Two-step estimate of correlation")		/*
		*/ option("twostep")					/*
		*/
END

SCRIPT rhotypeon
BEGIN
	gaction main.ck_twostep.enable
	gaction main.en_rhof.disable
END

PROGRAM rhofon
BEGIN
	call main.ck_twostep.disable
	if main.rb_rhof {
		call main.en_rhof.enable
		exit
	}
	call main.en_rhof.disable
END

INCLUDE byifin
INCLUDE weights_fa

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

  GROUPBOX gb_tests  _lft      _xls     _iwd      _ht2,			/*
  		*/ label("Additional test statistics")
  CHECKBOX ck_lbi    _ilft     _ss       _cwd2      .,			/*
		*/ label("Perform Baltagi-Wu LBI test")			/*
		*/ option("lbi")					/*
		*/
END

PROGRAM command
BEGIN
	allowxi
	INCLUDE _by_pr
	put "xtregar "
	varlist main.vn_dv [main.vl_iv]
	INCLUDE _ifin_pr
	INCLUDE _weights_pr
	beginoptions
		option radio(main rb_re rb_fe)
		option radio(main rb_dw rb_reg rb_freg rb_tscorr rb_theil /*
		*/ rb_nagar rb_onestep rb_rhof)
		option main.ck_twostep
		if main.rb_rhof {
			require main.en_rhof
			optionarg main.en_rhof
		}
		optionarg /hidedefault rpt.sp_level
		option rpt.ck_lbi
	endoptions
END

⌨️ 快捷键说明

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