*********************************************************************************************************************************
*********************************************************************************************************************************
*     						ACREG: Program for computing corrected standard errors for Arbitrary Clustering		   				*
*		   		 					 Copyright: F. Colella, R. Lalive, S.O. Sakalli, M. Thoenig								    *
*																																*
*									Beta Version, please do not circulate - This Version: October 2020							*
*																																*
* 									When using this program, please refer to our companion paper								*
*																																*
*  "Inference with Arbitrary Clustering", F. Colella, R. Lalive, S.O. Sakalli, M. Thoenig, 2019, mimeo University of Lausanne	*
*																																*
*********************************************************************************************************************************
*********************************************************************************************************************************

*******************************************************************************************
capt program drop acregpackcheck
program acregpackcheck, rclass
	syntax ,
	foreach package in ivreg2 ranktest hdfe {
		capture which `package'
		if _rc!=111 di in ye "`package' already installed"
		if _rc==111 ssc install `package' , replace
		}
	di " "
	di in gr "all packages were succesfully installed"
end