1.3-26

* modification to `gam' so that GCV/UBRE scores reported with all fixed 
  smoothing parameters are consistent with equivalent under s.p. 
  estimation.

* gam.fit3 modified to test for convergence of coefficients as well
  as penalized deviance, otherwise in extreme cases the derivative 
  iterations can diverge.

* modifications of gam.setup, predict.gam and plot.gam to allow smooths
  to contribute an offset term to the model (offset is returned from 
  smooth.construct or Predict.matrix as an "offset" attribute of 
  model/prediction matrix). This is useful for smooths which have known 
  boundary conditions of some sort.

* PredictMat can now handle NAs in a returned prediction matrix.
 
* vis.gam can handle NA's in predictions.

* Modification of large dataset handling for "tp" and "ts" bases. If there
  are more that 3000 unique covariate combinations for a tprs then 3000 
  combinations are randomly sub-sampled, and used as the initial knots for 
  tprs basis construction. The same random number seed is used every time, 
  (R's RNG state is unaltered by this). Control of this is usually via the 
  `max.knots' (default 3000) and `seed' (default 1) elements of the `xt'
  argument of `s'. In consequence, `max.tprs.knots' has been removed from 
  `gam.control'.

* Modification of `s' and `te' to allow an extra argument `xt' which can 
  contain extra information to pass to the basis constructors for smooths.

* removal of `full.call' from smooth.spec objects - it wasn't used 
  anywhere any more, and is a pain to maintain.

* removal of `full.formula' from the `gam' object - it is no longer used 
  anywhere and requires alot of code to construct.

1.3-25

* A bug in `null.space.dimension' caused prediction to fail for `s' terms 
  of 4 or more variables, unless the `m' argument was supplied explicitly 
  (and was large enough for the number of variables). Fixed. 

1.3-24

* summary.gam modified so that it behaves correctly if fitting routines 
  detect and deal with rank deficiency in parameteric part of a model.

* spring cleaning of help files.

* gam.check modified to report more useful convergence diagnostics.

* `model.matrix.gam' added.

* "cr" basis constructor modified to use the same centering conditions 
  as other bases (sum to zero over covariates, rather than parameters 
  sum to zero). This makes centred confidence intervals for smooths, of 
  the sort used in plot.gam, behave in a similar way for all bases. With 
  the old "cr" centering constraint there could be high negative 
  correlation between coefficients of a centered smooth and the intercept: 
  this could make centred "cr" smooth CIs wider than CIs for other bases 
  (not really wrong, but disconcerting).  

1.3-23

* step size correction bug fixed in gam.fit3. `Perfect' convergence could
  cause the divergence control loop to fail: the divergence control loop
  was asking for near strict decrease in the penalized deviance, which 
  could be numerically impossible to achieve if the algorithm had actually 
  converged completely.... fixed.  

* minor doc bug fixes.


1.3-22

* Cheap but unneccesary code added to gdi.c and magic.c to stop 
  inappropriate uninitialized variable warnings from some compilers.

* Bad bug in gam.fit3 fixed. Prior weights of zero were not handled 
  correctly - prior weight vector should have been subsetted before
  gdi call, but this didn't happen. Result was infinite derivatives
  and fit failure. fixed.

* Related bug in gam.fit3: dropped observations not handled correctly 
  in deviance calculation, which can result in inappropriate step 
  halving. fixed.

* inner loop 3 in gam.fit2 and gam.fit3 modified so that step halving 
  continues until penalized deviance is at worst non-increasing. 

* stupid bug in summary.gam, p-value calc. fixed.

1.3-21

* minor bug in gam.fit() - edf array not passed to `mgcv.find.theta'
  if method "perf.magic" used - so wrong EDF used for theta estimation 
  with neagative binomial. fixed. 

* Theta estimate added to family object of fitted gam if negative binomial 
  used...

* extract.lme.cov(2) modified to allow use with single level grouping 
  factors (not really sure when this is useful)

* bug in gam4objective called when using gam.method(outer="nlm") - never 
  used GCV.

* fixed bug in `newton' whereby immediate convergence actually caused
  routine to fail.

* modified `smoothCon' and `predictMat' so that `qrc' attribute always
  created if constraint absorption used, even if there are no constraints.
  This attribute can then be used to test that there are no unabsorbed 
  constraints (e.g. in `gam.outer').

1.3-20

* Bad bug in `newton' - step halving set up so that step *never* 
  accepted (it still beat all previous methods in simulations)

* Minor bug in `newton' step limiting of Newton steps reduced step
  to max component 1, rather than `maxNstep'. 

* Some documentation fixes

1.3-19

* numerous changes to NAMESPACE and gamm related functions to pass
  codetools checks.

* gam.method()  modified to allow GACV as an option for outer GCV 
  model selection.

* Improved outer iteration added via gdi.c coupled with gam.fit3. 
  Exact first and second derivatives of GACV/GCV/UBRE/AIC are now 
  available via new iteration methods. These improve the 
  speed and reliability of fitting in the generalized case. 

* magic.c::mgcv_mmult modified so that all inner loop calculations are 
  optimal (i.e. inner loop pointers increments are all 1).

* `smooth.construct' functions for "cc" and "cr" smooths now increase `k'
  to the minimum possible value (and warn), if it's too low. 

