Fixed links in Rd pages, consistently with new Rrequirements.
Minor fixes in documentation.
smooth.construct.cb.smooth.spec() and Predict.matrix.cb.smooth()now defined as method functions and registered as such innamespace.
Changes in crosspred() to fix issues with penalizedversion
Documentation amended accordingly.
Allowed incremental cumulative predictions for any laginterval.
Small fixes in exphist(), getcoef(), and getvcov().
Documentation amended.
Fixed bug in exphist() with negative lags.
Added colnames in object returned by exphist().
Documentation amended.
Changes in the function exphist() to allow negative times andlags. This has required a complete recoding of the internal steps whichhas also made the code simpler and the function faster.
Minor correction to documentation.
Some changes in crosspred(), where now model.link can be setdirectly independently from the model class, making the use of thefunction more flexible and general. This is implemented with a minorchange in getlink(). In addition, the inclusion of the coxme objects(see below) has been removed.
Minor correction to documentation.
Fixed a bug in getlink(), now with correct link extraction forcoxph objects. In addition, added coxme objects. Thanks to Chau-RenJung.
Minor correction to documentation.
Replaced spline.des() with splineDesign() in ps(), and changednamespace.
Fixed a bug in crosspred() and crossreduce() when extracting vcovwithout accounting for the fact that missing parameters wereexcluded.
Minor correction to documentation.
Extension to penalized DLMs and DLNMs implemented with theinclusion of new functions and modification of existing ones.
Revision of the package vignettes, with improved overview of thevarious developments, and addition of the new vignettedlnmPenalized.
The package has now a development webpage in GitHub(https://github.com/gasparrini/dlnm).
Addition of a NEWS file that replaces the changeLog, also withHTML version included in the new GitHub page.
Extension and improvements of Examples section of help files, inparticular for main functions.
Argument ‘fill=0’ added to exphist() to allow exposure historieswith undefined values to be padded with different values that 0 (thedefault), in particuar NA.
Former internal function exphistint() now included withinexphist().
mkcen() now centers at only approximately the mid-value, andreturn a message with info on the centering value if this is notdefined.
Improved Description file, with links to GitHub page.
Fixed links, in particular to article inwww.ag-myresearch.com.
Centering procedure moved from onebasis() tocrosspred()-crossreduce(). This change simplifies the steps of obtainingpredictions with different references, as it avoids refitting the model.At the moment the inclusion of ‘ce’ in onebasis()-crossbasis() generatesa warning, but the info is kept internally and the old code should stillwork.
Consistently withe the change above, crosspred()-crossreduce()now have a ‘cen’ argument to specify the reference value.
Major changes in crosspred()-crossreduce(), with severalauxiliary functions build to simplify the internal code. Specifically:mkat(), mkcen(), mklag(), mkXpred(). See the related help page.
New import of the function tensor.prod.model.matrix() from mgcv,to simplify the computation of the tensor product incrosspred().
Published code has been updated accordingly, and included in therelated web pages at http://www.ag-myresearch.com/. The functionattrdl() (not included in the package but used in published code) hasbeen changed as well.
Changed default for colour (now black) and frame (now bty=”l”) inplotting functions.
Namespace changed accordingly, with imports from mgcv.
Lag2() removed, back to Lag() imported from packagetsModel.
Documentation changed accordingly, references updated.
Changes in function strata(), now with possibility of setting‘ref=0’, thus obtaining a different dummy parameterization.
Changes in summary.crossbasis() to print only a subset of longarguments
Added attribute ‘df’ in crossbasis objects, with df for eachdimension.
Adjustment to the example on seasonal analysis.
References corrected.
Function strata() now accepts an additional argument ‘ref’ toselect the reference category. Also, the intercept is now defined as avector of 1’s.
Old functions crossplot(), mkbasis() and mklagbasis()removed.
Functions now defined with unquoted names (problem withRStudio).
Internal functions now defined with names without initialdots.
checkgroup modified: now number of obs in each groups can also beless than df in argvar. Required in previous versions, notanymore.
Documentation changed accordingly, references updated.
Included function equalknots() to place knots at equally-spacedvalues.
Changes in .get-() functions to allow changes in lme4objects.
Error fixed in examples of vignette dlnmExtended.
See also: file.show(system.file(“Changesince200”,package=“dlnm”))
The usage of functions crossbasis() and onebasis() has beenextensively revised, as detailed below. The old usage is maintained witha warning for compatibility reasons. However, the old usage can returnnow different results if compared to previous versions. See the fileChangesince200 using the link above.
The functions in dlnm can now be used also for data other thantime series. The only difference is the inclusion of a matrix of laggedoccurrences as the ‘x’ argument of crossbasis, instead than the usualvector of time series data. The extension is detailed in the articleGasparrini Stat Med 2013 and in the new vignette‘dlnmExtended’.
The functions onebasis() now calls existing functions forgenerating the basis matrix. The functions poly(), strata(), thr(),integer() and lin() have been added, although not exported in thenamespace. User-defined functions with attributes reporting thearguments exactly defining the transformation can be added aswell.
Given the change above, the arguments of onebasis() and the listof arguments composing the arguments ‘argvar’ and ‘arglag’ incrossbasis() are now those of the called functions. In particular, theold usage is not guaranteed to work any more, and if it does a warningis reported.
The default knots placements for ns and bs functions for the lagdimension in crossbasis() is not at equally-spaced log-values as before,but at equally-spaced percentiles, consistently with the predictorspace. The old default can be reproduced with the new functionlogknots().
Two new data sets included in the package, ‘nested’ and ‘drug’.They are composed of simulated data on nested case-control andrandomized controlled trial designs respectively.
The new function exphist() can be used to build matrices ofexposure histories to be used in crosspred() to obtain specificpredictions given an exposure profile.
The documentation of the package has beed extensively revised.The vignette ‘dlnmOverview now provides a general introduction to themethodology and functions, while the two new vignettes ’dlnmTS’ and‘dlnmExtended’ describes specific applications in time series design andin other study designs, respectively.
Basis matrices now keep names from originalvector/matrix.
Argument ‘lag’ in crossbasis() now given default value dependingon the format of the argument ‘x’.
Summary method functions have been changed accordingly.
Internal functions .getcoef(), .getvcov() and .getlink() addedwithin crosspred(0 tro extract coef, vcov and model link.
Internal functions .checkgroup(), .oldonebasis and.oldcrossbasis() for checks in onebasis() and crossbasis().
Print of summary.crossreduce() fixed.
Resolved the dependency with package NMMAPSlite, nowarchived.
Bug fixed in crosspred() when specifying the ‘lag’ argument(thanks to Joseph Ogutu).
URL link added in Description file. Copyright statement added ineach function.
Updated citations.
Documentation changed accordingly.
Argument ‘lag’ included in crosspred() and crossreduce(), todefine sub-periods of lag on which predict. Useful for computing overallcumulative effects on different portions of the lag period.
Second example in vignette about seasonal analysis has beencorrected. Now the model includes also a term for trend, forgotten sofar.
Terminology in documentation largely revised.
In onebasis(), now strata defined by ‘bound’, not range, andreported.
Bug fixed in names assignment to objects incrossreduce().
Bug fixed in crosspred() for argument ‘bylag’.
Added as.vector(x) to constraint the type of first argument inonebasis().
Change in colnames(crossbasis).
Fixed bug in lines.crosspred() and points.crosspred()
See also: file.show(system.file(“Changesince151”,package=“dlnm”))
New function onebasis() to create the 1-dimensional basismatrices. The function is made available and documented. This replacemkbasis() and mklagbasis(), which are kept only for compatibility. Thefunctions returns a matrix with attributes.
The usage of crossbasis() has been extensively revised. Now thefunction has 2 arguments var and lag with a list of arguments for eachspace. Also, maxlag has been replaced by lag, defining the lag range(min and max). Old usage has been kept (with a warning) forcompatibility reasons.
New function crossreduce() to reduce the fit to one of the 2dimensions. Methods functions (summary, plot, points, lines) are alsoincluded.
crosspred() changed accordingly: now prediction also from simplebasis, and computation based on faster new method incrossreduce().
Argument cenvalue eliminated from basis()-crossbasis(): centeringnow entirily determined by cen, which can be logical ornumeric.
Bug fixed in onebasis() (previously mkbasis()) for typehthr-lthr.
Internal functions included: .onAttach() and .fci().
coef and vcov methods for crosspred() and crossreduce().
In onebasis()-crossbasis(): bound and cen argument now with nodefault. degree=3 returned now for type=‘ns’, similarly to the originalfunction.
In plot functions: changed default of ptype, added defaulttitles.
In plots and documentation: effects changed tooutcome-association.
Documentation and examples changed accondingly with changesabove.
Argument ‘ci.arg’ added to plotting functions. Now it is possibleto (almost) completely specify the confidence intervalsdisplay.
onAttach function added, to display a message when the package isattached.
Dependencies revised: splines excluded from Depends, andaccordingly library(splines) included in examples and vignette. Alsoexcluded graphics and stats, already imported.
Function crossplot() replaced by method functions plot(), lines()and points() for class ?crosspred?. The user can now flexibly choose allthe arguments through ‘…’ to modify axes, colours, labels etc.
Arguments ‘coef’, ‘vcov’ and ‘model.link’ added to crosspred(),to provide the user a way to manually include the parameters for modelswithout methods for coef() and vcov().
Improved routine for automatic selection of rounded values usedfor prediction in crosspred() with ‘at’-‘from’-‘to’-‘by’.
Included ‘ci.level’ in crosspred() and plot() method and ‘ci=“n”’in plot() method for no confidence intervals.
Improved model parameters extraction method in crosspred()through regular expressions.
Added class “matrix” to crossbasis objects.
Included summary.crosspred().
Added lazyData to description file.
Improved coherence checks in functions and centering inmkbasis().
A detailed description of the functions added in thevignette.
Help pages, vignette and citation changes accordingly.
Bug in crosspred() with cumul=T: fixed.
Error in regression commands for crosspred(): fixed.
Help pages and citation changed accordingly.
New argument ‘group’ in crossbasis() to generate functions foreach sub-group defined by the factor.
crosspred() now works also with lm, gam (mgcv), gee (geepack),clogit and coxph (survival).
change in mkbasis: now knots also outside range, but for types“strata” and “-thr” there’s the chance to generate collinear variables:included a warning in help for crossbasis().
Vignette ’dlnmOverview” rearranged with new examples, one of themon seasonal analysis. Reference to new paper Gasparrini 2010 StatMed.
The estimate of the cumulative effects along lags has beenincluded in crosspred() and can be plotted with crossplot() setting‘cumul=T’.
The confidence intervals for ‘type’ equal to “slices” or“overall” can be now represented both by “area” (default), “bars” or“lines”, by the argument ‘ci’ in crossplot().
The dataset chicagoNMMAPS has been added, relaxing the dependenceon the package NMMAPSlite. Now the examples can be run using these dataand without an internet connection.
The function crosspred() has been improved: now there is noconstraint on the range of the predicted values. Moreover, the values‘model.class’ and ‘model.link’ have been added. The command now worksalso when the estimation is carried out by ‘clogit()’.
The section ‘Functions’ in the vignette ‘dlnmOverview’ has beenreduced: a reference to the functions help pages has beenadded.
Help pages, examples and vignette changed accordingly.
The argument ‘degree’ included in mkbasis()-crossbasis(),defining the degree of the unconstrained B-spline (‘type’ equal to ‘bs’)or the maximum power of the polynomial (‘type’ equal to‘poly’).
Linear piecewise function above a threshold included fortype=‘hthr’/‘lthr’; added an example in help pages andvignette.
Automatic knot selection also for thr-type functions
New example related to the changes above in the help pages and inthe vignette
Improved error messages in mkbasis() and mklagbasis()
Double threshold type changed from ‘thr’ to ‘dthr’; added anerror message in mkbasis() to explain the change.
For type=‘dthr’, knots choice when more than 2 changed from firsttwo to first and last ones.
Basis choices changed in example3 in order to show a quadraticspline.
Examples for mkbasis()-mklagbasis() expanded in help pages andvignette.
Help pages, examples and vignette changed accordingly.
A contour/level plot has been added to crossplot().
The option ‘bs’ has been added to the argument ‘type’ ofmkbasis()-crossbasis(), to specify a cubic spline without naturalconstraints.
Minor bugs fixed in mkbasis() and mklagbasis().
Typing errors fixed in vignette ‘dlnmOverview’.
Help pages, examples and vignette changed accordingly.
par options in crossplot()
titles for ‘slices’ in crossplot()
Intercept added to type equal to ‘thr’, ‘hthr’, ‘lhr’, and‘lin’
The vector ‘predvar’ of predictor values for which the predictionmust be performed, included in crosspred(), is now automatically orderedand made unique.
Two links to mkbasis() and mklagbasis() added to the help ofcrossbasis() in order to let the internal functions help pageavailable
par(par.old) included in ‘type=“slices”’ for crossplot() in orderto redifine a single plot after the command
Error messages added to mkbasis() if argument types arewrong
Default value for argument ‘lagbound’ of crossbasis() changedfrom c(-1,maxlag) to c(0,maxlag).
Help pages changed accordingly with the new features.
The example 2 (in crosspred()) the threshold has been set to40.3, in order to show the ordering functionality.