Changes in gnm 0.8-1
====================

New Features
------------

    o	added the `method' argument to MPinv(), to allow the method of 
	calculation to be specified.  Permitted values are "svd" to
	compute the pseudo-inverse by singular value decomposition, 
	and "chol" to use the Cholseky decomposition instead.  The latter
	is valid only for symmetric matrices, but is usually faster
    	and more accurate.

    o	added the `lsMethod' argument to gnm(), to allow specification of 
	the numerical method used for least-squares calculations in the
	core of the iterative algorithm.  Permitted options are "chol" and 
        "qr".

    o	added new function qrSolve(), which behaves like base::qr.coef but 
        in the non-full-rank case gives the minimum-length solution rather
        than an arbitrary solution determined by pivoting.

    o	added .onUnload() so that compiled code is unloaded when namespace of 
	package is unloaded using unloadNamespace().

    o	added 'coef' argument to model.matrix.gnm() so that the model matrix 
        can be evaluated at any specified value of the parameter vector. 

    o	added asGnm() generic to coerce linear model objects to gnm objects.

    o	added exitInfo() for printing numerical details of last iteration on 
	non-convergence of gnm().

    o	added new dataset, friend, to illustrate a workaround to fit a
	homogeneous RC(2) using gnm() - documented in help file for MultHomog().

Improvements
------------

    o	gnm() now takes less time per (main) iteration, due to improvements 
        made internally in the iterative algorithm.  These include 
        pre-scaling of the local design matrix, and Levenberg-Marquardt 
        adjustment of the least-squares solvers so that rank determination
        is no longer necessary.  

    o	the default convergence tolerance has been tightened (from 1e-4 to 1e-6)

    o	modified model.matrix.gnm() so it can be used when only the namespace 
        of gnm is loaded.

Bug Fixes
---------

    o	fixed bug in gnm() so that 'subset' now works with table data.

    o	fixed bug in model.matrix.gnm() so can construct model matrix from "gnm" 
	object even when original call not made in .GlobalEnv.

    o	fixed bug in the examples on help page for House2001 data.

    o	fixed bug so that 'formula' in gnm() now accepts '.' in formulae 
        even when 'eliminate = NULL'.

    o	fixed bug in getContrasts(), so that the first two columns
        of the qvframe component of each element of the result list
        are correctly named as "estimate" and "SE", as required for
        objects of class "qv".


Changes in gnm 0.8-0
=======================

New Features
------------

    o	added "model.matrix" option for 'method' argument of gnm() so that 
	model matrix can be obtained much faster. The new method is used in 
	model.matrix.gnm() and vcov.gnm().

    o	added new utility function residSVD(), to facilitate the calculation
        of good starting values for parameters in certain Mult() terms.

    o	added new dataset House2001, to illustrate the use of gnm in 
        Rasch-type scaling of legislator votes.

    o	added new utility function expandCategorical() for expanding data frame
	on the basis of a categorical variable.

    o	added formula.gnm() method - returns formula from "gnm" object excluding
	the 'eliminate'd factor where necessary.

Improvements
------------

    o	gnm() now takes less time to run due to improvements made in internal 
	functions.

    o   the fitting algorithm used by gnm() now copes better with zero-valued 
        residuals.

    o	output given by gnm() when 'trace' = TRUE or 'verbose' = TRUE is now 
	displayed as it is generated on console-based versions of R. 

    o	plot.gnm() now includes option 'which' = 5 as in plot.lm() in 
   	R >= 2.2.0. Now has separate help page.	

    o	the 'constrain' argument to gnm() now accepts the names of parameters.

    o	the 'formula' argument to gnm() now accepts '.' as described in 
	?terms.formula, ignoring eliminated factor if in 'data'.

    o	interface for se() extended - can now use to find standard errors for 
	all parameters or (a selection of) individual parameters in a gnm model.

    o	made it possible to use gnm() with alternative fitting function.

    o	".Environment" attribute now attached to "gnm" objects so that gnm package
	loaded when workspace containing "gnm" objects is loaded.	

	
Changes in Behaviour
--------------------

    o	start-up iterations now only update column of design matrix required in 
	next iteration. Therefore plug-in functions using the default start-up 
	procedure for nonlinear parameters need a localDesignFunction() with the 
	argument 'ind' specifying the column that should be returned.

    o	modified output given by gnm() when 'trace' = TRUE: now prints initial
	deviance and the deviance at the end of each iteration.

    o	modified updates of linear parameters in starting procedure: now offset 
	contribution of fully specified terms only.

    o	results of summary.gnm(), vcov.gnm() and coef.gnm() now include any 
	eliminated parameters. Print methods have been added for vcov.gnm and 
	coef.gnm objects so that any eliminated parameters are not shown.

    o	Mult() terms are no longer split into components by anova.gnm(),
  	termPredictors.gnm(), labels.gnm() or the "assign" attribute of the 
	model matrix - consistent with terms() output. 

    o	the 'eliminate' argument to gnm() must now be an expression that 
	evaluates to a factor - this reverts the extension of 0.7-2.	

    o	when using gnm() with 'constrain' = "pick", the name(s) of the chosen 
	parameter(s) will replace "pick" in the reurned model call.

    o	getContrasts() now uses first level of a factor as the reference level
	(by default).

    o	gnmControl() replaced by arguments to gnm().

    o	gnm() now uses glm.fit() for linear models (with control parameters at 
	the gnm() defaults).unless 'eliminate'is non-NULL.

    o	vcov.gnm() and summary.gnm() now return variance-covariance matrices 
	including any aliased parameters.

    o	summary.gnm() now returns standard errors with test statistics etc, 
	where estimated parameters are identified.

