2009-05-07
	* Version 0.1-6 Updated CITATION and DESCRIPTION per Hornik 
2008-09-27
	* Version 0.1-2 Small bug fix for tests of a single covariate.
2008-08-16
	* Version 0.1-1.  Added include.means argument to xBalance. If TRUE, you get means of Tx and control groups, pre and post.  Defaults to FALSE.  Necessitated changes to print method.  Added just a few tests -- far from comprehensive.
2008-07-28
	* Version 0.0-21.  Added xtable method for newbal objects; modified handling of chisquare='only' in xBalance and in print.newbal.  The xtable method is a work-in-progress, since it's not clear how best to convey chisquare info, when present, to latex table.  (One idea is to define a new function that calls both xtable and print.xtable with appropriate arguments.)
2008-04-03
	(Haven't logged last few changes here; look to svn repos log)
	* Lost track of any reason to have newBalance around as well as xBalance, so got rid of it (as of rev #106). To restore, restore R/newBalance.R, man/newBalance.Rd, NAMESPACE (or just uncomment coresp line in NAMESPACE).
	* the tests directory is now "live", in the sense that I've added a .Rout.save file so that R CMD check has something to compare its output to.  On my Mac the tests are passed, with things evaluating in a sensible fashion.
	* Added xBalanceTests.new, containing test specifications for proposed new xBalance functionality (handling user-supplied stratum weights).  Once this new functionality is introduced the first step will be to test that when stratum.weights is not specified one gets the same results as before the change.  To to this, we'll run R CMD  check with current test and save files, and once that passes replace xBalanceTests.R with xBalanceTests.new.
2007-07-02
	Changes to xBalance: added an na.rm=FALSE option.  (Not yet tested.  
	Imputes grand mode of a logical v-ble, level 'NA' for a factor v-ble, 
	and grand mean of a numeric v-ble. )
	Also changed handing of NAs in stratifying v-ble, so that only the 
	post measures reflect removal of these cases.  In part, purpose of 
	this is to mirror change in optmatch (v 0.3-0 plus), where unmatched 
	units are now indicated with NAs in the match v-ble. To do this I 
	introduced a new function naImpute
	
2007-04-22
	Made small change to plot.newbal in order to handle xBalance
	differences which were NaN or NA.
2007-02-14
	This version of RItools now works independently of the Matrix package.
	Unfortunately, the shared library is still called Matrix.so, and the
	man pages for the three functions that we use are called by their old
	names, as well.
2007-01-09
	Fixed small errors that were halting R CMD check in the
	inst/CITATION file and in plot.newbal (needed to refer to "x"
	rather than "obj" in order to be consistent with the generic
	plot() syntax).
2006-12-29
	Beginning to integrate some functions from Doug Bate's Matrix
	package into our function. We only need a couple of his functions,
	and all of the added functionality that he is adding to new
	versions of Matrix ends up breaking our code. We will be using
	Matrix 0.9-1 for this purpose.
2006-09-19
	The last fix now doesn't work! So, I made another work around. I
	am not repackaging right now in the hope that the problem is only
	on my machines.
2006-09-18
	New versions of Matrix (like 0.995-18) cause errors in: msmn <-
	crossprod(tL, crossprod(tR, mm1)). Somehow the inner call
	to crossprod() is not being evaluated correctly. I fixed
	this using force() to "force" evaluation of the
	inner crossprod. This seemed more efficient than
	making a separate object for the inner crossprod
	call.

2006-08-04
	Minor debugging to rdz() in order to get it to do something I need
	it to do.
2006-07-06
	Small changes to xBalance() to properly accommodate groups
	argument that isn't a part of the data frame (instead resides in
	enclosing environment).
2006-06-27
	In xBalance(), added a stop if LHS of fmla (treatment var)
	isn't a logical or a numeric.  Also, replaced various calls to
	terms(fmla) with a single one at the top.  Hopefully this will
	permit people to use "." in fmla specifications.  Started a file
	with tests of the functions. Added a simple example to man page
	for xBalance.
2006-06-08
	Added fdapdufa.rda (dataset of FDA drug approvals), made the vignette draft more drafty trying to get xBalance() and rdz() and mantelhaen.test() to all estimate the AE.

2006-06-07
	Added plot.newbal; Also added a draft of a vignette, RItools.Rnw, which kind of walks through the analysis of the FDA withdrawal data.

2006-06-03
	Small change: "strat.fmla" argument to xBalance() is now "groups", for
	parallelism with nlme package
2006-05-31
	Changed line data<-na.omit(data[,all.vars(fmla)]) to deal with fact that sometimes our stratifying variable is a part of the data frame and sometimes it is not.
	
2006-05-26
	Added a line that did listwise deletion on the data frame since
	svd was having problems. Also, made two other changes that have no
	effect now that we are doing listwise deletion on the main
	data frame: Changed "na.pass" to "na.omit" in
	the creation of the model matrix --- svd() was
	choking on it in the global chisquare test section. Also changed
	apply(mm1,,var) to apply(mm1,,var,na.rm=TRUE) because var also
	doesn't like missing values.

2006-05-25
	Decided against the previous change (of 2006-05-23). Added comments to a bunch of the lines. Verified that ans$pre.difference is in fact the standardized difference in group means in the case with a binary treatment.

2006-05-23
	Made change to remove levels of factors with a single unit vs. all other units type of contrast (i.e. one 1 and rest 0s) from the model matrix mm1.

2006-05-15
	Small change to xBalance to deal with situation with no missing
	data on the stratifying variable.

2006-04-15 
	Chuck of xBalance() involving "whichfact" This code attempts to
	avoid having factors get split up into funny contrasts that are
	difficult to interpret.  It seems to work well for that purpose,
	but I (BH) don't fully understand it, and I find that it chokes up
	if I use a formula that's got only expressions enclosed in I()
	statements on RHS.  So I enclosed it in an if statment that fixed
	the problem in my specific case.  I think this is a general
	solution, but not sure.

2006-04-10
	Fixes to NA handling in xBalance.

	Another change to xBalance, specifically command by which it
	creates internal data matrix mm1.  I found that update.formula
	(when used to generate formulas appearing in call to xBalance())
	creates formulas with a trailing "+"; other R commands aren't
	phased by this, but it was breaking xBalance.  So I've gone over
	to using an update.formula call inside of xBalance, even though I
	have a vague feeling we decided against it for some reason
	earlier.  

	Bumping version # to 0.0-5
	
2006-04-05
	Am freezing work on newBalance() to extend functionality w/in a
	function to be called "xBalance".  First changes for xBalance:
	1. Add functionality to exclude strata w/ no variation in Z
	(rather than quit and complain).  Also, tried to change NA
	handling to pass along NA's elsewhere than in Z.  (Strata w/ NA's
	in Z to be excluded.)  Waiting to test this this evening... 
	2. Generalized to accept Z's that aren't 0/1 valued.  Idea is to use
	the following function as basis for balance check:
           (\sum_s \sum_i (z_{si} - \bar{z}_s)^2 )^{-1} * (Z^tx - E(Z^tx)).
	In the 0/1 Z case, can be shown that this reduces to a weighted 
	average of differences of within-stratum means, where weights are
	proportional to n_{st}(1-n_{st}/n_s) (Kalton's (1967) weights)

2006-04-04
	Fixed bug (in newBalance()) affecting tests of balance on a 
	single variable 
2005-06-08
	Added option "chisquare.test" to newBalance(), and modified
	print.newbal to accomodate this option.
2005-06-11
	Small change to print.newbal
2005-07-11 
	Fixed error in newBalance whereby s_p's were calculated
	incorrectly.  Also, tweaked handling of digits argument to print.newbal
2005-10-18
	introduced some as(...,'matrix') specifications to newBalance to
	make it work with current versions of Matrix package.
	also, put row names into print.newbal