* `gam' modified to allow passing of `mustart' etc to gam.fit and 
  gam.fit2, properly

* `gam' modified to fix a bug whereby fitting in two steps using argument 
  `G' could fail when some sp's are to be estimated and some fixed.

* an argument `in.out' added to `gam' to allow user initialization of 
  smoothing parameters when using `outer' iteration in the generalized 
  case. This can speed up analyses that rely on several refits of the same 
  model. 

1.3-18

* gamm modifed so that weights dealt with properly if lme type varFunc 
  used. This is only possible in the non-generalized case, as gamm.Rd 
  now clarifies.

* slight modification to s() to add `width.cutoff=500' to `deparse'

* by variables not handled properly in p-spline example in 
  smooth.construct.Rd - fixed.

* bug fix in summary.gam.Rd example (pmax -> pmin)

* color example added to plot.gam.Rd

* bug fix in `smooth.construct.tensor.smooth.spec' - class "cyclic.smooth"
  marginals no longer re-parameterized.

* `te' documentation modified to mention that marginal reparameterization 
  can destabilize tensor products. 

1.3-17

* print.summary.gam prints estimated ranks more prettily (thanks Martin 
  Maechler)

* `fix.family.link' can now handle the `cauchit' link, and also appends a
   third derivative of link function to the family (not yet used).

* `fix.family.var' now adds a second derivative of the link function to 
   the family (not yet used).

* `magic' modified to (i) accept an argument `rss.extra' which is added to 
  the  RSS(squared norm) term in the GCV/UBRE or scale calculation; (ii)
  accept argument `n.score' (defaults to number of data), the number to 
  use in place of the number of data in the GCV/UBRE calculation.
  These are useful for dealing with very large data sets using 
  pseudo-model approaches.

* `trans' and `shift' arguments added to `plot.gam': allows, e.g. single
   smooth models to be easily plotted on uncentred response scale.

* Some .Rd bug fixes. 

* Addition of choose.k.Rd helpfile, including example code for diagnosing 
  overly restrictive choice of smoothing basis dimension `k'.

1.3-16

* bug fix in predict.gam documentation + example of how to predict from a 
  `gam' outside `R'.

1.3-15

* chol(A,pivot=TRUE) now (R 2.3.0) generates a warning if `A' is not +ve 
  definite. `mroot' modified to supress this (since it only calls 
  `chol(A,pivot=TRUE)' because `A' is usually +ve semi-definite). 

1.3-14

* mat.c:mgcv_symeig modified to allow selection of the LAPACK routine
  actually used: dsyevd is the routine used previously, and seems very 
  reliable. dsyevr is the faster, smaller more modern version, which it
  seems possible to break... rest of code still calls dsyevd.

* Symbol registration added (thanks largely to Brian Ripley). Version 
  depends on R >= 2.3.0

1.3-13

* some doc changes

* The p-values for smooth terms had too low power sometimes. Modified 
  testing  procedure so that testing rank is at most 
  ceiling(2*edf.for.term). This gives quite close to uniform p-value 
  distributions when the null is true, in simulations, without excessive 
  inflation of the p-values, relative to parametetric equivalents when 
  it is not. Still not really satisfactory.

1.3-12

* vis.gam could fail if the original model formula contained functions of 
  covariates, since vis.gam calls predict.gam with a newdata argument 
  based on the *model frame* of the model object. predict.gam now 
  recognises that this has happened and doesn't fail if newdata is a model 
  frame which contains, e.g. log(x) rather than x itself. offset handling 
  simplified as a result.

* prediction from te smooths could fail because of a bug in handling the 
  list of re-parameterization matrices for 1-D terms in 
  Predict.matrix.tensor.smooth. Fixed. (tensor product docs also updated)

* gamm did not handle s(...,fx=TRUE) terms properly, due to several 
  failures to count s(...,fx=FALSE) terms properly if there were fixed 
  terms present. Now fixed.

