Rev 8563 | Rev 8572 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
** denotes quite substantial/important changes*** denotes really big changesLiable to change in future release:- method="GCV.Cp" as default in gam. Default willchange to "REML". (1.8-24, June 2018)Currently deprecated and liable to be removed:- gam.fit (1.9-0, July 2023)Issues:* openblas 0.3.x x<7 is not thread safe if itself compiled for single threaduse and then called from multiple threads (unlike the reference BLAS, say).0.2.20 appears to be OK. For 0.3.x x>6 make USE_THREAD=0 USE_LOCKING=1to make openblas ensures thread safety.* t2 in bam(...,discrete=TRUE) - not treated as tensor products atpresent, and reparameterization needs checking (also for bam).* bam(...,discrete=TRUE) has no option to use the identicaldiscretizaton to that used in fitting when predicting1.9-5* Fix to general constraint documentation for scasm, and handling of generalconstraints involving repeated values.* Fix to NCV handling for extended families when number of points to drop isnot number of data. Thanks to Nicole Augustin for reporting.* gumbls initialization stabilized a little.1.9-4*** scasm function provided for shape constrained additive smooth models, vialinear and quadratic programming, with smoothness by extended Fellner-Schall.* Censored Box-Cox Gaussian, bcg, family introduced.* plot.gam now allows plotting of derivatives of 1-D smooth terms, to givedirect analogue of GLM regression coefficients, also some re-arrangement toallow use of bootstrap samples for uncertainty bands.* predict.gam now allows a 'bs' field of simulated replicate parameter vectors,and direct computation of CIs at different levels.* New scheme 2 for default 1-D plots.* bam now returns approx REML/ML for the model itself, rather than for theworking linearized model (other smoothness criteria still reported forworking model only).* Improved scale estimation initialization for extended families in bam: canmake a noticable difference with 'tw' family in close to Poisson situation.* 4-D plotting code axis error fix (y axis labels were being recycled fromx axis labels).* Long ignored argument 'shade' removed from 'plot.gam'.* cnorm/clog single vector response fix.* cnorm and cpois improved numerical stability.* Fix of one letter typo in gam.outer call to efsud that caused offsets to beignored. Thanks to Brian Montgomery for reporting the problem.* nat.param now warns is model matrix not full rank.* sf and sw soap films given new classes to avoid clas=h with sf package- thanks Gavin Simpson.* Slight change to gammals scale link to make interpretation morestraightforward.* gumbls link change and derivative correction.* Added option to inSide to allow nmes for x and y to be provided.* gam.vcomp modified to have a print method, rather than print itself - thanksto Gavin Simpson.* long deprecated function full.score removed.1.9-3* fixes a read-one-beyond-allocated memory error (in a redundant check with noconsequences)1.9-2** 'NCV' added as a method option for bam(...,discrete=TRUE). More efficientthan gam(...,method='NCV'), but much less efficient than default REML.* added basic linear programming routine, lp, mainly to find initial valuesunder linear constraint.* default margins changed for plot.gam(...,pages=1)* 'clog' censored logistic family added for AFT models. Written by Chris Shen.* 'cpois' censored Poisson family added.* improved cov matrix estimation under NCV used with correlated errors.* names in NCV 'nei' structure modified to better match paper and documentationnotation.* estimate.theta improved for semi-definite case (e.g. infinite DoF in scat).* extended families now give a useful error if an illegal link is supplied.* pcls now returns indices of active set constraints as attribute of returnvector.* fix bam to always return a square QR R factor of the model matrix(previously it was possible for it not to be square for a rank deficientmodel matrix, which could cause a failure in summary). Thanks to Amy Hughes* Fixed bam/bam.update to pick up weights correctly, rather than failing.Thanks to Max Moldovan. Also adjusted to allow correct behaviour if modelframe has been deleted.* Added sparse matrix Cholesky routine, mchol, a wrapper forMatrix::Cholesky, giving the same functionality as Matrix::chol priorto the decision for this not to return the pivot sequence.* 'mroot' modified so that svd option uses an efficient symmetric eigen routineto compute SVD (argument is positive semi-definite after all).* fixed gam.vcomp to avoid failure with extended families and bam. Thanks toNathan LaSpina for reporting.* modification of discrete bam prediction method function to better deal withextra factor levels in prediction. Slightly differs from predict.gam, insetting effect to zero, rather than NA.* fix to NCV handling of dropped NA points - previously could end up withdifferent numbers of predict and drop neighbourhoods. Thanks to NicoleAugustin.* XWXd fix for row col interchange bug introduced with long vector support in1.9-1.* fix of gumbls initializtion code bug. Initial parameters were so bad thatfit could fail.* zoom in bfgs modified so that start values always the same to avoidoccasional step failures from repeatedly changing initial values.* gevlss improved xi initialization.* gam(...,discrete=TRUE) no longer ignores starting coefficient values (thanksto Matteo Fasiolo).* Sl.setup and ldetS changes to return totla penalty matrices directly(avoiding a redundant crossproduct)* Fix to Pearson residuals in gammals family - thanks to gavin Simpson andArthur Fendrich* ldetS slight efficiency improvement by direct matrix diagonal modificationin C code, as suggested by Matteo Fasiolo.1.9-1* Revised bam discrete code to allow indexing vectors to be long vectors,thereby allowing much larger datasets to be used. n limit is still.Machine$integer.max.* Revised C code underlying mvn family to allow larger problems, via use ofR long vectors.* Revised gfam to work correctly with bam(...,discrete=FALSE). Subsettingin bgam.fit was incorrect for gfam. Thanks to Dave Miller for reporting it.* Correction of ziplss residual computation - incorrect probability of nonzero used. Thanks to Xiao Liang.* correction of ginla integration weights (correcting typo from Rue et al.2009). Thanks to Paul Van Dam-Bates.* C code modification to remove some new compiler warnings.1.9-0*** NCV smoothing parameter estimation now available for most models. See ?NCV.*** 'gfam' allows reponse variables to be from several different families.* Restriction that number of coefficients must be fewer than number of dataremoved.* Fix to tensor product constructor to allow matrix factor arguments to behandled correctly (previously failed). Thanks to Dave Miller.* removed argument 'pers' from 'plot.gam' (deprecated since 1.8-23, Nov 2017).* removed "nlm.fd" optimizer (deprecated since 1.8-19, Sept 2017).* removed discrete method prediction from discrete bam objects fittedbefore 1.8-32 (deprecated since then).* 'multinom' variance fix for K>=3 cases. A counter was initialized in the wrongplace. Thanks to Max Goplerud for finding and reporting this.* NCV variance estimation improvements + na handling.* 'in.out' argument added for 'bam'.* slight internal change to mgcv:::get.var to enable user defined functionsin arguments of smooths to work.* smooth2random tweak to guarantee same eigenvector sign everytime for sameproblem (needed by some developers who don't want to carry the originaltransform around).* Some unregistered methods fixes.* tests directory removed, as check time was tripping up every CRAN submission.* coxph memory error fix - could make bfgs fitting fail.1.8-42* One remaining old style C declaration fixed.1.8-41** 'cnorm' family added for left, right, interval or un censored Gaussiandata. Useful for log normal Accelerated Failure Time models, Tobitregression, rounded data etc.** 'sz' factor smooth interaction class added for implementing models withmain effect smooths and difference smooths for levels of a factor.See ?factor.smooth.** 'NCV' smoothing parameter method added, but still experimental.* replacment of some old (K&R) style C function declarations.* mono.con corrected for cases with upper bounds. Thanks to Sean Wu.* plot.gam(...,seWithMean=TRUE) modified to only include mean uncertaintyfor the linear predictor of which the smooth is a part, when there aremultiple linear predictors. Thanks to Gavin Simpson.* modifications of sparce matrix coercions, to avoid deprecated directcoercions. as(as(as(a, "dMatrix"), "generalMatrix"), "XsparseMatrix") inplace of as(a,"dgXMatrix") where 'X' is 'C' or 'T'. Actually this requiresMatrix 1.4-2 to work (will be added to dependencies in future).* vis.gam now deals properly with models with more than one linear predictor.* slight change in bgam.fitd to check scale parameter estimate converged whenusing bam(...,discrete=TRUE), otherwise scale could be wrong for all fixedsmoothing parameters.* predict.gam modified so that 'terms' and 'exclude' control all terms, smoothor parametric, in the same way. Including the "(Intercept)" term.* Warnings from 'model.matrix' suppressed in 'terms2tensor' called by e.g.predict.bamd. There is a warning if any extra contrasts are supplied tomodel matrix that do not relate to a term in the model (which contradictsthe documentation). Doc vs code bug report also filed.* Fix of broken rank deficiency handling in gam.fit5. Thanks to Cesko Voeten.* trind.generator modified to allow return of index functions in placeof index arrays.* summary.gam (recov/reTest) modified to deal with 'fs' smooths fitted using'gamm'.* gam.fit4 convergence testing improved and bug fix in computation of dVkkmatrix used to check for converged 'infinite' smoothing parameters in bfgs.1.8-40* Small gam.fit5 convergence change to reduce chance of repeating stepfailures.* ExtractData fix avoiding assumption that 'xt' argument to a smooth is alwaysa list (could cause setup failure with e.g. fs smooth). Thanks Keith Woolner.* Minor changes to mat.c and tprs.c to allow DEFS = -DSTRICT_R_HEADERS build.1.8-39* gam.fit5 convergence logic tightened up, to avoid pointlessly lengthyiterations when can't meet convergence tolerance. Faster, more reliable,but also generates more warnings when tolerances not met.* gam.fit3 convergence test modified to more reliable version.* Some modification of warning handling to only print inner optimizationwarnings if they occur at final call to inner optimizer.* newton and bfgs optimizers reset inner loop tolerance to 1e-2 of outerloop tolerance if it is larger than this, to avoid inner loop being tooinaccurate for outer tolerance.* minor R 4.2.0 C compatibility change.1.8-38* uniquecombs fix to reduce memory footprint for text data.1.8-37* minor update for clang compatibility.* PredictMat fix of bug in which dimensions could be dropped for 1 row matrixas part of constraint handling (leading to disaster in predict.bamd).Thanks to Shawn Ligocki.1.8-36* 'fs' smooth construction modified to (approximately) orthogonalisesmoothing penalty penalized and unpenalized bases. This makes theassumption that the associated variance components are independentmore natural. Thanks to Matteo Fasiolo and Harald Bayaan for showinghow the original construction could be problematic.* correction to 'fs' smooth handling in gamm to allow correlation structuresto be used in the same model without cuasing an error.* AIC calculation modified for non-Gaussian families with a scale parameter,so that the model estimated scale parameter is used, rather than thedeviance estimator employed with glm exponential families. This matters foravoiding substantial bias with very low mean count data (particulalry 'tw'and 'Tweedie' families).* ziP family response scale se fix for case when b>0 (thanks to Mark Donoghoe)* prediction on response scale could fail for models fitted bybam(...,discrete=TRUE) - fixed.* bug fix to multi-model anova.gam code to deal properly with extended familyscale parameters (still not the recommended way of testing!)1.8-35* Fix to bug in Fletcher scale parameter estimate with weighted data (e.g.quasibinomial with n>1). Gaussian case not affected. Thanks to JohnMaindonald.* Italian translation updated thanks to Daniele Medri* German translation updated thanks to Detlef Steuer* French translation updated thanks to Philippe Grosjean* gumbls initialization improved.* Modification so that smooths can insist on not being reparameterized whencalled using default bam methods, by having a 'repara' element set to FALSEin the object returned by the smooth constructor.* Modification so that smooths can have the summation convention for matrixarguments turned off, by having an 'xt$sumConv' element set to FALSE in the'xt' argument of 's'.1.8-34* 'gam.mh' proposal df typo fix and help file '%*%' -> '\%*\*' fix. ThanksLen Thomas.* various random number generation calls in rd functions in families couldfail if simulating one point - fixed.* gp smooths can now be specified to be strictly stationary (see ?gp.smooth)* fix to predict.bamd bug in handling fixed effect contrasts (wrong contrastcould be used for prediction, if non-default used in fitting). Thanks toJalal Al-Tamimi.* predict.bamd modified to catch case where all prediction data is NA* predict.gam modified to allow NA to be a factor level.1.8-33* 'inline' -> 'static inline' error fix - caused installation failure on someplatforms.1.8-32** bam(...,discrete=TRUE) now uses discretization on the parametric modelcomponents as well as the smooths.* 'gumbls' family added for Gumbel location scale models.* 'shash' location scale and shape family added.* psum.chisq function added to compute c.d.f. of weighted sums of chi-squaredr.v.s using method of Davies, 1980. This is now used for computing p-valuesin summary.gam in place of the Liu et al, 2009 approximation.* score and Schoenfeld residuals added for cox.ph to facilitate PH assumptionchecking (see ?cox.ph).* added 'gam.mh' for posterior dampling from models fitted with 'gam'.* 'ocat' upgraded to not ignore weights.* added multivariate t and Gaussian densities and multivariate t generation.* fix to predict.bamd to correct handling of `terms' and `exclude' arguments.* A recent lme change broke gamm offset handling. Fixed.Thanks Aaron Benjamin Shev.* dgesvd LAPACK calls replaced by faster dgesdd, as some versions of MKLBLAS/LAPACK have broken dgesvd.* Fix to derivative w.r.t. scale parameter calculation for extended families('tw' is the only one at present) when using 'ML' smoothing parameterestimation. Could lead to step failure with 'tw'. Thanks Kevin Hawkshaw.* Fix to prediction/fake formula environment that could cause failure ofgam/bam called from a function. Thanks to Duncan Murdoch.* Fix to smoothing parameter uncertainy correction for general families.* Much cleaner design for the discretization of covariates and associateddiscretization index matching in bam (predict.bamd and discrete.mf).* Fix to jagam logic for identifying separable penalties which led towrong partioning of penalties for 'fs' smooths used with jagam. Thanks toChris Jackson for spotting the problem.* Internal Sl list handling changes.* tensor.prod.model.matrix now also works with sparse matrices of class"dgCMatrix".1.8-31* fix in initalization in gammPQL* fix of some C routines of type void in place of SEXP called by .Call.1.8-30* anova.gam now uses GLRT for multi-model comparisons in both extended andgeneral family cases.* Fix to bug in bam(...,discrete=TRUE) offset handling introduced in 1.8-29,which corrupted offset (and generated numerous warnings). Also fixes aless obvious bug introduced at the same time in predict.gam which could getthe offset wrong when predicting with such models. Thanks to BrianMontgomery and Sean Wilson.* Fix to problem in pen.reg (used to initialize location scale models inparticular), which could lead to initialization failure for lightlypenalized models. Thanks Matteo Fasiolo.* Fix to predict.bamd handling of 'terms' and 'exclude' for models fit bybam(...,discrete=TRUE).* Work around in predict.gam for a spurious model.matrix warning when acontrasts.arg relates to a variable in data not required by object.* Fix to gammals family which had 'd2link' etc defined with argument 'eta'instead of the intended 'mu'. Thanks to Jim Stagge.* 'in.out' modified to allow boundaries specified exactly as for a soap filmsmoother.* soap film smoother constructor modified to check knots are within boundaryon entry and drop those that are not, with a warning. Also halts if itdetects that basis setup is catastrophically ill-conditioned.1.8-29* gammPQL modified to use standard GLM IRLS initilization (rather thanglmmPQL method) to improve convergence of `gamm' fits.* bam(...,discrete=TRUE) now drops rownames from parametric model matrixcomponents, to save substantial memory.* All BLAS/LAPACK calls from C now explicitly pass hidden string lengtharguments to avoid breakage by recent gfortran optimizations (stackcorruption causing BLAS/LAPACK to return error code).* predict.gam bug fix - parameteric interaction terms could be dropped fortype="terms" if there were no smooths. knock on was that they were alsodropped for all bam(...,discrete=TRUE) fits. (Thanks Justin Davis.)* bam(...,discrete=TRUE) indexing bug in setup meant that models containingsmooths with matrix arguments and other smooths with factor by variablewould fail at the setup stage.* gam.fit4 initial divergence bug fix.* Gamma location-scale family 'gammals' added. See ?gammals.* row-wise Kronecker product operator %.% added for convenience.* changes to general families to allow return of first deriv of penalizedHessian component more easily.* ocat bug fix. Response scale prediction was wrong - it ignored the estimatedthresholds. Thanks to Fabian Scheipl.* bam deviance could be wrongly returned, leading to 100% explaineddeviance. Fixed.1.8-28* fix of obscure sp naming bug.* changed some contour default colours from green to blue (they overlayheatmaps, so green was not clever).* Tweedie likelihood evaluation code made slightly more robust - for a modelwith machine zero scale parameter estimate it could segfault, as seriesmaximum location could then overflow integer storage. Fixed + upper limitimposed on series length (warning if it's not enough).1.8-27** Added routine 'ginla' for fully Bayesian inference based on an integratednested Laplace approximation (INLA) approach. See ?ginla.* Tweedie location scale family added: 'twlss'.* gam.fit5 modified to distinguish more carefully between +ve semi definiteand +ve definite. Previously could fail, claiming indefiniteness when itshould not have. Affects general families.* bam was ignoring supplied scale parameter in extended family cases - fixed.* work around in list formula handling for reformulate sometimes settingresponse to a name in place of a call.* preinitialize in general families is now a function, not an expression. Seecox.ph for an example.* added routine cholup for rank one modification of Cholesky factor.* two stage gam/bam fitting now allows 'sp' to be modified.* predict.gam could fail with type="response" for families requiring theresponse to be provided in this case (e.g. cox.ph). Fixed.* sp.vcov defaults to extracting edge corrected log sp cov matrix, ifgam(...,gam.control(edge.control=TRUE)) used for fitting.* gam(...,gam.control(edge.correct=TRUE)) could go into infinite loop ifsp was effectively zero. Corrected.1.8-26* LINPACK dependency removed.* Added service routine choldrop to down date a Cholesky factor on row/coldeletion.* liu2 had a check messed up when vectorized. Fix to stop vector beingchecked for equality to zero.1.8-25** bam(...,discrete=TRUE) methods improved. Cross products now usually faster(can be much faster) and code can now make better use of optimised BLAS.* fix to 'fs' smooth.construct method and smooth2random method, to allowconstructor to be called without a "gamm" atribute set on the smooth specbut still get a sensible result from smooth2random (albeit never usingsarse matrices). Useful for other packages using constructors andsmooth2random, for 'fs' smooths.* The mrf smooth constructor contained an obsolete hack in which the termdimension was set to 2 to avoid plotting when used as a te marginal. Thismessed up side constraints for terms where a mrf smooth was a main effectand te marginal. Fixed.* extract.lme.cov/2 documentation modified to cover NA handling properly, androutines modified to not require data to be supplied.* fix of efsudr bug whereby extended families with no extra parameters toestimate could give incorrect results when using optimer="efs" in 'gam'.* negbin() corrected - it was declaring the log link to be canonical, leadingto poor convergence and slight misfit.* predict.bam(...,discrete=TRUE) now handles na.action properly, rather thanalways dropping NAs.* Fix of very obscure bug in which very poor model of small dataset couldend up with fewer `good' data than coefs, breaking an assumption of C codeand segfaulting.* fix of null deviance computation bug introduced with extended families inbam - null deviance was wrong for non-default methods.* liu2 modified to deal with random effects estimated to be exactly 0, sothat summary.gam does not fail in this case.1.8-24* Extended Fellner Schall optimizer now avaialable for all families with 'gam'using gam(...,optimizer="efs").* Change to default behaviour of plot.gam when 'seWithMean=TRUE', and ofpredict.gam when 'type="iterms"'. The extra uncertainty added to CIs orstandard errors now reflects the uncertainty in the mean in all other modelterms, not just the uncertanity in the mean of the fixed effects as before.See ?plot.gam and ?predict.gam (including for how to get the old behaviour).* 're' smooths can now accept matrix arguments: see ?linear.functional.terms.* cox.ph now allows an offset to be provided.* Fix in smoothCon for bug in case in which only a single coefficient isinvolved in a sum-to-zero constraint. Could cause failure in e.g. t2 withcc marginal.* Model terms s, te etc are now always evaluated in mgcv workspace explicitlyto avoid masking problems in obscure circumstances.* 'mrf' smooth documentation modified to make it clearer how to specify 'nb',and code modified so that it is now possible to specify the neighbourstructure using names rather than indices.* 'bfgs' fix to handle extended families.* plot.gam modified to only prompt (via devAskNewPage) for a new page afterthe first page is used up.* export 'k.check'.* Fix to 'Rrank'. Previously a matrix R with more columns than rows couldcause a segfault.* Fix to non-finite likelihood handling in gam.fit5.* Fix in bgam.fitd to step reduce under indefinite deviance and to ensurepenalty evaluation is round off negative proof.* newton slighty modified to avoid (small) chance of all sp's being droppedfor indef likelihood.1.8-23* default plot methods added for smooths of 3 and 4 variables.* The `gamma' control parameter for gam and bam can now be used with RE/MLsmoothness selection, not just GCV/AIC. Essentially smoothing parametersare chosen as if the sample size was n/gamma instead of n.* The "bs" basis now allows multiple penalties of different orders on the samespline. e.g. s(x,bs="bs",m=c(3,2,0)). See ?b.spline.* bam(...,discrete=TRUE) can now use the smooth 'id' mechanism to linksmoothing parameters, but note the method constraint that the linked basesare not forced to be identical in this case (unlike other fitting methods).* summary.gam now allows random effects tests to be skipped (in some largemodels the test is costly and uninteresting).* 'interpret.gam0' modified so that masked 's', 'te', etc from other packagesdoes not cause failure.* coxph fix of prediction bug introduced with stratified model (thanksGiampiero Marra)* bam(...,discrete=TRUE) fix to handle nested matrix arguments to smooths.* bam(...,discrete=TRUE) fix to by variable handling with fs and re smoothswhich could fail during re-representation as tensor smooths (fordiscretization purposes).* bam extended family extension had introduced a bug in null deviancecomputation for Gaussian additive case when using methods other than fREMLor GCV.Cp. Fixed.* bam(...,discrete=TRUE) now defaults to discrete=FALSE if there are nosmooths, rather than failing.* bam was reporting wrong family under some smoothing parameter selectionmethods (not default).* null deviance computation improved for extended families. Previous versionused an approximation valid for most families, and corrected the rest - nowreplaced with exact computations for all cases.* scat initialization tweaked to avoid -ve def problems at start.* paraPen handling in bam was broken - fixed.* slight adjustment to sp initialization for extended families - use observedinformation in weights if possible.1.8-22* Fix of bug whereby testing for OpenMP and nthreads>1 in bam, would fail ifOpenMP was missing.1.8-21* When functions were added to families within mgcv some very largeenvironments could end up attached to those functions, for no good reason.The problem originated from the dispatch of the generic 'fix.family.link'and then propagated via fix.family.var and fix.family.ls. This is now avoided,resulting in smaller gam objects on disk and lower R memory usage.Thanks to Niels Richard Hansen for uncovering this.* Another bug fix for prediction from discrete fit bam models with an offset,this time when there were more than 50000 data. Also fix to bam fitting whenthe number of data was an integer multiple of the chunk size + 1.* check.term was missing a 'stop' so that some unhandled nesting structuresin bam(...,discrete=TRUE) failed with an unhelpful error, instead of ahelpful one. Fixed.1.8-20* bam(,discrete=TRUE) could produce garbage with ti(x,z,k=c(6,5),mc=c(T,F))because tensor re-ordering for efficiency failed to re-order mc (this isa *very* specialist bug!). Thanks to Fabian Scheipl.* plot(...,residuals=TRUE) weighted the working residuals by the sqrt workingweights divided by the mean sqrt working weight. The standardization by themean sqrt weight was non standard and has been removed.* Fix to bad bug in bam(...,discrete=TRUE) offset handling, and predict.bamdmodified to avoid failure predicting with offset. Thanks to Paul Shearer.* fix of typo in bgam.fit, which caused failure of extended familieswhen dataset larger than chunk size. Thanks Martijn Wieling.* bam(...,discrete=TRUE)/bgam.fitd modified to use fisher weights withextended families if rho!=0.1.8-19** bam() now accepts extended families (i.e. nb, tw, ocat etc)* cox.ph now allows stratification (i.e. baseline hazard can differ betweengroups).* Example code for matched case control in ?cox.ph was just plain wrong. Nowfixed. Thanks to Patrick Farrell.* bam(...,discrete=TRUE) tolerance for judging whether smoothing parametersare on boundary was far too low, so that sps could become so large thatnumerical instability set in. Fixed. Thanks to Paul Rosenfield.* p.type!=0 removed in summary.gam (previously deprecated)* single penalty tensor product smooths removed (previously deprecated).* gam(...,optimizer="perf") deprecated.* extra divergence check added to bam gam default gam fitting (similar todiscrete method).* preinitialize and postproc components of extended families are now functions,not expressions.* coefficient divergence check was missing in bam(...,discrete=TRUE) releasecode - now fixed.* gaulss family link derivatives modified to avoid overflow. Thanks toKristen Beck for reporting the problem.* redundant 'n' argument removed from extended family 'ls' functions.* Convergence checking can step fail earlier in fast.REML.fit. If trial stepis no improvement and equal to previous best (to within a tolerance), thenterminate with step failure after a few step halvings if situation persists.Thanks to Zheyuan Li for reporting problem.1.8-18* Tweak to 'newton' to further reduce chance of false convergence atindefinite point.* Fix to bam.update to deal with NAs in response.* 'scat' family now takes a 'min.df' argument which defaults to 3. Couldotherwise occasionally have indefinite LAML problems as df headed towards 2.* Fix to `gam.fit4' where in rare circumstances the PIRLS iteration couldfinish at an indefinite point, spoiling implicit differentiation.* `gam.check' modified to fix a couple of issues with `gamm' fitted models, andto warn that interpretability is reduced for such models.* `qq.gam' default method slight modification to default generation of referencequantiles. In theory previous method could cause a problem if enoughresiduals were exactly equal.* Fix to `plot.mrf.smooth' to deal with models with by variables.* `plot.gam' fix to handling of plot limits when using 'trans' (from 1.8-16'trans' could be applied twice).* `plot.gam' argument 'rug' now defaults to 'NULL' corresponding to 'rug=TRUE'if the number of data is <= 10000 and 'rug=FALSE' otherwise.* bam(...,discrete=TRUE) could fail if NAs in the smooth terms caused data rowsto be dropped which led to parametric term factors having unused levels(which were then not being dropped). Fixed (in discrete.mf).* bam(...,discrete=TRUE,nthreads=n) now warns if n>1 and openMP is notavailable on the platform being used.* Sl.addS modified to use C code for some otherwise very slow matrixsubset and addition ops which could become rate limiting forbam(...,discrete=TRUE).* Parallel solves in Sl.iftChol can speed up bam(...,discrete=TRUE) withlarge numbers of smoothing/variance parameters.* 'gamm' now warns if called with extended families.* disasterous 'te' in place of 'ti' typo in ?smooth.terms fixed thanks toJohn McKinlay.* Some `internal' functions exported to facilitate quantile gam methodsin separate package.* Minor fix in gam.fit5 - 1 by 1 matrix coerced to scalar, to prevent failurein some circumstances.1.8-17* Export gamlss.etamu, gamlss.gH and trind.generator to facilitate useraddition of new location-scale families.* Re-ordering of initialization in gam.fit4 to avoid possible failure ofdev.resids call before initialization.* trap in fast.REML.fit for situation in which all smoothing parameterssatisfy conditions for indefinite convergence on entry, with animmediate warning that this probably indicates iteration divergence (of bam).* "bs" basis modified to allow easier control of the interval over which thespline penalty applies which in turn allows more sensible control ofextrapolation behaviour, when this is unavoidable.* Fix in uniquecombs - revised faster code (from 1.8-13) could occasionallygenerate false matches between different input combinations for integervariables or factors. Thanks to Rohan Sadler for reporting the issue thatuncovered this.* A very bad initial model for uninformative data could lead to a negativefletcher estimate of the scale parameter and optimizer failure - fixed.* "fREML" allowed in sp.vcov so that it works with bam fitted models.* 2 occurances of 'return' replaced by (correct) return().1.8-16* slightly improved intial value heuristics for overlapping penalties ingeneral family case.* 'ocat' checks that response is numeric.* plot.gam(...,scale=-1) now changes scale according to 'trans' and 'shift'.* newton optimizer made slightly more cautious: contracts step if reductionin true objective too far different from reduction predicted by quadraticapproximation underlying Newton step. Also leaves parameters unchangedin Newton step while their grad is less than 1% of max grad.* Fix to Fisher weight computation in gam.fit4. Previously a weight could(rarely) evaluate as negative machine prec instead of zero, get passed togdi2 in C code, generate a NaN when square rooted, resulting in a NaN passedto the LAPACK dgeqp3 routine, which then hung in a non-interuptable way.* Fix of 'sp' argument handling with multiple formulae. Allocation to termscould be incorrect.* Option 'edge.correct' added to 'gam.control' to allow better correctionof edge of smoothing parameter space effects with 'gam' when RE/ML used.* Fix to setting of penalty rank in smooth.construct.mrf.smooth.spec.Previously this was wrong, which could cause failure with gamm if thepenalty was rank deficient. Thanks Paul Buerkner.* Fix to Vb.corr call from gam.fit3.post.proc to ensure that sp notdropped (wrongly treated as scale estimate) when P-REML or P-ML used.Could cause failure depending on BLAS. Thanks Matteo Fasiolo.* Fix in gam.outer that caused failure with "efs" optimizer and fixed sps.* Fix to `get.var' to drop matrix attributes of 1 column matrix variables.* Extra argument added to `uniquecombs' to allow result to have same rowordering regardless of input data ordering. Now used by smooth constructorsthat subsample unique covariate values during basis setup to ensureinvariance to data re-ordering.* Correction of scaling error in spherical correlation structure GP smooth.* qf and rd functions for binomial family fixed for zero n case.1.8-15* Fix of survival function prediction in cox.ph family. Code used expression(8.8.5) in Klein and Moeschberger (2003), which is missing a term. Correctexpression is, e.g., (10) from Andersen, Weis Bentzon and Klein (1996)Scandinavian Journal of Statistics.* Added help file 'cox.pht' for Cox PH regression with time dependentcovariates.* fix of potential seg fault in gdi.c:get_bSb if single smooth modelrank deficient (insufficient workspace allocated).* gam.fit5 modified to step half if trial penalized likelihood is infinite.* Fix so that bam works properly with drop.intercept=TRUE.1.8-14* bug fix to smoothCon that could generate NAs in model matrix when using bamwith numeric by variables. The problem was introduced as part of thebam(...,discrete=TRUE) coding.1.8-13* Added help file ?one.se.rule on the `one standard error rule' for obtainingsmoother models.* bam(...,discrete=TRUE) no longer complains about more coefficients than data.* 's', 'te', 'ti' and 't2' modified to allow user to specify that the smoothshould pass through zero at a specified point. See ?identifiability.* anova.gam modified to use more appropriate reference degrees of freedomfor multiple model call, where possible. Also fixed to allow multipleformulae models and to use -2*logLik in place of `deviance' forgeneral.family models.* offsets allowed with multinomial, ziplss and gaulss families.* gevlss family implementing generalized extreme value location, scale andshape models.* Faster code used in 'uniquecombs'. Speeds up discretization step in'bam(...,discrete=TRUE)'. Could still be improved for multi-column case.* modification to 'smoothCon' to allow resetting of smooth suppliedconstraints - enables fix of bug in bam handling of 't2' terms, whereparameterization of penalty and model matrix did not previously matchproperly.* clarification of `exclude' argument to predict.gam in help files.* modification to 'plot.gam' etc, so that 'ylim' is no longer shifted by'shift'.* ylim and ... handling improved for 'fs' plot method (thanks Dave Miller)* gam.check now recognises RStudio and plots appropriately.* bam(...,sparse=TRUE) removed - not efficient, because of unavoidabilityof dense off diagonal terms in X'X or equivalent. Deprecated since 1.8-5.* tweak to initial.sp/g to avoid infinite loop in s.p. initialization, inrather unusual circumstances. Thanks to Mark Bravington.* bam and gam have `drop.intercept' argument to force the parametric terms notto include a constant in their span, even when there are factor variables.* Fix in Vb.corr (2nd order edf correction) for fixed smoothing parameter case.* added 'all.vars1' to enable terms like s(x$y) in model formulae.* modification to gam.fit4 to ignore 'start' if it is immediately worse than'null.coef'.* cSplineDes can now accept a 'derivs' argument.* added drop.intercept handling for multiple formulae (mod by Matteo Fasiolo).* 'gam.side' fix to avoid duplication of smooth model matrices to be testedagainst, when checking for numerical degeneracy. Problem could occasionallycause a failure (especially with bam), when the total matrix to be testedagainst ended upo with more columns than rows.* 4 occurances of as.name("model.frame") changed to quote(stats::model.frame)* fix in predict.bamd discrete prediction code to be a bit more relaxed aboutuse of as.factor, etc in formulae.* fix in predict.gam handling of 'na.action' to avoid trying to get type ofna.action from name of na.action function - this was fragile to nestingand could cause predict.bam to fail in the presence of NA's.* fix of gam.outer so that general families (e.g. cox.ph) can have alltheir smoothing parameters supplied without then ignoring the penalties!* fix in multiple formulae handling of fixed smoothing parameters.* Fix of bug in zlim handling in vis.gam perspective plot with standarderrors. Thanks Petra Kuhnert.* probit link added to 'jagam' (suggested by Kenneth Knoblauch).* 'Sl.' routines revised to allow operation with non-linearly parameterizedsmoothers.* bug fix in Hessian computation in gam.fit5 - leading diagonal of Hessian oflog|Hp| could be wrong where Hp is penalized Hessian.* better use of crossprod in gamlss.gH1.8-12** "bs" B-spline smoothing basis. B-splines with derivative based penaltiesof various orders.* 'gamm' now uses a fixed scale parameter in PQL estimation for Poisson andbinomial data via the `sigma' option in lmeControl.* bam null deviance computation was wrong with prior weights (includingbinomial other than binary case), and returned deviance was wrong fornon-binary binomial. Fixed (did not affect estimation).* improvements to "bfgs" optimizer to better deal with `infinite' smoothingparameters.* changed scheme=3 in default 2-D plotting to grey scale version ofscheme=2.* 'trichol' and 'bandchol' added for banded Cholesky decompositions, plus'sdiag' functions added for extracting and setting matrix sub- andsuper- diagonals.* p-spline constructor and Predict.matrix.pspline.smooth now allow setup of SCOP-spline monotonic smoothers, and derivatives of smooths. Notused in modelling functions yet.* s(...,bs="re") now allows known precision matrix structures to be definedusing the `xt' argument of 's' see ?smooth.construct.re.smooth.spec fordetails and example.* negbin() with a grid search for `theta' is no longer supported - use'nb' instead.* bug fix to bam aic computation with AR rho correction.1.8-11* bam(...,discrete=TRUE) can now handle matrix arguments to smooths (and hencelinear functional terms).* bam(...,discrete=TRUE) bug fix in fixed sp handling.* bam(...,discrete = TRUE) db.drho reparameterization fix, fixing nonsensicaledf2. Also bam edf2 limited to maximum of edf1.* smoothCon rescaling of S changed to use efficient matrix norm in place ofrelatively slow computation involving model matrix crossproduct.* bam aic corrected for AR model if present.* Added select=TRUE argument to 'bam'.* Several discrete prediction fixes including improved thread safety.* bam/gam name gcv.ubre field by "method".* gam.side modified so that if a smooth has 'side.constrain==FALSE' it isneither constrained, nor used in the computation of constraints for otherterms (the latter part being new). Very limited impact!* No longer checks if SUPPORT_OPENMP defined in Rconfig.h, but only if _OPENMPdefined. No change in actual behaviour.1.8-10** 'multinom' family implemented for multinomial logistic regression.* predict.bam now defaults to using efficient discrete prediction methodsfor models fit using discrete covariate methods (bam(...,discrete=TRUE)).* with bam(...,discrete=TRUE) terms like s(a,b,bs="re") had wrong p-valuecomputation applied, as a result of being treated as tensor product terms.Fixed.* minor tweak to soap basis setup to avoid rounding error leading to 'approx'occasionally producing NA's with fixed boundaries.* misc.c:rwMatrix made thread safe (had been using R_chk_calloc, which isn't).* some upgrading for 64bit addressing.* uniquecombs now preserves contrasts on factors.* variable summary tweak so that 1 column matrices in parametric model aretreated as regular numeric variables.1.8-9* C level fix in bam(...,discrete=TRUE) code. Some memory was mistakenlyallocated via 'calloc' rather than 'R_chk_calloc', but was then freedvia 'R_chk_free'. This could cause R to halt on some platforms.1.8-8** New "gp" smooth class (see ?gp.smooth) implemeting the Materncovariance based Gaussian process model of Kamman and Wand (2003), and avariety of other simple GP smoothers.* some smooth plot methods now accept 'colors' and 'contour.col' argument toset color palette in image plots and contour line colors.* predict.gam and predict.bam now accept an 'exclude' argument allowingterms (e.g. random effects) to be zeroed for prediction. For efficiency,smooth terms not in 'terms' or in 'exclude' are no longer evaluated, andare instead set to zero or not returned. See ?predict.gam.* ocat saturated likelihood definition changed to zero, leading to bettercomprability of deviance between model fits (thanks to Herwig Friedl).* null.deviance calculation for extended families modified to make more sensewhen `mu' is the mean of a latent variable, rather than the response itself.* bam now returns standarized residuals 'std.rsd' if `rho!=0'.* bam(...,discrete=TRUE) can now handle 'fs' terms.* bam(...,discrete=TRUE) now accepts 'by' variables. Thanks to Zheyaun Lifor debugging on this.* bam now works with drop.unused.levels == TRUE when random effects shouldhave more levels than those that exist in data. (Thanks Alec Leh)* bam chunk.size logic error fix - error could be triggered if chunk.sizereset automaticlly to be larger than data size.* uniqucombs can now accept a data frame with some or all factor columns,as well as purely numeric marices.* discrete.mf modified to avoid discretizing a covariate more than once,and to halt if a model requires the same covariate to be discretizedtwo different ways (e.g. s(x) + s(x,z)). This affects onlybam(...,discrete=TRUE).* Some changes to ziP and ziplss families to improve numerical robustness,and to ziP help file to suggest appropriate checking. Thanks to KerenRaiter, for reporting problems.* numerical robustness of extended gam methods (gam.fit4) improved for caseswith many zero or near zero iterative weights. Handling of zero weightsmodified to avoid divide by (near) zero problems. Also tests for poorscaling of sqrt(abs(w))*z and substitutes computations based on w*z ifdetected. Also 'newton' routine now step halves if REML score not finite!* Sl.setup (used by bam) modification to allow more efficient handling of termswith multiple diagonal penalties with no non-zero elements in common, butpossibly with non zero elements `interleaved' between penalties.1.8-7** 'gam' default scale parameter changed to modified Pearson estimatordeveloped by Fletcher 2012 Biometrika 99(1), 230-237. See ?gam.scale.** 'bam' now has a 'discrete' argument to allow discretization of covariatesfor more efficient computation, with substantially more parallelization(via 'nthreads'). Still somewhat experimental.* Slightly more accurate smoothing parameter uncertainty correction. Changesedf2 used for AIC (under RE/ML), and hence may change AIC values.* jagam prior variance on fixed effects is now set with reference to data andmodel during initialization step.* bam could lose offset for small datasets in gaussian additive case. fixed.* gam.side now setup to include penalties in computations if fewer data thancoefs (an exceedingly specialist topic).* p-value computation for smooth terms modified to avoid an ambiguity in thechoice of test statistic that could lead to p-value changing somewhat betweenplatforms.* gamm now warns if attempt is made to use extended family.* step fail logic improved for "fREML" optimization in 'bam'.* fix of openMP error in mgcv_pbsi, which could cause a problem inmulti-threaded bam computation (failure to declare a variable as private).* Smoothing parameter uncertainty corrected AIC calculations had anindexing problem in Sl.postproc, which could result in failure of bam withlinked smooths.* mroot patched for fact that chol(...,pivot=TRUE) does not operate asdocumented on rank deficient matrices: trailing block of triangular factorhas to be zeroed for pivoted crossprod of factor to equal original matrix.* bam(...,sparse=TRUE) deprecated as no examples found where it is reallyworthwhile (but let me know if this is a problem).* marginal model matrices in tensor product smooths now stored inre-parameterized form, if re-parameterization happened (shouldn't changeanything!).* initial.spg could fail if response vector had dim attributes and extendedfamily used. fixed.1.8-6* Generalization of list formula handling to allow linear predictors toshare terms. e.g. gam(list(y1~s(x),y2~s(z),1+2~s(v)+w-1),family=mvn(d=2))* New German translation thanks to Detlef Steuer.* plot.gam now silently returns a list of plotting data, to help advancedusers (Fabian Scheipl) to produce customized plot.* bam can now set up an object suitable for fitting, but not actually dothe fit, following a suggestion by Fabian Scheipl. See arguments 'fit'and 'G'.1.8-5* Korean translation added thanks to Chel Hee Lee.* scale parameter handling in edf in logLik.gam made consistent with glm(affects AIC).* 'bam', 'gam' and 'gamm' modified to often produce smaller files when modelssaved (and never to produce absurdly large files). Achieved by settingenvironment of formula, terms etc to .GlobalEnv. Previously 'save' couldsave entire contents of environment of formula/terms with fitted modelobject. Note that change can cause failure in user written functions callinggam/bam and then 'predict' without supplying all prediction variables(fix obvious).* A help file 'single.index' supplied illustrating how single index modelscan be estimated in mgcv.* predict.gam now only creates a "constant" attribute if the model has one.* gam.fit4 convergence testing of coefs modified to more robust test ofgradients of penalized dev w.r.t. params, rather than change in params,which can fail under rank deficiency.* mgcv_qrqy was not thread safe. Not noticeable on many platforms as allthreads did exactly the same thing to the same matrix, but very noticeableon Windows. Thread safe mgcv_qrqy0 added and used in any parallel sections.* Allow openMP support if compiler supports it and provides pre-defined macro_OPENMP, even if SUPPORT_OPENMP undefined. (Allows multi-threading onWindows, for example.)* 'eps' is now an argument to 'betar' allowing some control on how tohandle response values too close to 0 or 1. Help file expanded toemphasise the problems with using beta regression with 0s and 1s inthe data.* fix of bug in multi-formula contrast handling, causing failure of predictionin some cases.* ziP and ziplss now check for non-integer (or binary) responses and producean error message if these are found. Previously this was not trapped andcould lead to a segfault.1.8-4** JAGS/BUGS support added, enabling auto-generation of code and datarequired to used mgcv type GAMs with JAGS. Useful for complex randomeffects structures, for example.* smoothCon failed if selection penalties requested, but term was unpenalized.Now fixed (no selection penalties on unpenalized terms.)* gam.check would fail for tensor product smooths with by variables - fixed.* predict.gam would fail when predicting for more data than the blocksizebut selecting only some terms. Fixed thanks to Scott Kostyshak.* smoothCon now has an argument `diagonal.penalty' allowing single penaltysmooths to be re-parameterized in order to diagonalize the penalty matrix.PredictMat is modified to apply the same reparameterization, making ituser transparent. Facilitates the setup of smooths for export to otherpackages.* predict.bam now exported in response to a request from anotherpackage maintainer.* 1.8 allows some prediction tasks for some families (e.g. cox.ph) torequire response variables to be supplied. NAs in these then messed upprediction when they were not needed (e.g. if response variables withNAs were provided to predict.gam for a simple exponential family GAM).Response NAs now passed to the family specific prediction code, restoringthe previous behaviour for most models. Thanks Casper Wilestofte Berg.* backend parallel QR code used by gam modified to use a pivoted blockalgorithm.* nthreads argument added to 'bam' to allow for parallel computationfor computations in the main process (serial on any cluster nodes).e.g. QR based combination of results from cluster nodes is nowparallel.* fREML computation now partly in parallel (controlled by 'nthreads'argument to 'bam')* slanczos now accepts an nt argument allowing parallel computation ofmain O(n^2) step.* fix to newton logic problem, which could cause an attempt to use 'score2'before definition.* fix to fREML code which could cause matrix square root to lose dimensionsand cause an error.* initial.sp could perform very poorly for very low basis dimensions - couldset initial sp to effective infinity.1.8-3* Fix of two illegal read/write bugs with extended family models with nosmooths. (Thanks to Julian Faraway for reporting beta regr problem).* bam now checks that chunk.size > number of parameters and resets thechunk.size if not.* Examples of use of smoothCon and PredictMat for setting up basesfor use outside mgcv (and then predicting) added to ?smoothCon.1.8-2* For exponential family gams, fitted by outer iteration, a warning is nowgenerated if the Pearson scale parameter estimate is more than 4 timesa robust estimate. This may indicate an unstable Pearson estimate.* 'gam.control' now has an option 'scale.est' to allow selection of theestimator to use for the scale parameter in exponential family GAMs.See ?gam.scale. Thanks to Trevor Davies for providing a clear unstablePearson estimate example.* drop.unused.levels argument added to gam, bam and gamm to allow"mrf" (and "re") terms to have unobserved factor levels.* "mrf" constructor modified to deal properly with regions that contain noobservations.* "fs" smooths are no longer eligible to have side conditions set, sincethey are fully penalized terms and hence always identifiable (in theory).* predict.bam was not declared as a method in NAMESPACE - fixed* predict.bam modified to strip down object to save memory (especially inparallel).* predict.gam now has block.size=NULL as default. This implies a blocksize of 1000 when newdata supplied, and use of a single block if nonew data was supplied.* some messages were not printing correctly after a change inmessage handling to facilitate easier translation. Now fixed.1.8-1* bam modified so that choleski based fitting works properly with rankdeficient model matrix (without regularization).* fix of 1.8-0 bug - gam prior weights mishandled in computation of cov matrix,resulting in incorrect variance estimates (even without prior weightsspecified). Thanks Fabian Scheipl.1.8-0*** Cox Proportional Hazard family 'cox.ph' added as example of generalpenalized likelihood families now useable with 'gam'.*** 'ocat', 'tw', 'nb', 'betar', 'ziP' and 'scat' families added forordered categorical data, Tweedie with estimation of 'p', negative binomialwith (fast) estimation of 'theta', beta regression for proportions, simplezero inflated Poisson regression and heavy tailed regression with scaled tdistribution. These are all examples of 'extended families' now useablewith 'gam'.*** 'gaulss' and 'ziplss' families, implementing models with multiple linearpredictors. For gaulss there is a linear predictor for the Gaussian meanand another for the standard deviation. For ziplss there is a linearpredictor controlling `presence' and another controllingthe Poisson parameter, given presence.*** 'mvn' family for multivariate normal additive models.** AIC computation changed for bam and gam models estimated by REML/MLto account for smoothing parameter uncertainty in degrees of freedomterm.* With REML/ML smoothness selection in gam/bam an extra covariance matrix 'Vc'is now computed which allows for smoothing parameter uncertainty. Seethe 'unconditional' arguments to 'predict.gam' and 'plot.gam' to use this.* 'gam.vcomp' bug fix. Computed intervals for families with fixed scaleparameter were too wide.* gam now defaults to the Pearson estimator of the scale parameter to avoidpoor scale estimates in the quasipoisson case with low counts (and possiblyelsewhere). Gaussian, Poisson and binomial inference invariant to change.Thanks to Greg Dropkin, for reporting the issue.* Polish translation added thanks to Lukasz Daniel.* gam.fit3 now forces eta and mu to be consistent with coef and valid onreturn (previously could happen that if step halving was used in finaliteration then eta or mu could be invalid, e.g. when using identity linkwith non-negative data)* gam.fit3 now bases its convergence criteria on grad deviance w.r.t. modelcoefs, rather than changes in model coefs. This prevents problems whenthere is rank deficiency but different coefs get dropped at differentiterations. Thanks to Kristynn Sullivan.* If mgcv is not on the search path then interpret.gam now tries toevaluate in namespace of mgcv with environment of formula as enclosingenvironment, if evaluation in the environment of the formula fails.* bug fix to sos plotting method so that it now works with 'by' variables.* 'plot.gam' now weights partial residuals by *normalized* square rootiterative weights so that the average weight is 1 and the residualsshould have constant variance if all is ok.* 'pcls' now reports if the initial point is not feasible.* 'print.gam' and 'summary.gam' now report the rank of the model if it isrank deficient. 'gam.check' reports the model rank whenever it isavailable.* fix of bug in 'k.check' called by 'gam.check' that gave an error forsmooths with by variables.* predict.gam now checks that factors in newdata do not contain morelevels than those used in fitting.* predict.gam could fail for type "terms" with no intercept - fixed.* 'bfgs' now uses a finite difference approximation for the initial inverseHessian.1.7-29* Single character change to Makevars file so that openMP multi-threadingactually works.1.7-28* exclude.too.far updated to use kd-tree instead of inefficient search forneighbours. This can make plot.gam *much* faster for large datasets.* Change in smoothCon, so that sweep and drop constraints (default for bamfor efficiency reasons) are no longer allowed with by variables and matrixarguments (could lead to confusing results with factor by variables in bam).* 'ti' terms now allow control of which marginals to constrain, via 'mc'.Allows e.g. y ~ ti(x) + ti(x,z,mc=c(0,1)) - for experts only!* tensor.prod.model.matrix re-written to call C code. Around 5-10 timesfaster than old version for large data sets.* re-write of mini.mf function used by bam to generate a reduced sizemodel frame for model setup. New version ensures that all factor levelsare present in reduced frame, and avoids production of unrealisticcombinations of variables in multi-dimensional smooths which could occurwith old version.* bam models could fail if a penalty matrix was 1 by 1, or if multiplepenalties on a smooth were in fact seperable into single penalties.Fixed. Thanks to Martijn weiling for reporting.* Constant in tps basis computation was different to published versionfor odd dimensions - makes no difference to fit, but annoying if youare trying to test a re-implementation. Thanks to Weijie Cai at SAS.* prediction for "cc" and "cp" classes is now cyclic - values outside therange of knots are wrapped back into the interval.* ldTweedie now returns derivatives w.r.t. a transform of p as well asw.r.t log of scale parameter phi.* gamm can now handle 'varComb' variance functions (thanks Sven Neulingerfor reporting that it didn't).* fix of a bug which could cause bam to seg fault for a model with no smooths(insufficient storage allocated in C in this case). Thanks Martijn Weiling.1.7-27* Further multi-threading in gam fits - final two leading order matrixoperations parallelized using openMP.* Export of smooth.construct.t2.smooth.spec and Predict.matrix.t2.smooth,and Rrank.* Fix of of missing [,,drop=FALSE] in predict.gam that could cause problemswith single row prediction when 'terms' supplied (thanks Yang Yang).1.7-26* Namespace fixes.1.7-25* code added to allow openMP based multi-threading in gam fits (see?gam.control and ?"mgcv-parallel").* bam now allows AR1 error model to be split blockwise. See argument'AR.start'.* magic.post.proc made more efficient (one of two O(np^2) steps removed).* var.summary now coerces character to factor.* bugs fixed whereby etastart etc were not passed to initial.spg andget.null.coefs. Thanks to Gavin Simpson.* reformulate removed from predict.gam to avoid (slow) repeated parsercalls.* gaussian(link="log") initialization fixed so that negative datadoes not make it fail, via fix.family patching function.* bug fix in plot method for "fs" basis - ignored any side conditions.Thanks to Martijn Weiling and Jacolien van Rij.* gamm now checks whether smooths nested in factors have illegal sideconditions, and halts if so (re-ordering formula can help).* anova.glmlist no longer called.* Compiled code now uses R_chck_calloc and R_chk_free for memory managementto avoid the possibility of unfriendly exit on running out of memory.* fix in gam.side which would fail with unpenalized interactions in thepresence of main effects.1.7-24* Examples pruned in negbin, smooth.construct.ad.smooth.spec and bam helpfiles to reduce CRAN checking load.* gam.side now warns if only repeated 1-D smooths of the same variable areencountered, but does not halt.* Bug fix in C code for "cr" basis, that could cause a memory violation duringprediction, when an extrapolation was immediately followed by a predictionthat lay exactly on the upper boundary knot. Thanks to Keith Woolner forreporting this.* Fix for bug in fast REML code that could cause bam to fail with ti/te onlymodels. Thanks to Martijn Wieling.* Fix of bug in extract.lme.cov2, which could cause gamm to fail whena correlation structure was nested inside a grouping factor finer thanthe finest random effect grouping factor.* Fix for an interesting feature of lme that getGroups applied to thecorStruct that is part of the fitted lme object returns groups insorted order, not data frame order, and without an index from one orderto the other. (Oddly, the same corStruct Initialized outside lme has itsgroups in data frame order.) This feature could cause gamm to fail,complaining that the grouping factors for the correlation did not appearto be nested inside the grouping structure of the random effects. Abunch of ordering sensitivity tests have been added to the mgcv test suite.Thanks to Dave Miller for reporting the bug.1.7-23*** Fix of severe bug introduced with R 2.15.2 LAPACK change. The shippedversion of dsyevr can fail to produce orthogonal eigenvectors whenuplo='U' (upper triangle of symmetric matrix used), as opposed to 'L'.This led to a substantial number of gam smoothing parameter estimationconvergence failures, as the key stabilizing re-parameterization wassubstantially degraded. The issue did not affect gaussian additive modelswith GCV model selection. Other models could fail to converge any furtheras soon as any smoothing parameter became `large', as happens when asmooth is estimated as a straight line. check.gam reported the lack of fullconvergence, but the issue could also generate complete fit failures.Picked up late as full test suite had only been run on R > 2.15.1 with anexternal LAPACK.** 'ti' smooth specification introduced, which provides a much better (andvery simple) way of allowing nested models based on 'te' type tensorproduct smooths. 'ti' terms are used to set up smooth interactionsexcluding main effects (so ti(x,z) is like x:z while te(x,z) is morelike x*z, although the analogy is not exact).* summary.gam now uses a more efficient approach to p-value computationfor smooths, using the factor R from the QR factorization of the weightedmodel matrix produced during fitting. This is a weighted version of theWood (2013) statistic used previously - simulations in that paperessentially unchanged by the change.* summary.gam now deals gracefully with terms such as "fs" smoothsestimated using gamm, for which p-values can not be computed. (thanks toGavin Simpson).* gam.check/qq.gam now uses a normal QQ-plot when the model has been fittedusing gamm or gamm4, since qq.gam cannot compute corrext quantiles inthe presence of random effects in these cases.* gamm could fail with fixed smooths while assembling totalpenalty matrix, by attempting to access non-existent penaltymatrix. (Thanks Ainars Aunins for reporting this.)* stripped rownames from model matrix, eta, linear predictor etc. Savesmemory and time.* plot.soap.film could switch axis ranges. Fixed.* plot.mgcv.smooth now sets smooth plot range on basis of xlim andylim if present.* formXtViX documentation fixed + return matrix labels.* fixDependence related negative index failures for completely confoundedterms - now fixed.* sos smooth model matrix re-scaled for better conditioning.* sos plot method could produce NaNs by a rounding error in argument toacos - fixed.1.7-22* Predict.matrix.pspline.smooth now allows prediction outside range of knots,and uses linear extrapolation in this case.* missing drop=FALSE in reTest called by summary.gam caused 1-D random effectp-value computation to fail. Fixed (thanks Silje Skår).1.7-21** soap film smoother class added. See ?soap* Polish translation added thanks to Lukasz Daniel.* mgcv/po/R-mgcv.pot up-dated.* plot methods for smooths modified slightly to allow methods to returnplot data directly, without a prediction matrix.1.7-20* '...' now passed to termplot by plot.gam (thanks Andreas Eckner).* fix to null deviance computation for binomial when n>1, matrix responseused and an offset is present. (Thanks to Tim Miller)* Some pruning of unused code from recov and reTest.* recov modified to stop it returning a numerically non-symmetric Ve, andcausing occasional failures of summary.gam with "re" terms.* MRF smooth bug. Region ordering could become confused under somecircumstances due to incorrect setting of factor levels. Correctedthanks to detailed bug report from Andreas Bender.* polys.plot colour/grey scale bug. Could ask for colour 0 from colourscheme, and therefore fail. Fixed.1.7-19** summary.gam and anova.gam now use an improved p-value computation forsmooth terms with a zero dimensional penalty null space (includingrandom effects). The new scheme has been tested by full replicationof the simulation study in Scheipl (2008,CSDA) to compare it to the bestmethod therein. In these tests it is at least as powerful as the bestmethod given there, and usually indistinguishable, but it gives slightlytoo low null p-values when smoothing parameters are very poorly identified.Note that the new p-values can not be computed from old fitted gam objects.Thanks to Martijn Wieling for pointing out how bad the p-values for regularsmooths could be with random effects.* t2 terms now take an argument `ord' that allows orders of interaction tobe selected.* "tp" smooths can now drop the null space from their construction viaa vector m argument, to allow testing against polynomials in the null space.* Fix of vicious little bug in gamm tensor product handling that could havea te term pick up the wrong model matrix and fail.* bam now resets method="fREML" to "REML" if there are no free smoothingparameters, since there is no advantage to the "fREML" optimizer in thiscase, and it assumes there is at least one free smoothing parameter.* print.gam modified to print effective degrees of freedom more prettily,* testStat bug fix. qr was called with default arguments, which includestol=1e-7...* bam now correctly returns fitting weights (rather than prior) in weightsfield.1.7-18* Embarrassingly, the adjusted r^2 computation in summary.gam was wrongfor models with prior weights. Now fixed, thanks to Antony Unwin.* bam(...,method="fREML") could give incorrect edfs for "re" terms as aresult of a matrix indexing error in Sl.initial.repara. Now fixed.Thanks to Martijn Wieling for reporting this.* summary.gam had freq=TRUE set as default in 1.7-17. This gave betterp-values for paraPen terms, but spoiled p-values for fixed effects in thepresence of "re" terms (a rather more common setup). Default now reset tofreq=FALSE.* bam(...,method="fREML") made fully compatible with gam.vcomp.* bam and negbin examples speeded up* predict.gam could fail for models of the form y~1 when newdata are supplied.(Could make some model averaging methods fail). Fixed.* plot.gam had an overzealous check for availibility of variance estimates,which could make rank deficient models fail to plot CIs. fixed.1.7-17** p-values for terms with no un-penalized components were poor. The theory onwhich the p-value computation for other terms is based shows why this is,and allows fixes to be made. These are now implemented.* summary p value bug fix --- smooths with no null space had a bug inlower tail of p-value computation, yielding far too low values. Fixed.* bam now outputs frequentist cov matrix Ve and alternative effective degreesof freedom edf1, in all cases.* smoothCon now adjusts null.space.dim on constraint absorption.* Prediction with matrix arguments (i.e. for models using summationconvention) could be very memory hungry. This in turn meant thatbam could run out of memory when fitting models with such terms.The problem was memory inefficient handling of duplicate evaluations.Now fixed by modification of PredictMat* bam could fail if the response vector was of class matrix. fixed.* reduced rank mrf smooths with supplied penalty could use the incorrectpenalty rank when computing the reduced rank basis and fail. fixedthanks to Fabian Scheipl.* a cr basis efficiency change could lead to old fitted model objects causingsegfaults when used with current mgcv version. This is now caught.1.7-16* There was an unitialized variable bug in the 1.7-14 re-written "cr" basiscode for the case k=3. Fixed.* gam.check modified slightly so that k test only applied to smooths ofnumeric variables, not factors.1.7-15* Several packages had documentation linking to the 'mgcv' functionhelp page (now removed), when a link to the package was meant. An aliashas been added to mgcv-package.Rd to fix/correct these links.1.7-14** predict.bam now added as a wrapper for predict.gam, allowing parallelcomputation** bam now has method="fREML" option which uses faster REML optimizer:can make a big difference on parameter rich models.* bam can now use a cross product and Choleski based method to accumulatethe required model matrix factorization. Faster, but less stable thanthe QR based default.* bam can now obtain starting values using a random sub sample of the data.Useful for seriously large datasets.* check of adequacy of basis dimensions added to gam.check* magic can now deal with model matrices with more columns than rows.* p-value reference distribution approximations improved.* bam returns objects of class "bam" inheriting from "gam"* bam now uses newdata.guaranteed=TRUE option when predicting as partof model matrix decomposition accumulation. Speeds things up.* More efficient `sweep and drop' centering constraints added as default forbam. Constaint null space unchanged, but computation is faster.* Underlying "cr" basis code re-written for greater efficiency.* routine mgcv removed, it now being many years since there has been anyreason to use it. C source code heavily pruned as a result.* coefficient name generation moved from estimate.gam to gam.setup.* smooth2random.tensor.smooth had a bug that could produce a nonsensicalpenalty null space rank and an error, in some cases (e.g. "cc" basis)causing te terms to fail in gamm. Fixed.* minor change to te constructor. Any unpenalized margin now hascorresponding penalty rank dropped along with penalty.* Code for handling sp's fixed at exactly zero was badly thought out, andcould easily fail. fixed.* TPRS prediction code made more efficient, partly by use of BLAS. Largedataset setup also made more efficient using BLAS.* smooth.construct.tensor.smooth.spec now handles marginals with factorarguments properly (there was a knot generation bug in this case)* bam now uses LAPACK version of qr, for model matrix QR, since it'sfaster and uses BLAS.1.7-13** The Lanczos routine in mat.c was using a stupidly inefficient check forconvergence of the largest magnitude eigenvectors. This resulted infar too many Lanczos steps being used in setting up thin plate regressionsplines, and a noticeable speed penalty. This is now fixed, with many thanksDavid Shavlik for reporting the slow down.* Namespace modified to import from methods. Dependency on stats and graphicsmade explicit.* "re" smooths are no longer subject to side constraint under nesting (sincethis is almost always un-necessary and undesirable, and often unexpected).* side.con modified to allow smooths to be excluded and to allow sideconstraint computation to take account of penalties (unused at present).1.7-12* bam can now compute the leading order QR decomposition on a clusterset up using the parallel package.* Default k for "tp" and "ds" modified so that it doesn't exceed 100 +the null space dimension (to avoid complaints from users smoothing inquite alot of dimensions). Also default sub-sample size reduced to 2000.* Greater use of BLAS routines in the underlying method code. In particularall leading order operations count steps for gam fitting now use BLAS.You'll need R to be using a rather fancy BLAS to see much difference,however.* Amusingly, some highly tuned blas libraries can result in lapack not alwaysgiving identical eigenvalues when called twice with the same matrix. The`newton' optimizer had assumed this wouldn't happen: not any more.* Now byte compiled by default. Turn this off in DESCRIPTION if it interfereswith debugging.* summary.gam p-value computation options modified (default remains thesame).* summary.gam default p-value computation made more computationallyefficient.* gamm and bam could fail under some options for specifying binomial models.Now fixed.1.7-11* smoothCon bug fix to avoid NA labels for matrix arguments whenno by variable provided.* modification to p-value computation in summary.gam: `alpha' argumentremoved (was set to zero anyway); computation now deals with possibilityof rank deficiency computing psuedo-inverse of cov matrix for statistic.Previously p-value computation could fail for random effect smooths withlarge datasets, when a random effect has many levels. Also for large datasets test statistic is now based on randomly sampling max(1000,np*2) modelmatrix rows, where np is number of model coefficients (random numbergenerator state unchanged by this), previous sample size was 3000.* plot.mrf.smooth modified to allow passing '...' argument.* 'negbin' modified to avoid spurious warnings on initialization call.1.7-10* fix stupid bug in 1.7-9 that lost term labels in plot.gam.1.7-9* rather lovely plot method added for splines on the sphere.* plot.gam modified to allow 'scheme' to be specified for plots, to easilyselect different plot looks.* schemes added for default smooth plotting method, modified for mrfs andfactor-smooth interactions.* mgcv function deprected, since magic and gam are much better (let me knowif this is really a problem).1.7-8* gamm.setup fix. Bug introduced in 1.7-7 whereby gamm with no smooths wouldfail.* gamm gives returned object a class "gamm"1.7-7* "fs" smooth factor interaction class introduced, for smooth factorinteractions where smoothing parameters are same at each factor level.Very efficient with gamm, so good for e.g. individual subject smooths.* qq.gam default method modified for increased power.* "re" terms now allowed as tensor product marginals.* log saturated likelihoods modified w.r.t. weight handling, so that weightsare treated as modifying the scale parameter, when scale parameter is free.i.e. obs specific scale parameter is overall scale parameter divided byobs weight. This ensures that when the scale parameter is free, RE/ML basedinference is invariant to multiplicative rescaling of weights.* te and t2 now accept lists for 'm'. This allows more flexibility withmarginals that can have vector 'm' arguments (Duchon splines, P splines).* minor mroot fix/gam.reparam fix. Could declare symmetric matrixnot symmetric and halt gam fit.* argument sparse added to bam to allow exploitation of sparsity in fitting,but results disappointing.* "mrf" now evaluates rank of penalty null space numerically (previouslyassumed it was always one, which it need not be with e.g. a suppliedpenalty).* gam.side now corrects the penalty rank in smooth objects that havebeen constrained, to account for the constraint. Avoids some nestedmodel failures.* gamm and gamm.setup code restructured to allow smooths nested in factorsand for cleaner object oriented converion of smooths to random effects.* gam.fit3 bug. Could fail on immediate divergence as null.eta was matrix.* slanczos bug fixes --- could segfault if k negative. Could also fail toreturn correct values when k small and kl < 0 (due to a convergencetesting bug, now fixed)* gamm bug --- could fail if only smooth was a fixed one, by looking fornon-existent sp vector. fixed.* 'cc' Predict.matrix bug fix - prediction failed for single points.* summary.gam failed for single coefficient random effects. fixed.* gam returns rV, where t(rV)%*%rV*scale is Bayesian cov matrix.1.7-6** factor `by' variable handling extended: if a by variable is anordered factor then the first level is treated as a reference leveland smooths are only generated for the other levels. This is usefulfor avoiding identifiability issues in complex models with factor byvariables.* bam bug fix. aic was reported incorrectly (too low).1.7-5* gam.fit3 modified to converge more reliably with links that don't guaranteefeasible mu (e.g poisson(link="identity")). One vulnerability removed + anew approach taken, which restarts the iteration from null modelcoefficients if the original start values lead to an infinite deviance.* Duchon spline bug fix (could fail to create model matrix ifnumber of data was one greater than number of unique data).* fix so that 'main' is not ignored by plot.gam (got broken in 1.7-0object orientation of smooth plotting)* Duchon spline constructor now catches k > number of data errors.* fix of a gamm bug whereby a model with no smooths would fail afterfitting because of a missing smoothing parameter vector.* fix to bug introduced to gam/bam in 1.7-3, whereby '...' were passed togam.control, instead of passing on to fitting routines.* fix of some compiler warnings in matrix.c* fix to indexing bug in monotonic additive model example in ?pcls.1.7-4* Fix for single letter typo bug in C code called by slanczos, couldactually segfault on matrices of less than 10 by 10.* matrix.c:Rlanczos memory error fix in convergence testing of -veeigenvalues.* Catch for min.sp vector all zeroes, which could cause an ungracefulfailure.1.7-3** "ds" (Duchon splines) smooth class added. See ?Duchon.spline** "sos" (spline on the sphere) smooth class added. See ?Spherical.Spline.* Extended quasi-likelihood used with RE/ML smoothness selection andquasi families.* random subsampling code in bam, sos and tp smooths modified a little, sothat .Random.seed is set if it doesn't exist.* `control' argument changed for gam/bam/gamm to a simple list, which isthen passed to gam.control (or lmeControl), to match `glm'.* Efficiency of Lanczos iteration code improved, by restructuring, andcalling LAPACK for the eigen decompostion of the working tri-diagonalmatrix.* Slight modification to `t2' marginal reparameterization, so that `maineffects' can be extracted more easily, if required.1.7-2* `polys.plot' now exported, to facilitate plotting of results formodels involving mrf terms.* bug fix in plot.gam --- too.far had stopped working in 1.7-0.1.7-1* post fitting constraint modification would fail if model matrix wasrank deficient until penalized. This was an issue when mixing new t2terms with "re" type random effects. Fixed.* plot.mrf.smooth bug fix. There was an implicit assumption that the`polys' list was ordered in the same way as the levels of the covariateof the smooth. fixed.* gam.side intercept detection could occasionally fail. Improved.* concurvity would fail if model matrix contained NA's. Fixed.1.7-0** `t2' alternative tensor product smooths added. These can be used withgamm4.** "mrf" smooth class added (at the suggestion of Thomas Kneib).Implements smoothing over discrete geographic districts using aMarkov random field penalty. See ?mrf* qq.gam added to allow better checking of distribution of residuals.* gam.check modified to use qq.gam for QQ plots of deviance residuals.Also, it now works with gam(*, na.action = "na.replace") and NAs.* `concurvity' function added to provide simple concurvity measures.* plot.gam automatic layout modified to be a bit more sensible (i.e.to recognise that most screens are landscape, and that usuallysquarish plots are wanted).* Plot method added for mrf smooths.* in.out function added to test whether points are interior toa region defined by a set of polygons. Useful when working withMRFs.* `plot.gam' restructured so that smooths are plotted by smooth specificplot methods.* Plot method added for "random.effect" smooth class.* `pen.edf' function added to extract EDF associated with each penalty.Useful with t2 smooths.* Facilty provided to allow different identifiability constraints to beused for fitting and prediction. This allows t2 smooths to be fittedwith a constraint that allows fitting by gamm4, but still performinference with the componentwise optimal sum to zero constraints.* mgcv-FAQ.Rd added.* paraPen works properly with `gam.vcomp' and full.sp names returnedcorrectly.* bam (and bam.update) can now employ an AR1 error model in theguassian-identity case.* bam.update modified for faster updates (initial scale parameterestimate now supplied in RE/ML case)* Absorption of identifiability constraints modified to allowconstraints that only affect some parameters to leave rest ofparameters completely unchanged.* rTweedie added for quick simulation of Tweedie random deviateswhen 1<p<2.* smooth.terms help file fixed so cyclic p spline identifies as "cp"and not "cs"!* bug fix in `gamm' so that binomial response can be provided as 2 columnmatrix, in standard `glm' way.1.6-2** Random effect support for `gam' improved with the addition ofa random effect "smooth" class, and a function for extractingvariance components. See ?random.effects and links for details.* smooths now contain extra elements: S.scale records the scale factorused in any linear rescaling of a penalty matrix; plot.me indicateswhether `plot.gam' should attempt to plot the term; te.ok indicateswhether the smooth is a suitable marginal for a tensor product.* Fix in `gamm.setup' -- models with no fixed effects (except smooths)could fail to fit properly, because of an indexing error (caused oddresults with indicator by variables)* help files have had various misuses of `itemize' fixed.* initialization could fail if response was actually a 1D array. fixed.* New function `bam.update' allows efficient updating of very largestrictly additive models fitted by `bam' when additional data becomeavailable.* gam now warns if RE/ML used with quasi families.* gam.check now accepts graphics parameters.* fixed problem in welcome message that messed up ESS.1.6-1* Bug in cSplineDes caused bases to be non-cyclic unless firstknot was at 0. This also affected the "cp" smoother class. Fixed.* null.deviance calculation was wrong for case with offset andweights. Fixed.* Built in strictly 1D smoothers now give an informative error message ifan attempt is made to use them for multidimensional smoothing.* gam.check generated a spurious error when applied to a model with noestimated smoothing parameters. Fixed.1.6-0*** Routine `bam' added for fitting GAMs to very large datasets.See ?bam** p-value method tweaked again. Reference DoF for testing nowdefaults to the alternative EDF estimate (based on 2F - FF whereF = (X'WX+S)^{-1}X'WX). `magic.post.proc' and `gam.fit3.post.proc'changed to provide this. p-values still a bit too small, but onlyslightly so, if `method="ML"' is the smoothness selector.* bad bug in `get.null.coef' could cause fit failure as a result ofinitial null coefs predicting infinite deviance.* REML/ML convergence could be response scale sensitive, because ofinnapropriate convergence testing scaling in newton and bfgs -fixed.* Slight fix to REML (not ML) score calculation in gam.fit3 -Mp/2*log(2*pi*scale) was missing from REML score, where Mp istotal null space dimension for model.* `summary.gam' bug fix: REML/ML models were always treated as ifscale parameter had been estimated. gamObject should now contain`scale.estimated' indicating whether or not scale estimated* some modifications to smoothCon and gam.setup to allow smoothconstructors to return Matrix style sparse model matrices andpenalty matrices.* fixed misplaced bracket in print.mgcv.version, called on attachment.* added utility function `ls.list' to give memory usage for elementsof a list.* added function `rig' to generate inverse Gaussian random deviates.1.5-6* "ts" and "cs" modified so that zero eigen values of penaltymatrix are reset to 10% of smallest strictly positive eigenvalue, rather than 1%. This seems to lead to more reliableperformance.* `bfgs' simplified and improved so that it now checks the Wolfeconditions are met at each step. No longer uses any Newton steps,so if it's used with gam.control(outerPIsteps=0) then it'sfirst derivative only for smoothing parameter optimization.* `outerPIsteps' now defaults to zero in `gam.control'.* New routine `initial.spg' gets jth initial sp to equalizeFrobenious norm of S_j and cols of sqrt(W)X which it penalizes,where W are initial fisher weights. This removes the need for aperformance iteration step to get starting values (soouterPIsteps=0 in gam.control can now bypass PI completely).* fscale set from get.null.coef (facilitates cleaner initialization).* large data set rare event logistic regression example added to?gam.* For p-value calculation for smooths, summary.gam subsamples rows ofthe model matrix if it has more than 3000 rows. This speeds thingsup for large datasets.* minor bug fix in `gamm' so that intercept gets correct name, ifit's the only non-smooth fixed effect.* .pot files updated, German translation added, thanks to Detlef Steuer.* `in.out' was not working from 1.5 --- fixed.* loglik.gam now ups parameter count for Tweedie by one to account forscale estimation.* There was a bug in the calculation of the Bayesian cov matrix, when thescale parameter was known: it was always using an estimated scaleparameter. Makes no statistically meaningful difference for a modelthat fits properly, of course.* Some junk removed from gam object.* summary.gam pseudoinversion made slightly more efficient.* adaptive smooth constructor is a bit more careful about the ranksof the penalties.* 2d adaptive smoother bug fix --- part of penalty was missing dueto complete line error.* `smoothCon' and `PredictMat' modified so that sparse smooths canoptionally have sparse centering constraints applied.* `gamm' fix: prediction and visualization from `x$gam' where x is afitted `gamm' object should not require the random effects to beprovided. Now it doesn't.* minor bug fix: a model with no penalties except a fixed one would failwith an index error.* `te' terms are now only subject to centering constraints if allmarginals would usually have a centering constraint.* `te' no longer resets multi-dimensional marginals to "tp", unlessthey have been set to "cr", "cs", "ps" or "cp". This allows tensorproducts with user supplied smooths.* Example of obtaining derivatives of a smooth (with CIs) added to`predict.gam' help file.* `newdata.guaranteed' argument to predict.gam didn't work. fixed.1.5-5* `gamm.setup' made an assumption about basis dimensions which was nottrue for tensor products involving the "cc" basis. This is now fixed.1.5-4* smooth.construct.tensor.smooth.spec modified, so thatre-parameterization in terms of function values is only if it'sstable, and by default the parameters are function values witheven spacing. Otherwise it was possible for tensor products ofp-splines to fail.1.5-3* `gam' now attempts to coerce `data' to a data frame, if it is notalready a list or a data frame, provided that it is already an objectthat model.frame can deal with. This is to support an undocumentedfeature of versions prior to 1.5-2 that `data' could actually besomething other than a list or data frame.* An offset of type "array" could cause gam.fit3 to fail. fixed.* `variable.summary' bug fixed, (it caused gam(y~1) to fail).1.5-2* Several exported functions had no usage entries in the help files.Everything exported does now.* `vis.gam' had a bunch of bugs (which could make it fail altogether)as a result of trying to set default conditioning values from the gamobject model frame. `gam' and `gamm' now obtain summary statistics ofthe predictor variables, stored in `var.summary' in the gam object,which `vis.gam' now uses. As a result `vis.gam' `view' and `cond'arguments should now contain original variable names, not model frameterm names.* `data' argument of `gam' no longer stored in the `gam' object, bydefault to save memory (can restore this --- see `gam.control').* `summary.gam' failed under na.exclude. Fixed.* `mroot' failed on 1 by 1 matrices, Fixed.1.5-1* The stability of the fitting methods had become substantially greaterthan the stability of the edf calculations after fitting. So it waspossible to fit very poor models, and then have non-sensical effectivedegrees of freedom reported. This has been fixed by using much more stableexpressions for edf calculation, when outer iteration smoothnessselection is employed. (Changes are to gam.fit3, gam.outer and a newroutine gam.fit3.post.proc).* edfs in version 1.5-0 were calculated using newton, rather than fisherweights, in the matrix F=(X'WX+S)^{-1}X'WX, the diagonal of which givesthe edf array. The problem with this is that it is possible for X'WXnot to be +ve definite, and then degrees of freedom can be non-sensical.Fisher weights are always used now (although the original problem isexceedingly hard to generate an example of).* The summation convention code could be *very* memory intensive for casesin which the matrix arguments of a smooth feature many repeated values.Code now fixed to make much more efficient use of any repeated rows inmatrix arguments. This enables much larger signal regression problems tobe tackled.* Some help file fixes.1.5-0*** Efficient and general REML/ML smoothing selection implemented.Smoothness selection criterion and numerical optimizer are nowselected using arguments `method' and `optimizer' of `gam', and`gam.method' has been removed.*** To further enhance stability and efficiency, Fisher scoring is nowonly used for canonical links, when it corresponds to full Newton.With non-canonical links PIRLS is based on full Newton.** Derivative iteration as in Wood (2008) has been replaced by a directimplicit function method (which costs no more given Newton basedPIRLS).** An option `select' has been added to `gam' to allow terms to becompletely removed from a model by smoothness selection.** The shrinkage smoothers "cs" and "ts" have been modifiedsubstantially. The Wood (2006, 4.1.6) proposal of adding asmall multiple of the identity matrix to the penalty matrixis flawed in that it tends to corrupt small eigen valuesof the penalty matrix for large (dimension) penalty matrices.It is much better to set the zero eigenvalues of the penalty matrixto a small proportion of the smallest +ve eigenvalue, and touse the matrix with the resulting eigen-decomposition as thepenalty. This is now done. Thanks to Roman Torgovitsky forreporting the original problem.** Tweedie family added (including `ldTweedie' function to evaluatelog Tweedie densities for powers in (1,2]).* "ps" "cp" and "cc" smooths can now be supplied with 2 knots to betreated as `endpoints' of the smooths (full set of knots can stillbe supplied as before).* The `newton' optimizer was dropping terms when their gradient wasbelow the convergence threshold (and allowing re-entry). Thispromotes zig-zagging unless the terms are independent. Now onlydrops terms if gradient and second derivative are very small(so obective is really flat).* The adaptive smoothing "ad" class has been greatly simplified and 2Dpenalty improved. Much faster as a result, and 2D adaptive actuallyquite good.* gam.fit3 now checks that the initial PIRLS step produces animprovement in penalized deviance relative to a null model. If notthen step halving towards the null model parameter is employed.The null model is as close to constant predicted values as the modelstructure allows (it is estimated up front in estimate.gam, to savecomputation).* `gam.side' now takes account of whether the model has an intercept(or the model model matrix column corresponding to an intercept isin the column space of the model matrix of the parametric modelcomponents).* The smoothing parameter array returned by `gam' now includes namesfor the smoothing parameters.* s and te check that `id' is a single element.* By default, partial residuals are no longer plotted for smooths with`by' variables since they are usually meaningless here (they canbe re-instated by argument `by.resids').* `min.sp' processing modified to work with `paraPen' argument to`gam'.* vcov.gam defaults to Bayesian covariance matrix.* indexing error in `parametricPenalty' corrected.* plot.gam modified so that page change behaviour is like plot.glm* negbin family upgraded to work with (RE)ML.* `sp.vcov' function added to extract covariance matrix of logsmoothing parameters from (RE)ML based fits.* `power' links now handled by default fitting methods (i.e. gam.fit3)* `magic.post.proc' now expects weights, not sqrt(weights) as the`w' argument (unless `w' is a matrix).* p-values tweaked again, for slightly better performance with smooths ofseveral variables. Still not quite right.* record of intial sp's is now carried in `smooth' objects in field`sp'.* ?linear.functional.term error fix.* memory leak in magic.c:magic fixed --- all fixed smoothingparameters lead to 2 arrays being left unfreed.* various .Rd file fixes.1.4-2* Some minor .Rd file fixes1.4-1* `Predict.matrix2' was not in NAMESPACE: fixed.* term specific offsets handled properly w.r.t. `by' variables in`smoothCon' (a rather specialized topic!)* minor doc bug fix for `smooth.construct'.1.4-0*** Model terms can now include linear functionals of smooths, bysupplying matrix arguments and matrix `by' variables to modelsmooth terms. This allows, for example, a model to depend on theintegral of a smooth function, or its derivative, or for models todepend on functional predictors. See ?linear.functional.terms. Maincode changes are in `smoothCon' and `predMat'.** Smooth terms can now be linked in order that they have the samesmoothing parameters (and, by default, bases). Linkage is specifiedusing the `id' argument to `s' or `te'. Terms with the same `id' valuewill have the same smoothing parameter(s).** `by' variables can now be factor variables. Also smooth terms with a`by' variable are only subject to a sum-to-zero constraint if itis needed for identifiability.** Argument `paraPen' of `gam' allows (multiple) penalization ofparametric model terms. This allows `gam' to fit any model thatcan be expressed as a penalized GLM.** p-values returned by `summary.gam' now default to a Bayesianapproximation which gives (substantially) better frequentist behaviourthan the old method.** The 2 standard error bands for smooths shown by `plot.gam' can nowinclude the uncertainty about the overall mean, by default. Suchintervals have better coverage probability (of their target ofinference) than intervals for centred smooths. Argument`type="iterms"' to `predict.gam' will return such standard errors.** An adaptive smoother class has been added, for smoothing with respectto one or two variables: invoked with `s(...,bs="ad",...).** `gamm' now supports nested smooth terms, and uses the same, constraintabsorbed, parameterization as `gam'.** `s' and `te' terms accept an `sp' argument setting the term specificsmoothing parameters (and over-riding argument `sp' of `gam'). Ignoredby `gamm'.** Negative binomial handling changed. `negbin' family added: adapted fromMASS to work with gam outer iteration fitting. `gam.negbin' fittingroutine added in order to enable use of `negbin' with outer iteration.See ?negbin for details. MASS families no longer supported.`nb.theta.mult' removed from `gam.control'.** The Eilers and Marx style p-spline class is now one of the defaultsmoothing classes, rather than just being an example of how to set upa class in the help file. cyclic versions are also available.** `smoothCon' now handles `by' variables and centering constraintsautomatically, removing the need for smooth constructors to do so.`PredMat' handles `by' variables automatically. Users can over-ridethis behaviour when adding smooth classes, if needed - seedocumentation.** The interface for adding user defined smooths has been simplified,but this may mean that some user defined classes which worked beforeno longer work: see ?user.defined.smooths* `smooth.construct' methods are now expected to set default valuesfor the penalty order `p.order' and the basis dimension `bs.dim'if none are supplied. They should also sanity check suppliedvalues. Previously this was done by `s', but this put unhelpfulrestrictions on new smooth classes.* `smooth.construct' now expects to recieve `data' and `knots' argumentswith names corresponding exactly to `object$term'. In addition `data'should contain only what is required by `object$term' + a final columncontaining a `by' variable, if present. Predict.mat expects the same ofits `data' argument. wrapper functions smooth.construct2 andPredict.mat2 will accept a data frame containing any number of variables-- all that is required is that `object$terms' can be evaluated usingit. These functions handle repeat rows in matrix arguments efficiently.* bug fix in `plot.gam' -- no longer requires to hit return if `select'used (ever).* bug fix in `fixDependence' --- a completely dependent `X2' would notbe detected, since the first element of R2 would be zero: used firstelement of R1 to set scale instead.* `gam.fit' passes corrected n to `magic' so that `n' used in gcv/ubredoes not include obs with zero prior weight. `gam.fit3' already doingthis...* `magic' and `gam.fit3' now allow log smoothing parameters to be alinear transformation of a smaller set of underlying smoothing parameters.* `mgcv' based fitting has been removed as an option in `gam', as hasPearson based GCV. In consequence `am' argument removed from`gam.method' and `globit' removed from `gam.control'.* `get.var' now coerces matrix values to numeric vectors, to facilitatethe handling of linear functionals of smooths.* `gam.fit2' has been removed, since gam.fit3 is simply better.* The default optimizer for the generalized case has been made slightlymore efficient (derivative free evaluation of GCV/AIC has beenimproved). The upshot is that the default is now faster than performanceiteration in almost all cases (while still being more reliable).* the `absorb.cons' option has been removed from `gam.control'.* `fix.family.link' and `fix.family.var' bug fix --- only returnfamily unmodified if all required derivative functions are present.* `smoothCon' now returns a list of smooth objects to facilitate factor`by' variables.* `smoothCon' makes smooth object labels more informative, if there are`by' variables... this also makes default plots more informative.* `plot.gam' indicates `by' variables in labels* `gamm.setup' modified to call `gam.setup' for most of the setup, leavingjust the re-parameterization step to do.* `gamm' modified to allow constraint absorption (same as `gam')* `gamm' bug fixed whereby "cc" smooths would get the wrong null spacedimension (effect was small, but noticeable, in practice e.g. Cairotemperature example from chapter 6 of Wood, 2006, book).* print methods now return first argument invisibly as they should.* code for (very) old style summary removed.* `gam.fit3' now traps derivative iteration divergence, and suggeststightening the convergence tolerance `epsilon' in `gam.control'.Divergence can happen for ill-conditioned models if the PIRLS hasnot converged sufficiently.* gamm.Rd updated to reflect change to gammPQL in 1.3-28.1.3-31* There was a most annoying warning generated by R 2.7.0 every time `gam'was used. Now there isn't.1.3-30* change to DESCRIPTION file.1.3-29* `magic' could segfault if supplied with many constraints and relativelyhigh rank penalties, so that after constriant the penalty matrixsquare roots had more columns than rows (never happened in additivemodel case, but can happen in more general settings). Fixed.* `gamm' now silently drops grouping factors within the correlationstructure formulae that duplicate random effects grouping factors(which automatically act as grouping factors on the correlationstructures anyway).* Some replacement of dubious `as.matrix' calls with use of `,drop=FALSE]'in gamm.r1.3-28** `gamm' modified to call a routine `gammPQL' in place of MASS::glmmPQL.This avoids some duplication, and facilitates maintainance.* Bug fix in `formXtViX' where matrix dimensions got dropped whensubsetting thereby messing up variance calculations for gamm fits inwhich some group sizes were 1.1.3-27** Fix of nasty bug in large dataset handling with "tp" basis (introducedin 1.3-26). Subsampling code was re-seeding RNG instead of intendedbehaviour of saving RNG state and restoring it. Fixed and tested.1.3-26* modification to `gam' so that GCV/UBRE scores reported with all fixedsmoothing parameters are consistent with equivalent under s.p.estimation.* gam.fit3 modified to test for convergence of coefficients as wellas penalized deviance, otherwise in extreme cases the derivativeiterations can diverge.* modifications of gam.setup, predict.gam and plot.gam to allow smoothsto contribute an offset term to the model (offset is returned fromsmooth.construct or Predict.matrix as an "offset" attribute ofmodel/prediction matrix). This is useful for smooths which have knownboundary 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. Ifthere are more that 3000 unique covariate combinations for a tprs then3000 combinations are randomly sub-sampled, and used as the initialknots for tprs basis construction. The same random number seed is usedevery time, (R's RNG state is unaltered by this). Control of this isusually 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 cancontain extra information to pass to the basis constructors for smooths.* removal of `full.call' from smooth.spec objects - it wasn't usedanywhere any more, and is a pain to maintain.* removal of `full.formula' from the `gam' object - it is no longer usedanywhere and requires alot of code to construct.1.3-25* A bug in `null.space.dimension' caused prediction to fail for `s' termsof 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 routinesdetect 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 conditionsas other bases (sum to zero over covariates, rather than parameterssum to zero). This makes centred confidence intervals for smooths, ofthe sort used in plot.gam, behave in a similar way for all bases. Withthe old "cr" centering constraint there could be high negativecorrelation 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 couldcause the divergence control loop to fail: the divergence control loopwas asking for near strict decrease in the penalized deviance, whichcould be numerically impossible to achieve if the algorithm had actuallyconverged completely.... fixed.* minor doc bug fixes.1.3-22* Cheap but unneccesary code added to gdi.c and magic.c to stopinappropriate uninitialized variable warnings from some compilers.** Bad bug in gam.fit3 fixed. Prior weights of zero were not handledcorrectly - prior weight vector should have been subsetted beforegdi call, but this didn't happen. Result was infinite derivativesand fit failure. fixed.* Related bug in gam.fit3: dropped observations not handled correctlyin deviance calculation, which can result in inappropriate stephalving. fixed.* inner loop 3 in gam.fit2 and gam.fit3 modified so that step halvingcontinues 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 estimationwith neagative binomial. fixed.* Theta estimate added to family object of fitted gam if negative binomialused...* extract.lme.cov(2) modified to allow use with single level groupingfactors (not really sure when this is useful)* bug in gam4objective called when using gam.method(outer="nlm") - neverused GCV.* fixed bug in `newton' whereby immediate convergence actually causedroutine to fail.* modified `smoothCon' and `predictMat' so that `qrc' attribute alwayscreated if constraint absorption used, even if there are no constraints.This attribute can then be used to test that there are no unabsorbedconstraints (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 stepto max component 1, rather than `maxNstep'.* Some documentation fixes1.3-19*** SUBSTANTIAL CHANGE: Improved outer iteration added via gdi.c coupledwith gam.fit3. Exact first and second derivatives of GACV/GCV/UBRE/AICare now available via new iteration methods. These improve thespeed and reliability of fitting in the *generalized* additive modelcase.* numerous changes to NAMESPACE and gamm related functions to passcodetools checks.** gam.method() modified to allow GACV as an option for outer GCVmodel selection.* magic.c::mgcv_mmult modified so that all inner loop calculations areoptimal (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 andgam.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 ofsmoothing parameters when using `outer' iteration in the generalizedcase. This can speed up analyses that rely on several refits of the samemodel.1.3-18* gamm modifed so that weights dealt with properly if lme type varFuncused. This is only possible in the non-generalized case, as gamm.Rdnow clarifies.* slight modification to s() to add `width.cutoff=500' to `deparse'* by variables not handled properly in p-spline example insmooth.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 reparameterizationcan destabilize tensor products.1.3-17* print.summary.gam prints estimated ranks more prettily (thanks MartinMaechler)** `fix.family.link' can now handle the `cauchit' link, and also appends athird derivative of link function to the family (not yet used).* `fix.family.var' now adds a second derivative of the link function tothe family (not yet used).** `magic' modified to (i) accept an argument `rss.extra' which is addedto the RSS(squared norm) term in the GCV/UBRE or scale calculation; (ii)accept argument `n.score' (defaults to number of data), the number touse in place of the number of data in the GCV/UBRE calculation.These are useful for dealing with very large data sets usingpseudo-model approaches.* `trans' and `shift' arguments added to `plot.gam': allows, e.g. singlesmooth models to be easily plotted on uncentred response scale.* Some .Rd bug fixes.** Addition of choose.k.Rd helpfile, including example code for diagnosingoverly 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 +vedefinite. `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 routineactually used: dsyevd is the routine used previously, and seems veryreliable. dsyevr is the faster, smaller more modern version, which itseems possible to break... rest of code still calls dsyevd.* Symbol registration added (thanks largely to Brian Ripley). Versiondepends on R >= 2.3.01.3-13* some doc changes** The p-values for smooth terms had too low power sometimes. Modifiedtesting procedure so that testing rank is at mostceiling(2*edf.for.term). This gives quite close to uniform p-valuedistributions when the null is true, in simulations, without excessiveinflation of the p-values, relative to parametetric equivalents whenit is not. Still not really satisfactory.1.3-12* vis.gam could fail if the original model formula contained functions ofcovariates, since vis.gam calls predict.gam with a newdata argumentbased on the *model frame* of the model object. predict.gam nowrecognises that this has happened and doesn't fail if newdata is a modelframe which contains, e.g. log(x) rather than x itself. offset handlingsimplified as a result.* prediction from te smooths could fail because of a bug in handling thelist of re-parameterization matrices for 1-D terms inPredict.matrix.tensor.smooth. Fixed. (tensor product docs also updated)* gamm did not handle s(...,fx=TRUE) terms properly, due to severalfailures to count s(...,fx=FALSE) terms properly if there were fixedterms 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 inhandling the results of the two alternatives).1.3-11* added package doc file* added French error message support (thanks to Philippe Grosjean), anderror message quotation characters (thanks to Brian Ripley.)1.3-10* a `constant' attribute has been added to the object returned bypredict.gam(...,type="terms"), although what is returned is still not anexact 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 opposedto dropping rows of newdata containing NA's.* interpret.gam had a bug caused by a glitch in the terms.objectdocumentation (R <=2.2.0). Formulae such as y ~ a + b:a + s(x) couldcause failure. This was because attr(tf,"specials") is documented asreturning indices of specials in `terms'. It doesn't, it indexesspecials 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 ofmode `numeric': now coerced to numeric at appropriate times in smoothconstructors.1.3-9* constants multiplying TPRS basis functions were `unconventional' for dodd in function eta() in tprs.c. The constants are immaterial if you areusing gam, gamm etc, but matter if you are trying to get out theexplicit representation of a TPRS term yourself (e.g. to differentiatea smooth exactly).1.3-8* get.var() now checks that result is numeric or factor (avoidsoccasional problems with variable names that are functions - e.g `t')* fix.family.var and fix.family.link now pass through unaltered any familyalready containing the extra derivative functions. Usually, to make afamily work with gam.fit2 it is only necessary to add a dvar function.* defaults modified so that when using outer iteration, several performanceiteration steps are now used for initialization of smoothing parametersetc. The number is controlled by gam.control(outerPIsteps). This tendsto 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, butthis 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 changingsmoothing 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' nowdepends on nlme_3.1-64 or above.* improvement of the algorithm in `initial.sp'. Previously it was possiblefor very low rank smoothers (e.g. k=3) to cause the initialization tofail, because of poor handling of unpenalized parameters.1.3-6* pdIdnot class changed so that parameters are variances not standarddeviations - this makes for greater consistency with pdTens class, andmeans that limits on notLog2 parameterization should mean the same thingfor both classes.** niterEM set to 0 in lme calls. This is because EM steps in lme are notset up to deal properly with user defined pdMat classes (latterconfirmed by DB).1.3-5** Improvements to anova and summary functions by Henric Nilssonincorporated. Functions are now closer to glm equivalents, andprinting is more informative. See ?anova.gam and ?summary.gam.* nlme 3.1-62 changed the optimizer underlying lme, so that indefintielikelihoods cause problems. See ?logExp2 for the workaround.- niterEM now reset to 25, since parameterization prevents parameterswandering to +/- infinity (this is important as starting values forNewton steps are now more critical, since reparameterizationintroduces new local minima).** smoothCon modified to rescale penalty coefficient matrices to havesimilar `size' to X'X for each term. This is to try and ensure thatgamm is reasonably scale invariant in its behaviour, given thelogExp2 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 fixes30/6/2005 1.3-3* te() smooths were not always estimated correctly by gamm(): invariancelost and different results to equivalent s() smooths. The problem seemsto lie in a sensitivity of lme() estimation to the absolute size of the`S' attribute matrices of a pdTens class pdMat object: the problem didnot occur at the last revision of the pdTens class, and there are nochanges logged for nlme that could have caused it, so I guess it's downto a change in something that lme calls in the base distribution.To avoid the problem, smooth.construct.tensor.smooth.spec has beenmodified to scale all marginal penalty matrices so that they havelargest singular value 1.* Changes to GLMs in R 2.1.1 mean that if the response is an array, gamcould fail, due to failure of terms like w * X when w is and arrayrather than a vector. Code modified accordingly.* Outer iteration now suppresses some warnings, until the final fittedmodel is obtained, in order to avoid printing warnings that actuallydon't apply to the final fit.* Version number reporting made (hopefully) more robust.* pdconstruct.pdTens removed absolute lower limit on coef - replaced withrelative lower limit.* moved tensor product constraint construction to BEFORE by variablestuff in smooth.construct.tensor.smooth.spec.1.3-1* vcov had been left out of namespace - fixed.* cr and cc smooths now trap the case in which the incorrect number ofknots are supplied to them.* `s(.)' in a formula could cause a segfault, it get's trapped now,hopefully it will be handled nicely at some point in the future. ThanksMartin Maechler.* wrong n reported in summary.gam() in the generalized case - fixed.Thanks YK Chau.1.3-0*** The GCV/UBRE score used in the generalized case when fitting byouter iteration (the default) in version 1.2 was based on the Pearsonstatistic. It is prone to serious undersmoothing, particularly of binarydata. The default is now to use a GCV/UBRE score based on the deviance:this performs much better, while still maintaining the enhancednumerical convergence performance of outer iteration.* The Pearson based scores are still available as an option (see?gam.method)* For the known scale parameter case the default UBRE score is nowjust a linearly rescaled AIC criterion.1.2-6* Two bugs in smooth.sconstruct.tensor.smooth.spec: (i) incorrecttesting of class of smooth before re-parameterizing, so that cr smoothswere re-parameterized, when there is no need to; (ii) knots used inre-parameterization were based on quantiles of the relevant marginalcovariate, which meant that repeated knots could be generated: now usesquantiles of unique covariate values.* Thanks to Henric Nilsson a bug in the documentation of magic.post.proc hasbeen fixed.1.2-5** Bug fix in gam.fit2: prior weights not subsetted for non-informativedata in GCV/UBRE calculation. Also plot.gam modified to allow forconsequent NA working residuals. Thanks to B. Stollenwerk for reportingthis bug.** vcov.gam written by Henric Nilsson included... see ?vcov.gam* Some minor documentation fixes.* Some tweaking of tolerances for outer iteration (was too lax).** Modification of the way predict.gam picks up variables.(complication is that it should behave like other predict functions, butwarn if an incomplete prediction data frame is supplied -since latterviolates what white book says).1.2-2*** An alternative approach to GCV/UBRE optimization in the*generalized* additive model case has been implemented. It leads to morereliable convergence for models with concurvity problems, but is slowerthan the old default `performance iteration'. Basically the GAM IRLSprocess is iterated to convergence for each trial set of smoothingparameters, and the derivatives of the GCV/UBRE score w.r.t. smoothingparameters are calculated explicitly as part of the IRLS iteration. Thismeans that the GCV/UBRE optimization is now `outer' to the IRLSiteration, rather than being performed on each working model of the IRLSiteration. The faster `performance iteration' is still available as anoption. As a side effect, when using outer iteration, it is not possibleto find smoothing parameters that marginally improve on the GCV/UBREscores of the estimated ones by hand tuning: this improves the logicalself consistency of using GCV/UBRE scores for model selection purposes.* To facilitate the expanded list of fitting methods, `gam' now has a`method' argument requiring a 3 item list, specifying which method touse for additive models, which for generalized additive models and if usingouter iteration, which optimization routine to use. See ?gam.method fordetails. `gam.control' has also been modified accordingly.*** By default all smoothing bases are now automaticallyre-parameterized to absorb centering constraints on smooths into thebasis. This makes everything more modular, and is usually usertransparent. See ?gam.control to get the old behaviour.** Tensor product smooths (te) now use a reparameterization of themarginal smoothing bases, which ensures that the penalties of a tensorproduct smooth retain the interpretation, in terms of function shape, ofthe marginal penalties from which they are induced. In practice thisalmost always improves MSE performance (at least for smooth underlyingfunctions.) See ?te to turn this off.*** P-values reported by anova.gam and summary.gam are now based onstrictly frequentist calculations. This means that they are much betterjustified theoretically, and are interpretable as ordinary frequentistp-values. They are still conditional on smoothing parameters, however,and are hence underestimates when smoothing parameters have beenestimated.** Identifiability side conditions modified to work with all smooths(including user defined). Now works by identifying possible dependenciessymbolically, but dealing with the resulting degeneracies numerically.This allows full ANOVA decompositions of functions using tensor productsmooths, for example.* summary.gam modified to deal with prior weights in adjusted r^2calculation.** `gam' object now contains `Ve' the frequentist covariance matrix ofthe paremeter estimators, which is useful for p-value calculation. see?gamObject and ?magic.post.proc for details.* Now depends on R >=2.0.0* Default residual plots modified in `gam.check'** Added `cooks.distance.gam' function.* Bug whereby te smooths ignored `by' variables is now fixed.1.1-6* Smoothing parameter initialization method changed in magic, to allowbetter initialization of te() terms. This affects default gam fits.* gamm and extract.lme.cov2 modified to work correctly when thecorrelation structure applies to a finer grouping than the randomeffects. (Example of this added to gamm help file)* modifications of pdTens class. pdFactor.pdTens now returns a vector,not a matrix in accordance with documentation (in nlme 3.1-52). Factorsare now always of form A=B'B (previously, could be A=BB') in accordancewith documentation (nlme 3.1-52). pdConstruct.pdTens now tests whetherinitializing matrix is proportional to r.e. cov matrix or its inverseand initializes appropriately. gamm fitting with te() class testedextensively with modifications and nlme 3.1-52, and lme fits with pdTensclass tested against equivalent fits made using re-parameterization andpdIdent class. In particular for gamm testing : model fits with singleargument te() terms now match their equivalent models using s() terms;models fitted using gam() and gamm() match if gam() is called with thegamm() estimated smoothing parameters.* modifications of gamm() for compatibility with nlme 3.1-52: inparticular a work around to allow everything to work correctly with aconstructed formula object in lme call.* some modifications of plot.gam to allow greater control ofappearance of plots of smooths of 2 variables.* added argument `offset' to gam for further compatibility withglm/lm.* change to safe prediction for parameteric terms had a bug in offsethandling (offset not picked up if no newdata supplied, since model framenot created in this case). Fixed. (thanks to Jim Young for this) 1.1-5* predict.gam had a further bug introduced with parametric safeprediction. Fixed by using a formula only containing the actual variablenames when collecting data for prediction (i.e. no terms like`offset(x)')1.1-5* partial argument matching made col.shade be matched by col passed in..in plot.gam, taking away user control of colors. 1.1-5* 2d smooth plotting in plot.gam modified.* plot.gam could fail with residuals=TRUE due to incorrect counting inthe code allowing use of termplot. plot.gam failed to prompt before anewpage if there was only one smooth. gam and gamm .Rd files updatedslightly.1.1-3* extract.lme.cov2 could fail for random effect group sizes of 1because submatrices with only a row or column lose their dimensions, andbecause single number calls to diag() result in an identity matrix.1.1-2* Some model formulae constructed in interpret.gam and used infacilitating safe prediction for parametric terms had the wrongenvironment - this could cause gam to fail to find data when e.g. lm,would find it. (thanks Thomas Maiwald)* Some items were missing from the NAMESPACE file. (thanks KurtHornik)* A very simple formula.gam function added, purely to facilitatebetter printing of anova method results under R 2.0.0.1.1-1* Due, no doubt, to gross moral turpitude on the part of the author,gamm() calculated the complete estimated covariance matrix of theresponse data explicitly, despite the fact that this matrix is usually rathersparse. For large datasets this could easily require more memory thanwas available, and huge computational expense to find the choleskidecomposition of the matrix. This has now been rectified: when thecovariance matrix has diagonal or block diagonal structure, then this isexploited.* Better examples have been added to gamm().* Some documentation bugs were fixed.1.1-0Main changes are as follows. Note that `gam' object has been modified, soold objects will not always work with version 1.1 functions.** Two new smooth classes "cs" and "ts": these are like "cr" and "tp"but can be penalized all the way down to zero degrees of freedom toallow fully automatic model selection (more self consistent than having astep.gam function).* The gam object expanded to allow inheritance from type lm and typeglm, although QR related components of glm and lm are not availablebecause of the difference in fitting method between glm/lm and gam.** An anova method for gam objects has been added, for *approximate*hypothesis testing with GAMs.** logLik.gam added (logLik.glm with df's fixed): enables AIC() to beused with gam objects.** plot.gam modified to allow plotting of order 1 parametric terms viacall to termplot.* Thanks to Henric Nilsson option `shade' added to plot.gam* predict.gam modified to allow safe prediction of parametric modelcomponents (such as poly() terms).* predict.gam type="terms" now works like predict.glm for parametriccomponents. (also some enhancements to facilitate calling fromtermplot())* Range of smoothing parameter estimation iteration methods expandedto help with non-convergent cases --- see ?gam.convergence* monotonic smoothing examples modified in light of above changes.* gamm modified to allow offset terms.* gamm bug fixed whereby terms in a model formula could get lost ifthere were too many of them.* gamm object modified in light of changes to gam object.1.0-7* Allows a model frame to be passed as `newdata' to predict.gam: itmust contain all the terms in the gam objects model frame, `model'.* vis.gam() now passes a model frame to predict.gam and should be morerobust as a result. `view' and `cond' must contain names from`names(x$model)' where x is the gam object.1.0-6/5/4* partial residuals modified to be IRLS residuals, weighted by IRLSweights. This is a much better reflecton of the influence of residualsthan the raw IRLS residuals used before.* gamm summary sorted out by using NextMethod to get around fact thatsummary.pdMat can't be called directly (not in nlme namespace exports).* niterPQL and verbosePQL arguments added to gamm to allow morecontrol of PQL iteration.* backquote=TRUE added when deparsing to allow non-standard names.(thanks: Brian Ripley)* bug in gam corrected: now gives correct null deviance when an offsetis present. (thanks: Louise Burt)* bug in smooth.construct.tp.smooth.spec corrected: k=2 caused asegfault as the C code was reseting k to 3 (actually null spacedimension +1), and not enough space was being allocated in R to handlethe resultng returned objects. k reset in R code, with warning. (Thanks:Jari Oksanen)* predict.gam() now has "standard" data searching using a model framebased on a fake formula produced from full.formula in the fitted object.However it also warns if newdata is present but incomplete. This meansthat if newdata does not meet White book specifications, you get awarning, but the function behaves like predict.lm etc. predict.gam hadbeen segfaulting if variables were missing from newdata (Thanks: AndyLiaw and BR)* contour option added to vis.gam* te smooths can be forced to use only a single penalty (theoreticalinterest only - not recommended for practical use)1.0-3* Fixes bugs in handling graphics parameters in plot.gam()* Adds option of partial residuals to plot.gam()1.0-2/1* Fixes a bug in evaluating variables of smooths, knots and by-variables.1.0-0*** Tensor product smooths - any bases available via s() terms in a gamformula can be used as the basis for tensor product smooths of multiplecovariates. A separate wiggliness penalty and smoothing parameter isassociated with each `marginal' basis.** Cyclic smoothers: penalized cubic regression splines which have thesame value and first two derivatives at their first and last knots.*** An object oriented approach to handling smooth terms which allowsthe user to add their own smooths. Smooth terms are constructed usingsmooth.construct method functions, while predictions from individualsmooth terms are handled by predict.matrix method functions.** p-splines implemented as the illustrative example for the above inthe help files.*** A generalized additive mixed model function gamm() with estimationvia lme() in the normal-identity case and glmmPQL() otherwise. The mainaim of the function is to allow a defensible way of modelling correlatederror structures while using a GAM.* The gam object itself has changed to facilitate the above. Mostinformation pertaining to smooth terms is now stored in a list of smoothobjects, whose classes depend on the bases used. The objects are notback compatible, and neither are the new method functions. This has been donein an attempt to minimize the scope for bugs, given the amount of timeavailable for maintenance.** s() no longer supports old stlye (version <0.6) specification ofsmooths (e.g. s(x,10|f)). This is in order to reduce the scope forproblems with user defined smooth classes.* The mgcv() function now has an argument list more similar to magic().* Function GAMsetup() has been removed.* I've made a general attempt to make the R code a bit less like asimultaneous translation from C.0.9-5/4/3/2/1* Mixtures of fixed degree of freedom and estimated degree of freedomsmooths did not work correctly with the perf.iter=FALSE option. Fixed.* fx=TRUE not handled correctly by fit.method="magic": fixed.* some fixes to GAMsetup and gam documentation.* call re-instated to the fitted gam object to allow updating* -Wall and -pedantic removed from Makevars as they are gcc specific.* isolated call to Stop() replaced by call to stop()!0.9-0*** There is a new underlying smoothing parameter selection method,based on pivoted QR decomposition and SVD methods implemented in LAPACK.The method is more stable than the Wood (2000) method and allows theuser to fix some smoothing parameters while estimating others,regularize the GAM fit in non-convergent cases and put lower bounds onsmoothing parameters. The new method can deal with rank deficientproblems, for example if there is a lack of identifiability between theparametric and smooth parts of the model. See ?magic for fuller details.The old method is still available, but gam() defaults to the new method.* Note that the new method calls LAPACK routines directly, which meansthat the package now depends on external linear algebra libraries,rather than relying entirely on my linear algebra routines. This is agood thing in terms of numerical robustness and speed, but does meanthat to install the package from source you need a BLAS library installedand accesible to the linker. If you sucessfully installed R by buildingfrom source then you should have no problem: you have everything alreadyinstalled, but occasionally users may have to install ATLAS in order toinstall from source.* Negative binomial GAMs now use the families supplied by the MASS libraryand employ a fast integrated GCV based method for estiamting thenegative binomial parameter. See ?gam.neg.bin for details. The newmethod seems to converge slightly more often than the old method, anddoes so more quickly.* persp.gam() has been replaced by a new routine vis.gam() which isprettier, simpler and deals better with factor covariates and at allwith `by' variables.* NA's can now be handled properly in a manner consistent with lm()and glm() [thanks to Brian Ripley for pointing me in the right directionhere] and there is some internal tidying of GAM so that it's behaviousis more similar to glm() and lm().* Users can now choose to `polish' gam model fits by adding an nlm()based optimization after the usual Gu (2002) style `power iteration' tofind smoothing parameters. This second stage will typically result in aslightly lower final GCV/UBRE score than the defualt method, but is muchslower. See ?gam.control for more information.* The option to add a ridge penalty to the GAM fitting objective has beenadded to help deal with some convergence issues that occur when thelinear predictor is essentially un-identifiable. see ?gam.control.0.8-7* There was a bug in the calculation of identifiability side conditionsthat could lead to over constraint of smooths using `by' variables inmodels with mixtures of smooths of different numbers of variables. Thishas been fixed.0.8-6* Fixes a bug which occured with user supplied smoothing parameters, inwhich the weight vector was omitted from part of the influence (hat)matrix calculation. This could result in non-sensical varianceestimates.* Stronger consistency checks introduced on estimated degrees of freedom.0.8-5* mgcv was using Machine() which is deprecated from R 1.6.0, thisversion uses .Machine instead.0.8-4* There was a memory bug which could occur with the "cr" basis, inwhich un-allocated memory was written to in the tps_g() routine in thecompiled C code - this occured when that routine was asked to clean upits memory, when there was nothing to clean up. Thanks to Luke Tierney forfinding this problem and locating it to tps_g()!* A very minor memory leak which occured when knots are used to starta tps basis was fixed.0.8-3* Elements on leading diagonal of Hat/Influence matrix are nowreturned in gam object.* Over-zealous error trap introduced at 0.8-2, caused failure withsmoothless models.0.8-2* User can now supply smoothing parameters for all smooth terms (can'thave a mixture of supplied and estimated smoothing parameters). Featureis useful if e.g. GCV/UBRE fails to produce sensible estimates.* svd() replaced by La.svd() in summary.gam().* a bug in the Lanczos iteration code meant that smooths behavedpoorly if the smooth had exactly one less degree of freedom than thenumber of data (the wrong eigenvectors were retained in this case) -this was a rather rare bug in practice!* pcls() was not using sensible tolerances and svdroot() was usingtolerances incorrectly, leading to problems with pcls(), now fixed.* prior weights were missing from the pearson residuals.* Faulty by variable documentation fixed (have lost name of person wholet me know this, but thanks!)* Scale factor removed from Pearson residual calculation forconsistancy with a higher proportion of authors.* The proportion deviance explained has been added to summary.gam() asa better measure than r-squared in most cases.* Routine SANtest() has been removed (obsolete).* A bug in the select option of plot.gam has been fixed.0.8-1* The GCV/UBRE score can develop phantom minima for some models: theseare minima in the score for the IRLS problem which suggest largeparameter changes, but which disappear if those large changes areactually made. This problem occurs in some logistic regression models.To aid convergence in such cases, gam.fit now switches to a cautiousmgcv optimization method if convergence has not been obtained in a userdefined number of iterations. The cautious mode selects the localminimum of the GCV/UBRE closest to the previous minimum if multipleminima are present. See gam.control for details about controllingiterations.* Option trace in gam.control now prints and plots more usefulinformation for diagnosing convergence problems.* The one explicit formation of an inverse in the underlying multipleGCV optimization has been replaced with something more stable (andquicker).* A bug in the calculation of side conditions has been fixed - thiscaused a failure with models having parametric terms and terms like:s(x)+s(z)+s(z,x).* A bug whereby predict.gam simply failed to pick up offset terms hasbeen fixed.* gam() now drops unused levels in factors.* A bug in the conversion of svd convergence criteria between version0.7-2 and 0.8-0 has been fixed.* Memory leaks have been removed from the C code (thanks to the superbdmalloc library).* A bug that caused an undignified exit when 1-d smoothing with fullsplines in 0.8-0 has been fixed.0.8-0* There was a problem on some platforms resulting from the defaultcompiler optimizations used by R. Specifically: floating point registerscan be used to store local variables. If the register is larger than adouble (as is the case for Intel 486 and up), this means that:double a,b;a=b;if (a==b)can evaluate as FALSE. The mgcv source code assumed that this couldnever happen (it wouldn't under strict ieee fp compliance, for example).As a result, for some models using the package compiled using somecompiler versions, the one dimensional "overall" smoothing parametersearch could fail, resulting in convergence failure, or undersmoothing.The Windows version from CRAN was OK, but versions installed under Linuxcould have problems. Version 0.8 does not make the problematicassumption.* The search for the optimal overall smoothing parameter has beenimproved, providing better protection against local minima in theGCV/UBRE score.* Extra GCV/UBRE diagnostics are provided, along with a functiongam.check() for checking them.* It is now possible for the user to supply "knots" to be used whenproducing the t.p.r.s. basis, or for the cubic regression spline basis.This makes it feasible to work with very large datasets using theof the data. It also provides a mechanism for obtaining purely "knotbased" thin plate regression splines.* A new mechanism is provided for allowing a smooth term to bemultiplied by a covariate within the model. Such "by" variables allowsmooths to be conditional on factors, for example.* Formulae such as y~s(x)+s(z)+s(x,z) can now be used.* The package now reports the UBRE score of a fitted model if UBRE wasused for smoothing parameter selection, and the GCV score otherwise.* A new help page gam.models has been added.* A bug whereby offsets in model formulae only worked if they were atthe end of the formulae has been fixed.* A bug whereby weights could not be supplied in the model data framehas been fixed.* gam.fit has been upgraded using the R 1.5.0 version of glm.fit* An error in the documentaion of xp in the gam object has been fixed,in addition to numerous other changes to the documentation.* The scoping rules employed by gam() have been brought into line withlm() and glm by searching for variables in the environment of the modelformula rather than in the environment from which gam() was called -usually these are the same, but not always.* A bug in persp.gam() has been fixed, whereby slice information hadto be supplied in a particular order.* All compiled code calls now specify package mgcv to avoid anypossibility of calling the wrong function.* All examples now set the random number generator seed to facilitatecross platform comparisons.0.7-2* T and F changed to TRUE and FALSE in code and examples.* Minor predict.gam error fixed (didn't get correct fitted values ifcalled without new data and model contained multi-dimensional smooths).0.7-1* There was a somewhat over-zealous warning message in the singlesmoothing parameter selection code - gave a warning everytime that GCVsuggested a smoothing parameter at the boundary of the search interval -even if this GCV function was also flat. Fixed.* The search range for 1-d smoothing parameter selection was too wide- it was possible to give so little weight to the data that numericalproblems caused all parameters to be estimates as zero (along with theedf for the term!). The range has been narrowed to something more sensible[above warning should still be triggered if it is ever too narrow - butthis should not be possible].* summary.gam() documentation extended a bit. p-values for smooths areslightly improved, and an example included that shows the user how tocheck them!0.7-0* The underlying multiple GCV/UBRE optimization method has beenconsidereably strengthened, as follows:o First and second guess starting values for the relativesmoothing parameters have been improved.o Steepest descent is used if either: i) the Hessian of theobjective is not positive definite, or (ii) Steps in the Newton directionfails to improve the GCV/UBRE score after 4 step halvings (since inthis case the quadratic model is clearly poor).o Newton steps are rescaled so that the largest step component(in log relative smoothing parameters) is of size 5 if any stepcomponents are >5. This avoids very large Newton steps that can occurin flat regions of the objective.o All steepest descent steps are initially scaled so that theirlongest component is 1, this avoids long steps into flat regions ofthe objective.o MGCV Convergence diagnostics are returned from routines mgcvand gam.o In gam.fit() smoothing parameters are re-auto-initializedduring IRLS if they have become so far apart that some are likely tobe in flat parts of the GCV/UBRE score.o A bug whereby poor second guesses at relative smoothingparameters could lead to acceptance of the first guess at theseparameters has been removed.o The user is warned if the initial smoothing parameter guessesare not improved upon (can happen legitmately if all s.p.s should bevery high or very low.)The end result of these changes is to make fits from gam much morereliable (particularly when using the tprs basis available from version0.6).* A summary.gam and associated print function are provided. Theseprovide approximate p-values for all model terms.* plot.gam now provides a mechanism for selecting single plots, andallows jittering of rug plots.* A bug that prevented models with no smooth terms from being fittedhas been removed.* A scoping bug in gam.setup has been fixed.* A bug preventing certain mixtures of the bases to be used has beenfixed.* The neg.bin family has been renamed neg.binom to avoid masking afunction in the MASS library.0.6-2revisions from 0.6.1* Relatively important fix in low level numerics. Under some circumstancesthe Lanczos routines used to find the thin plate regression spline basiscould fail to converge or give wrong answers (many thanks to CharlesPaxton for spotting this). The problem was with an insufficiently stableinverse iteration scheme used to find eigenvectors as part of theLanczos scheme. The scheme had been used because it was very fast:unfortuantely stabilizing it is as computationally costly as simplyaccumulating eigen-vectors with the eigen-values - hence the latter hasnow been done. Some further examples also added.0.6-1* Junk files removed from src directory.* 3 C++ style comments removed from tprs.c.0.6-0* Multi-dimesional smoothing is now available, using "thin plateregression splines" (MS submitted). These are based on optimalapproximations to the thin-plate splines.* gam formula syntax upgraded (see ?s ). Old syntax still works, withthe exception that if no df specified then the tprs basis is always usedby default.* plot.gam can now deal with two dimensional smooth terms as well asone dimensional smooths.* persp.gam added to allow user to visualize slices through a gam[Mike Lonergan]* negative binomial family added [Mike Lonergan] - not quite as robustas rest of families though [can have convergence problems].* predict.gam now has an option to return the matrix mapping theparameters to the linear predictor at the supplied covariate values.* Variance calculation has been made more robust.* Routine pcls added, for penalized, linearly constrained optimization(e.g. monotonic splines).* Residual method provided (there was a bug in the default - ThanksCarmen Fernandez).* The cubic regression spline basis behaved wrongly when extrapolating[thanks Sharon Hedley]. This is now fixed.* Tests included to check that there are enough unique covariatecombinations to support the users choise of smoothing basis dimension.* Internal storage improved so that large numbers of zeroes are nolonger stored in arrays of matrices.* Some method argument lists brought into line with the R defaultversions.0.5* There was a bug in gam.fit(). The square roots of the correct iterativeweights were being used in place of the weights: the bug wasapparent because the sum of fitted values didn't always equal the sum ofthe response data when using the canonical link (which it should as aresult of X'f=X'y when canonical link used and unpenalized). The bug hasbeen corrected, and the correction tested. This problem did not affect(unweighted) additive models, only generalized additive models.* There was a bug that caused a crash in the compiled code when there weremore than 8000 datapoints to fit. This has been fixed.* The package now reports its version number when loaded into R.* predict.gam() now returns predictions for the original covariate values(used to fit the model) when called without new data.* predict.gam() now allows type="response" as an argument - returningpredictions on the scale of the response variable.* plot.gam() no-longer defaults to automatic page layout, use argumentpages=1 to get the old default behaviour.* A bug that could cause a crash with the model formula y~s(x)-1 has beenfixed.* Yet more sloppy practices are now allowed for naming variables in modelformulae. e.g. d$y ~ s(d$x) now works, although its not recommended.* The GCV score is now reported by print.gam() (whether or not GCV wasactually used - it isn't the default for Poisson or binomial).* plot.gam() modified to avoid prompting for input when not usedinteractively.0.4* Transformations allowed on lhs of gam formulae .* Argument order same as Splus gam.* Search for data now designed to be like lm() , so you can now be quitesloppy about where your data are.* The above mean that Venables and Ripley examples can be run withouthaving to read the documentation for gam() so carefully!* A bug in the standard error calculations for parametric terms inpredict.gam() is fixed.* A serious bug in the handling of factors was fixed - it was previouslypossible to obtain a rank deficient design matrix when using factors,despite having specified an identifiable model.* Some glitches when dealing with formulae containing offset() and/or I()have been fixed.* Fitting defaults can now be altered using gam.control when calling gam()0.3-3* Documentation updated, including removal of wrong information aboutconstraints and mgcv . Also some readability changes in code and nosmooths are now allowed.0.3-2/1* Allows all ways of specifying a family that glm() allows (previouslyfamily=poisson or family="poisson" would fail). Some more documentationfixes.* 0.2 lost the end of long formulae (because of a difference in the waythat R and Splus deal with formulae). This is now fixed.* A minor error that meant that QT() failed under some versions of Windowsis now fixed.* All package functions now have help(). Also the help files have beenmore carefully checked - version 0.2 actually contained no informationon how to write a GAM formula as a result of a single missing '}' in thehelp file!0.2* Fixed d.f. regression splines allowed as part of gam() modelspecification.* Bug in knot placement algorithm fixed (caused crash with df close tonumber of data).* Replicate covariate values dealt with properly in gam()!* Data search method in gam() revised - now looks in frame from whichgam() called.* plot.gam() can now deal with missing variance estimates gracefully.* Low (1,2) d.f. smooths dealt with gracefully by gam() - no longer causefreeze or crash.* Confidence intervals simulation tested for normal(identity),poisson(log), binomial(logit) and gamma(log) cases. Average coverageprobabilities from 0.89 to 0.97 term by term, 0.93 to 0.96 "across themodel", for nominal 0.95.* R documentation updated and tidied.