version 9.0
#delimit;
set more off;
  quietly log;
  local logon = r(status);
  if "`logon'" == "on" {; log close; };
log using boehmke2009jop-analyze, replace text;

/*	****************************************************************	*/
/*     	File Name:	boehmke2009jop-analyze.do				*/
/*     	Date:   	June 09, 2010						*/
/*      Author: 	Frederick J. Boehmke					*/
/*      Purpose:	This file replicates the regression results in Table 2 	*/
/*			for the dyadic analysis of policy emulation for state 	*/
/*			pain management policy from 1989-2002.			*/
/*      Input File:	boehmke2009jop.dta					*/
/*      Output File:	boehmke200jop-analyze.log 				*/
/*	Version:	Stata 9 or above.					*/
/*	****************************************************************	*/


use boehmke2009jop, clear;

		/* Unconditional models. */

  logit emul_net mblegal_01 mbautho_01 mbnonmd_01 rpcpinc_01 ideology_01 
	mblegal_02 mbautho_02 mbnonmd_02 rpcpinc_02 ideology_02 
	mblegal_diff mbautho_diff mbnonmd_diff rpcpinc_diff ideology_diff 
	nbr_lag_sum prov_tot_02 fsmbgde time_* 
	if state_01!=state_02, cluster(state_01);

  logit emul_net mblegal_01 mbautho_01 mbnonmd_01 rpcpinc_01 ideology_01 
	mblegal_02 mbautho_02 mbnonmd_02 rpcpinc_02 ideology_02 
	nbr_lag_sum prov_tot_02 fsmbgde time_* 
	if state_01!=state_02, cluster(state_01);
	
		/* Conditional models. */
	
  logit emul_net mblegal_01 mbautho_01 mbnonmd_01 rpcpinc_01 ideology_01 
	mblegal_02 mbautho_02 mbnonmd_02 rpcpinc_02 ideology_02 
	mblegal_diff mbautho_diff mbnonmd_diff rpcpinc_diff ideology_diff 
	nbr_lag_sum prov_tot_02 fsmbgde time_* 
	if state_01!=state_02 & emul_opp_net==1, cluster(state_01);

  logit emul_net mblegal_01 mbautho_01 mbnonmd_01 rpcpinc_01 ideology_01 
	mblegal_02 mbautho_02 mbnonmd_02 rpcpinc_02 ideology_02 
	nbr_lag_sum prov_tot_02 fsmbgde time_* 
	if state_01!=state_02 & emul_opp_net==1, cluster(state_01);
	
		/* Monadic EHA model. The data are dyadic, but I only 	*/
		/* use observations where state 01 is the same as 	*/
		/* state 02, so it's only included once per year. 	*/

  logit prov_any_01 mblegal_01 mbautho_01 mbnonmd_01 rpcpinc_01 ideology_01 
	nbrs_lag_any fsmbgde time_* 
	if state_01==state_02, cluster(state_01);
	
log close;
clear;
exit, STATA;