* In the gaussian additive mixed model case `gamm' now allows "ML" or 
  "REML" to be selected (and is slightly more self consistent in 
  handling the results of the two alternatives).

1.3-11

* added package doc file

* added French error message support (thanks to Philippe Grosjean), and 
error message quotation characters (thanks to Brian Ripley.)

1.3-10

* a `constant' attribute has been added to the object returned by
  predict.gam(...,type="terms"), although what is returned is still not an 
  exact match to what `predict.lm' would do. 

* na.action handling made closer to glm/lm functions. In particular,
  default for predict.gam is now to pad predictions with NA's as opposed
  to dropping rows of newdata containing NA's. 

* interpret.gam had a bug caused by a glitch in the terms.object 
  documentation (R <=2.2.0). Formulae such as y ~ a + b:a + s(x) could 
  cause failure. This was because attr(tf,"specials") is documented as 
  returning indices of specials in `terms'. It doesn't, it indexes 
  specials in the variables dimension of the attr(tf,"factors") table: 
  latter now used to translate.

* `by' variable use could fail unreasonably if a `by' variable was not of 
  mode `numeric': now coerced to numeric at appropriate times in smooth
  constructors. 

1.3-9

* constants multiplying TPRS basis functions were `unconventional' for d 
  odd in function eta() in tprs.c. The constants are immaterial if you are 
  using gam, gamm etc, but matter if you are trying to get out the 
  explicit representation of a TPRS term yourself (e.g. to differentiate 
  a smooth exactly).

1.3-8

* get.var() now checks that result is numeric or factor (avoids 
  occasional problems with variable names that are functions - e.g `t')

* fix.family.var and fix.family.link now pass through unaltered any family 
  already containing the extra derivative functions. Usually, to make a 
  family work with gam.fit2 it is only necessary to add a dvar function.

* defaults modified so that when using outer iteration, several performance
  iteration steps are now used for initialization of smoothing parameters 
  etc. The number is controlled by gam.control(outerPIsteps). This tends
  to lead to better starting values, especially with binary data. gam, 
  gam.fit and gam.control are modified.

* initial.sp modified to allow a more expensive intialization method, but
  this is not currently used by gam.

* minor documentation changes (e.g. removal of full stops from titles)

1.3-7

* change to `pcls' example to account for model matrix rescaling changing 
smoothing parameter sizes.

* `gamm' `control' argument set to use "L-BFGS-B" method if `lme' is using 
`optim' (only does this if `nlminb' not present). Consequently `mgcv' now 
depends on nlme_3.1-64 or above.

* improvement of the algorithm in `initial.sp'. Previously it was possible 
for very low rank smoothers (e.g. k=3) to cause the initialization to 
fail, because of poor handling of unpenalized parameters. 

1.3-6

* pdIdnot class changed so that parameters are variances not standard 
deviations - this makes for greater consistency with pdTens class, and 
means that limits on notLog2 parameterization should mean the same thing 
for both classes. 

* niterEM set to 0 in lme calls. This is because EM steps in lme are not
 set up to deal properly with user defined pdMat classes (latter 
 confirmed by DB).

1.3-5

* Improvements to anova and summary functions by Henric Nilsson 
  incorporated. Functions are now closer to glm equivalents, and 
  printing is more informative. See ?anova.gam and ?summary.gam.

* nlme 3.1-62 changed the optimizer underlying lme, so that indefintie 
  likelihoods cause problems. See ?logExp2 for the workaround.
  - niterEM now reset to 25, since parameterization prevents parameters 
  wandering to +/- infinity (this is important as starting values for 
  Newton steps are now more critical, since reparameterization 
  introduces new local minima).

* smoothCon modified to rescale penalty coefficient matrices to have 
  similar `size' to X'X for each term. This is to try and ensure that 
  gamm is reasonably scale invariant in its behaviour, given the 
  logExp2 re-parameterization.

* magic dropped dimensions of an array inapproporiately - fixed.

* gam now checks that model does not have more coefficients than data.

1.3-4

* inst/CITATION file added. Some .Rd fixes

30/6/2005 1.3-3

* te() smooths were not always estimated correctly by gamm(): invariance 
  lost and different results to equivalent s() smooths. The problem seems
  to lie in a sensitivity of lme() estimation to the absolute size of the 
  `S' attribute matrices of a pdTens class pdMat object: the problem did 
  not occur at the last revision of the pdTens class, and there are no 
  changes logged for nlme that could have caused it, so I guess it's down
  to a change in something that lme calls in the base distribution. 
  To avoid the problem, smooth.construct.tensor.smooth.spec has been 
  modified to scale all marginal penalty matrices so that they have 
  largest singular value 1.

* Changes to GLMs in R 2.1.1 mean that if the response is an array, gam 
  could fail, due to failure of terms like w * X when w is and array 
  rather than a vector. Code modified accordingly.

* Outer iteration now suppresses some warnings, until the final fitted
  model is obtained, in order to avoid printing warnings that actually
  don't apply to the final fit.

* Version number reporting made (hopefully) more robust.

* pdconstruct.pdTens removed absolute lower limit on coef - replaced with
  relative lower limit.

* moved tensor product constraint construction to BEFORE by variable
  stuff in smooth.construct.tensor.smooth.spec.