Bug Fixes
---------

    o	fixed bug in summary.gnm(), anova.gnm(), termPredictors.gnm() and 
	model.matrix.gnm() where search for model variables was incorrect. 

    o	fixed bug preventing estimation of weight parameters in Dref() terms and 
	changed default starting values so that these parameters no longer sum 
	to one or appear to be estimable. 

    o	corrected options for 'method' argument in gnm() help file: replaced 
	'method' = "coef" with 'method' = "coefNames".

    o	fixed bug in gnm() so that it can handle tables with missing values when
  	formatting components of fit.

    o	hatvalues.gnm() now works for objects produced from table data.

    o	residuals.gnm() now returns table not matrix when 'type' = "deviance" 
	for "gnm" objects produced from table data.

    o	hatvalues.gnm(), cooks.distance.gnm() and plot.gnm() now handle cases 
	which are fitted exactly (giving a hat value of 1).

    o	example fitting proportional odds model in backPain help file now works.

    o	fixed bug in Mult() terms so that an offset can be added to a constituent
  	multiplier without an unspecified intercept being added also.

    o	gnm() argument 'constrain' = "pick" now allows selection of more than 
	one constraint and is compatible with use of 'eliminate'.

    o	gnm() can now fit models which only have the term specified by 'eliminate'.


Changes in gnm 0.7-2
=======================

Improvements
------------

    o	Extended use of the 'eliminate' argument of gnm() to allow crossed 
	factors - this also fixes bug which occurred when interactions were 
	eliminated in the presence of lower order terms involving other factors 

Changes in Behaviour
--------------------

    o	'vcov' returned by gnm() now has no rank attribute (as before, the
	rank is returned as the separate component 'rank').

Bug Fixes
---------

    o	Changed the calculation of 'df.residual' returned by gnm() to 
	correctly take account of zero-weighted observations (as in glm()).

    o	When gnm() is called with arguments 'x' = TRUE or 'VCOV' = TRUE, the 
	returned matrices now include columns of zeros for constrained 
	parameters.

    o	Corrected evaluation of model frame in gnm() so that if data is missing, 
	variables are taken from environment(formula), as documented. Modified 
	evaluation of plug-in functions to be consistent with this, i.e. 
	objects are taken from environment(formula) if not in model frame.

    o	MPinv() now checks that the diagonal elements of an 'eliminate'd 
	submatrix are all non-zero and reports an error otherwise.



Changes in gnm 0.7-1
=======================

New Features
------------

    o	Topo() introduced for creating topological interaction factors.

    o	anova() implemented for objects of class c("gnm", "glm").


Improvements
------------

    o	Diagnostic messages given by gnm() have been improved.

    o	Step-halving introduced in main iterations of gnm() to ensure deviance 
	is reduced at every iteration.

    o	getContrasts() now (additionally) reports quasi standard errors, when
	available.

    o	Calls to gnm() plug-in functions are now evaluated in the environment 
	of the model frame and the enclosing environment of the parent frame 
	of the call to gnm(). This means that variables can be found in a 
	more standard fashion.


Changes in Behaviour
--------------------

    o	The 'data' argument of Nonlin() is defunct: Nonlin() now identifies 
	variables to be added to the model frame as those passed to unspecified
	arguments of the plug-in function or those identified by a companion 
	function to the plug-in, which is of a specified format.

    o	The (optional) 'start' object returned by a plug-in function can no 
	longer be a function, only a vector. However it may now include NA 
	values, to indicate parameters which may be treated as linear for the 
	purpose of finding starting values, given the non-NA values.


Bug Fixes
---------

    o	The 'eliminate' argument of gnm() now handles functions of variables in 
	the given formula e.g. ~ strata(A, B), ~ as.factor(A):as.factor(B), etc. 

    o	gnm() was giving an error for models with either no linear parameters, 
	or none specified by the 'start' argument, this is now fixed.

    o	Long calls to plug-in functions caused problems in parsing the model 
	formula: now fixed.

    o	gnm() now only restarts after failing if there are unspecified nonlinear
	parameters.

    o	gnm() now returns NULL if model fails.

    o	Bug fixed in calculation of starting values for gnm() that occurred when some
	parameters were constrained.
	
