Debian Codegraph @

ChangeLog

raw
1
2 1.2-22
3 * prediction methods for univariate shape-cosntrained smooth classes: bug fixed for datasets whose size is one, and one more than a multiple of 1000 (e.g., 1001; 2001; 30,001). Thanks to Dan Kutner and Giampiero Marra for flagging the bug.
4
5 * gcv.ubre_grad: corrected constant for updating the derivative of w. Thanks to Yuwei Jiang.
6
7 * derivative.smooth routine removed
8
9
10 1.2-21
11 * vcov.scam written and included, extracts the Bayesian posterior covariance matrix of the (un)transformed parameters or frequentist covariance matrix, see ?vcov.scam
12
13 * emmeans-support: implemented the emmeans r package support, see example in ?scam.emmeans.support. Thanks to Julien Mainguy and Russell V. Lenth for the suggestion and help with implementation.
14
15 * brms support: modified prediction methods for the univariate smooth classes 'mpi', 'mpd', 'cv', 'cx', 'mdcv', 'mdcx', 'micv', and 'micx' to support compatibility with the brms package (for use of the smooths in Bayesian regression via brms). Also, predict and plot methods were adjusted accordingly. Thanks to Florian Jaeger for brining this up.
16
17
18 1.2-20
19 * predict.scam: predict now avoids dropping NAs if they are a factor level in original model
20
21 * lipl.smooth.spec: bug fixed with constructing a locally shape-constrained smooth. Thanks to Russell Millar.
22
23 * residuals.scam, scam.check: added (randomized) quantile residuals as an alternative model checking tool. Thanks to Julien Mainguy for this helpful suggestion.
24
25
26 1.2-19
27 * gaussian(link="log") initialization fixed to prevent failures caused by negative data, using the fix.family patching function by (c) Simon N. Wood. Thanks to Ysaline Perraud for reporting the issue.
28
29 * .Rd: description of available LSCOP-splines is clarified, \dontrun removed or replaced by \donttest in the examples.
30
31 * penalty_pident: bug fixed when fitting a model with no smooth terms. Thanks to Leire Citores for flagging the bug.
32
33 * Description: mgcv moved to Imports
34
35
36 1.2-18
37 * smooth.construct: three univariate smoothers with positivity constraint added: 'ipo' increasing and positive, 'dpo' decreasing and positive, 'cpop' cyclic and positive. Thanks to Guillem Sala Fernandez for bringing this up.
38
39 * smooth.construct: a locally shape-constrained smooth constructor added, 'lipl' constructs a univariate increasing smooth up to a specified change point and reaching a plateau beyond it. Thanks to Wenjin Wang.
40
41 * smooth.construct: univariate scope-splines can now allow piecewise linear spline construction. Thanks to Guillem.
42
43 * bfgs_gcv: bug fixed with floating point number comparison. Thanks to Joe Robinson for flagging the bug.
44
45 * s(): smooth terms can now allow 'fx' TRUE/FALSE input argument that indicates whether the term should be an unpenalized (fixed d.f.) regression spline as with the mgcv functions. Thanks to Luca Ehrminger for bringing this up.
46
47
48 1.2-17
49 * smooth.construct: a new shape-constrained smoother, 'lmpi', has been added. 'lmpi' is a locally increasing spline up to a given change point. In collaboration with Jens Lichter. Thanks
50
51 * notExp: transformation function to ensure positivity of the scop-spline coefficients (for use in place of exp()) has been changed. It is now a softplus function, as implemented in PyTorch. Thanks to Jens Lichter for the suggestion.
52
53 * bfgs: bug corrected with bfgs going to infinite loop when selecting step length. Thanks to Akshat Dwivedi and Joe Robinson
54
55 * plot, predict: matrix singularity issue fixed in predict method, could happen when the number of knots is too close to the number of observations. bug fixed with plotting univariate some scop smooths, gave a slight shift in the fitted curve. imposing centering constraint within plot function is now removed. Thanks to Jens Lichter
56
57
58 1.2-16
59 * scam-package.Rd: updated package details and descriptions to give a full overview of the current package functionality. DESCRIPTION updated as well.
60
61 * predict: bug fixed with the prediction method when used on the original data, which occured after introducing extra centring constraints on univariate and bivariate scop-splines subject to monotonicity and convexity. Thanks to Steven Novick for reporting the bug.
62
63 * smooth.construct: bug fixed with 'tismi' and 'tismd' identifiability constraint along the unconsstrained marginal
64
65 * examples in .Rd files with usage of "cc" marginal in the bivariate scop-splines fixed
66
67 * derivative.scam: bug fixed with 'miso', 'mifo' smooths when calculating derivatives. Thanks to Ben Evans.
68
69
70 1.2-15
71 * scam, scam.fit.post: bug fixed when an AR1 error model used for the residuals for Gaussian-identity link models, some fitting results were wrongly extracted, standardized residuals are now correctly returned.
72
73 *scam.check: a new style of producing QQ-plots of the the model residuals has been added in a similar way as in gam.check of mgcv package of Simon N Wood. qq.scam() routine, a clone of qq.gam(mgcv), has been supplemented to do so.
74
75 * smooth.construct: i) bivariate shape constrained smooths with double monotonicity or convexity/concavity: sum-to-zero contraint is now applied to the final tensor product model matrices after imposing the scop constraints (including scop identifiability constraint);
76 ii) univariate dicreasing/increasing, convex/concave, mixed constraints: sum-to-zero contraint is now applied after imposing the scop constraints as well;
77 iii) added two new smooth constructors, 'tismi' and 'tismd', which are tensor product interaction with increasing/decreasing constraint along the first covariate and unconstrained along the second covariate.
78
79 * penalty_pident, gam.setup: these now take into account 'smooth$del.index' from gam.side(mgcv) to deal with identifiability issue when two or more smooths have the same covariate. Using 'del.index' corresponding rows, columns are removed from Zc matrix and p.ident vector.
80
81 * summary.scam.Rd: corrected the name of the output value for the table of the parametric model terms
82
83 * shape.constrained.smooth.terms.Rd: updated to include all implemented SCOP-splines.
84
85 * smooth.construct: bug with null space dimension fixed for univariate and bivariate smooths, caused an error message with summary.scam for models with bivariate smooths
86
87
88 1.2-14
89 *** scam.fit1, scam.fit.post1: a new method is implemented to fit SCAM using a quasi-Newton method, the BFGS method (as an alternative to the Newton method) to minimize penalized deviance wrt model coefficients. This requires only first order derivatives of the log likelihood. The calculation of the edf and tr(A) is done once after fit, using analytical Hessian (taking 2nd order deriv of the log likelihood). The smoothing parameter is selected by efsudr.scam2() which requires the first derivatives of the deviance and tr(A) w.r.t. log(sp). Analytical (rather than approximate) expression of the Hessian is used here.
90
91 ** efsudr.scam2: i) added extended Fellner-Schall method for regular families, with PIRLS/full-Newton method used for the coefficient estimation, performed by scam.fit(). Here only the first and the second order derivatives of the log likelihood are used when calculating the derivatives of the edf. The dependence of H on lambda is neglected.
92 ii) added extended Fellner-Schall method for regular families, with a quasi-Newton/BFGS method
93 performed by scam.fit1() for the coefficient estimation. The dependence of H on lambda is neglected.
94
95 * efsudr.scam: extended Fellner-Schall method now works for smoothing parameter selection by minimizing UBRE when scale parameter is known (as it is in the inner optimization). Also gcv expression in the efs update now includes the 'gamma' parameter. In this implementation the third order derivatives of the log likelihood are used when calculating the derivatives of the edf.
96
97 * small coding fixes with 'gamma' parameter as input argument of the fitting function; bug fixed in simulation example in predict.scam.Rd file.
98
99 * estimate.scam, scam: bug fixed with the call when the smoothing parameter is specified, which occurs with the newly introduced optimization method. Thanks to Pierre Masselot. Also small coding fixes when the sp is supplied: now the model fit is done within estimate.gam() function.
100
101
102 1.2-13
103 * smooth.construct: added option of cyclic cubic regression spline ("cc") in the 'tesmd1', 'tesmd2', and 'tesmi2' smoothers as an alternative marginal basis along the otherwise unconstrained marginal smooth.
104
105 * plot.scam: bug fixed with plot methods for the smooths of the package mgcv, such as, Markov random fields bs="mrf", factor smooth interactions "fs", Gaussian process smooths bs="gp", splines on the sphere bs="sos", Duchon splines bs="ds". Thanks Alessia Eletti for reporting the bug.
106
107
108 1.2-12
109 * smooth.construct: added option for cyclic cubic regression spline ("cc") in the 'tesmi1', tensor product bivariate smooth with increasing constraint in the first covariate. Thanks Eli Asarian for bringing this up.
110
111 *scam.fit: bug fixed with starting values of the model coefficients. Thanks Charlie Song for reporting the bug.
112
113
114 1.2-11
115 * gcv.ubre_grad, scam.fit: bug fixed with vector dimensions when working with linear functional terms. Thanks to
116 Paul Rosenfield for reporting the bug.
117
118 * summary.scam: corrections made when reporting results for parametric factor terms.
119
120 * linear.functional.terms: shape constrained examples corrected, decreasing and increasing terms are now correctly specified using SCOP-splines without identifiability constraints (bs="mpdBy", bs="mpiBy"). An example with convex term is added (bs="cxBy"). Thanks to Paul Rosenfield for pointing out the bug.
121
122 * smooth.construct: added shape constrained smoothers: 'mpiBy', 'mpdBy', 'cxBy', 'cvBy', 'micxBy', 'micvBy', 'mdcxBy', 'mdcvBy' to be used with SCOP-splines with non-constant 'by' variable, and with linear functionals terms. In presence of non-constant 'by' variable the terms are fully identifiable, so they are left unconstrained (without imposing 'zero intercept' constraint). Thanks to Paul Rosenfield for pointing out the bug when 'cx' is used with linear functional terms.
123
124
125 1.2-10
126 * plot.scam: now silently returns a list of plotting data in the same way as plot.gam(mgcv), to help users to produce customized plot. Thanks to Raphael Knevels.
127
128
129 1.2.9
130 * smooth.construct: added 'miso' smooth, a monotone increasing SCOP-spline with an additional 'start-at-zero' constraint, a smooth should be zero at the left-end point of the covariate range. Thanks to Sean Wu for bringing this up.
131
132 * smooth.construct: added 'mifo' smooth, a monotone increasing SCOP-spline with an additional 'finish-at-zero' constraint, a smooth should be zero at the right-end point of the covariate range. Care should be taken when using this smooth (see manual)
133
134
135 1.2-8
136 * predict.scam: bug fixed with restricting the number of samples to be > 1000. Thanks to Armin Rauschenberger for reporting the bug.
137
138 1.2-7
139
140 * bfgs_gcv.ubre: a bug with setting 'ct' values has been fixed. Thanks Joe Robinson and Giampiero Marra.
141
142 * predict.scam: the function now mirrors the behaviour of predict.gam(mgcv) when dealing with factor variables. Thanks Giampiero Marra for bringing the issue up.
143
144
145 1.2-6
146 * An AR1 error model has been added. This can be used for the residuals of Gaussian-identity link models only. Standardized residuals (approximately uncorrelated under correct model) returned in 'std.rsd'.
147
148 * vis.scam.Rd: Factor 'by' variable example with increasing smooths has been added.
149
150 * smooth.construct: tidied up coding for setting Sigma matrices, p.ident; bug fixed with the smooth contructor 'po'.
151
152 * predict.scam, plot.scam: corrected for the smooth 'po'. a `constant' attribute has been corrected to the object returned by predict.scam(...,type="terms"), to match what is returned to what `predict.gam' would do.
153
154 * plot.scam: scop-spline smooths are now centred when being plotted to be in line with unconstrained smooths. Although 'zeroed intercept' constraint is applied to fit the scam model.
155
156 * scam.fit: improved routine for SCAM coefficients estimation via the Newton-Raphson method; step halving under non-finite deviance, checking convergence adequately, trace option for some de-bugging information, etc.
157
158 * scam.control: control structure for scam is now being passed on in more efficient way.
159
160 * scam.Rd: added output values convergence info
161
162 * bfgs_gcv.ubre: slightly improved routine to give faster convergence
163
164 * predict.scam: fix of handling newdata with a single row, prediction with 1001 rows, 2002 rows, etc., when 'terms' supplied. fixed by adding missed [,,drop=FALSE] in predict.scam. Thanks Timothy Hyndman.
165
166 * fix to fitting and predicting models of the form y~1
167
168
169 1.2-5
170 * estimate.scam: Extended Fellner-Schall optimizer for smoothing parameter selection is now available using scam(...,optimizer="efs") as in gam(mgcv). But rather than minimizing REML (in gam(mgcv)) it minimizes GCV criterion.
171
172 * bfgs_gcv.ubre: bug fixed to avoid zero eigenvalues. Thanks to Pierre Masselot for reporting the bug.
173
174
175 1.2-4
176 * scam.control: function added. This allows control of the numerical options for fitting a SCAM in the similar way as gam.control(mgcv). scam, scam.fit, estimate.scam, bfgs_gcv.ubre, gcv.ubre_grad, check.analytical routines were corrected to account for scam.control setting.
177
178 * linear.functional.terms.Rd: examples corrected.
179
180 * scam: setting 'devtol'/'steptol' values corrected. Thanks to Haibo Chen for reporting the bug.
181
182 * scam: setting 'weights' corrected. Thanks to Haibo Chen for reporting the bug.
183
184 * scam: scam setup is changed. clone of the gam setup of gam(mgcv).
185
186 * *.Rd: examples for bivariate smothing constructors updated.
187
188
189 1.2-3
190 * scam.Rd: example with random effect corrected. Thank you to Alan Cobo-Lewis.
191
192 * smooth.construct: three tensor product smoothing constructors for bivariate functions subject to shape constraints were added: 'tecxcx','tecvcv', 'tecxcv'. Thanks to Leire Citores for bringing this up.
193
194 * summary.scam: corrected summary info for the test statistic and p-value for very small edf. Also removed line for the score info in case of supplied sp value.
195
196 * scam-package.Rd: updated content to be in sync with the actual package metadata in the DESCRIPTION file.
197
198
199 1.2-2
200 * print.scam, summary.scam: changed the printing info about edf, they are now rounded up.
201
202 * logLik.scam: function added (clone of logLik.gam (mgcv)). Thanks to Jorge Guevara for raising a question about that.
203
204 * scam: bug fix with manually setting knots of the spline. Example added to smooth.construct.mpi.smooth.spec.Rd file. Thanks to Matthew Harris for reporting the issue.
205
206 * formula.scam: function added, returns the scam formula. Thanks to Renke von Seggern for reporting the bug.
207
208 * scam.check: bug fix with setting 'pch' explicitly. Thanks to Renke von Seggern for reporting the bug.
209
210 * plot.scam: bug fix with plotting the residuals which had a shift of an intercept. Thanks to John Kornak for reporting the bug.
211
212
213 1.2-1
214 * bfgs_gcv.ubre, estimate.scam: bug fix with supplying the value of 'gamma' which was overridden by a default 'gamma=1'. Thanks to Phil Boonstra for reporting the bug and providing an example.
215
216 * smooth.construct: a univariate positively constrained smooth, 'po', was added.
217
218 * added 'linear.functional.terms' with shape constraints example to an Rd file (see linear.functional.terms(mgcv))
219
220
221 1.2-0
222 * smooth.construct: six tensor product smoothing constructors for bivariate functions subject to shape constraints were added: 'temicx','temicv', 'tedecx', 'tedecv', 'tescx', 'tescv'. Thanks to Linda Mhalla for bringing this up.
223
224 * anova.scam: added (clone of anova.gam (mgcv)). Thanks to Felix Meyer for raising a question about that.
225
226 * plot.scam: fits are now centralized (by subscracting the mean of the smooth term)
227
228
229 1.1-9
230 * scam.r, bfgs.r, estimate.scam.r, check.analytical.r: corrected environmental variable
231
232 * plot.scam: can now plot random effect smoother. Thanks to Ondřej Mikula for bringing up the issue.
233 plot.scam is now a clone of the 'new' version of plot.gam().
234
235 * predict.scam: type="iterms" is added to return standard errors for unconstrained smooth components that include the uncertainty about the intercept/overall mean ("iterms" was commented in an .Rd file of the previous versions but not implemented)
236 Thanks to Ondřej Mikula for reporting the issue
237
238 * S3 methods predict.scam residuals.scam are registered now (in 'NAMESPACE' file)
239
240 * scam: corrected use of an 'offset' variable, the one that is outside of the formula. Previously it was not recognized by scam. Thanks to Amy Morin for reporting the bug and providing an example.
241
242
243 1.1-8
244 * summary.scam: corrected dimension of the variance matrix Vb which sometimes sent an error
245
246 * scam.fit: bug fix with coding the term 'QtQRER' needed for the fitting procedure
247
248 * scam-package: the EPSRC NCSE grant is acknowledged in the \reference section
249
250
251
252 1.1-7
253 * bug fix in scam which could fail when the smoothing parameter values are supplied in 'sp'
254 argument to 'scam'. ('sp' values supplied to the smooth term 's' are ignored by 'scam')
255 Thanks to Noel G. Cadigan for reporting the bug.
256
257 * References fixes in .Rd files
258
259
260 1.1-6
261 * Namespace, Description fixed
262
263 * vis.scam: added, copied from vis.gam(mgcv)
264
265 * scam: added additional returned elements of the fitted scam object: `aic', `df.residual', `df.null', `min.edf', object$call (needed for update to work), 'var.summary' (needed for vis.scam), `R', `edf1'.
266 added keepData argument as input, if FALSE (default) the original data removed to save space.
267 removed object$X (model matrix) from return/output list to save space. model.matrix() added as in gam(), correspondingly summary.scam() and predict.scam() were corrected to replace object$X by model.matrix(object).
268
269 * scam.fit: `Rrank' is now an exported object of mgcv
270
271 * scam.check: added extra graphics parameters (...) to pass to plotting functions (like pch,cex); added qqline() with colours in qqnorm() plot
272
273 * plot.scam: corrected number of plots per page and plotting any parametric terms when "all.terms=TRUE" as in plot.gam() (although plot.scam is based on the old version of plot.gam()).
274
275 * derivative.scam: this function replaced derivative.smooth(). It
276 works only for univariate smooths at the moment, with finite differencing approximations for unconstrained smooths.
277
278 * summary.scam: corrected the value of the adjusted R-sq as in gam(mgcv), fixed Ref.df to be the same as in summary.gam(),
279 the code was corrected to be in line with summary.gam()
280
281 * scam.fit.post: corrected the value of the null deviance, added the null degrees of freedom, removed the value `TRUE' for intercept to correct the values of the deviance explaned and null.df for models without intercept.
282
283 * extrapolate.uni.scam: this function has been removed from the package since predict.scam does linear extrapolation
284
285
286 1.1-5
287 * Predict.matrix.**.smooth
288
289 For all univariate and bivariate SCOP-splines Prediction method now allows prediction outside range of knots, and use linear extrapolation in this case
290
291
292 1.1-4
293 * scam.fit: svd replaced with QR + svd if needed approach,
294 large number of O(nq^2) products that were not needed removed, removal of multiple un-necessary loops.
295
296 * gcv.ubre_grad tidied, terms collected in derivative of trace (8 goes to 6), derivative of trace computations restuctured to reduce O(nq^2) operations from 6 per derivative to 4 up front.
297
298 * predict.scam: line for reference to extrapolate.uni.scam corrected with "if.. " for uni case only
299