(update request by CRAN)
bs() to avoid warning in CMD checkwhen run on older version of R wheresplines::bs() did notyet have the argumentwarn.outside.md_pattern() has an additional argumentsort_columns to provide the option to switch off thesorting of columns by number of missing values.sum_duration(): new function to get sum ofcomputational time across chains, phases, runs, …formula() now also return the model formula whenadd_samples() is used.JM_imp() with ordinal longitudinal outcome is not usingthe correct version of the linear predictor in the quadrature procedureapproximating the integral in the survival.monitor_params(imps = TRUE) in survival modelsfixed.predDF(): bugfix for models including auxiliaryvariables (which were previously not included into the data)nonprop: bugfix for non-proportional effects incovariate modelsadd_samples() will now result in thecall element of aJointAI object being alist and no longer a nested list.comp_info element of fittedJointAI objecthas changed due to the changes in parallel computing, and computationaltime is not reported separately for the adaptive phase and the samplingphase, and separately per chain when parallel computation was used.predict() is now a lot faster for proportional hazardsmodels.custom: new argument in the main analysis functionsthat allows the user to replace the JAGS syntax for sub-models withcustom syntax. The argument expects a named list where the names are thenames of the variables for which the custom model will be used. Thisfeature requires some knowledge of JAGS syntax.append_data_list: new argument in the main analysisfunctions that allows the user to add elements to the list of data thatis passed to JAGS. This may be necessary for custom sub-models.rd_vcov: new argument in the main analysis functionsthat allows the specification of the structure of the random effectsvariance-covariance matrices in (multivariate) mixed models (and jointmodels).plot_all() not displaying the variable namein the message shown for character string variables.set_refcat(): wasn’t displaying the factorlabels correctlyprint.JointAI: bugfix for multivariate mixed modelswith full variance-covariance matrix of the random effects that had thesame number of random effects for each outcome, for which the printingof this matrix resulted in an error.rd_vcov(): new function added to extract the randomeffect variance- covariance matrices (posterior means)*_imp() functionsfrom within another function that has the model formula as anargument.data_list: omit data matrixM_* fromdata_list ifncol == 0data_list: syntax to checking whichpos_*to include can handle the case with multiple grouping variables being onthe same, lowest level; beforepos_* was excluded for onlyone of themadd_samples(): remove unnecessary call todoFuture::registerDoFuture()predDF() bug fix: the parameter for all methods is nowcalledobjectlist_models() now also works for errored JointAIobjectsThis version ofJointAI contains some major changes.To extend the package it was necessary to change the internal structureand it was not possible to assure backward compatibility.
betareg_imp(): beta regressionbetamm_imp(): beta mixed modellognorm_imp(): log-normal regression modellognormmm_imp(): log-normal mixed modelmlogit_imp(): multinomial logit modelmlogitmm_imp(): multinomial mixed modelJM_imp(): joint model for longitudinal and survivaldataIt is now possible to fithierarchical models with more thanone level of grouping, with nested as well as crossed randomeffects (checkthehelp file) of the main model function for details on how to specifysuch random effects structures.
This does also apply to survival models, i.e., it is possible tospecify a random effects structure to model survival outcomes in datawith a hierarchical structure, e.g., in a multi-centre setting.
coxph_imp() can now handletime-dependentcovariates using last-observation-carried-forward. Thisrequires to add(1 | <id variable>) to the modelformula to identify which rows belong to the same subject, and tospecify the argumenttimevar to identify the variable thatcontains the observation time of the longitudinal measurements.
By providing a list of model formulas it is possible to fit multipleanalysis models (of different types) simultaneously. The models canshare covariates and it is possible to have the response of one model ascovariate in another model (in a sequential manner, however, notcircular).
As before, proportional odds are assumed by default for allcovariates of a cumulative logit model. The argumentnonprop accepts a one-sided formula or a named list ofone-sided formulas in which the covariates are specified for whichnon-proportional odds should be assumed.
Additionally, the argumentrev is available to specify avector of names of ordinal responses for which the odds should beinverted. For details, see thethehelp file.
lmer_imp() andglmer_imp()are aliases forlme_imp() andglme_imp().fixed andrandom) aswell as using specification as inlme4 (with a combinedmodel formula for fixed and random effects).df_basehaz incoxph_imp() andJM_imp() allows setting the number of degrees of freedom inthe B-spline basis used to model the baseline hazard.options("contrasts") is no longerignored. For completely observed covariates, any of the contrastsavailable in base R are possible andoptions("contrasts")is used to determine which contrasts to use. For covariates with missingvalues, effect coding (contr.sum) and dummy coding(contr.treatment) are possible. This means that forcompletely observed ordered factors the default iscontr.poly, but for incomplete ordered factors the defaultiscontr.treatment.summary(), the argumentmultivariate to the functionGR_crit() is nowset toFALSE to avoid issues. The multivariate version canstill be obtained by usingGR_crit() directly.coxph_imp()andJM_imp() are monitored automatically when“analysis_main = TRUE”.get_models() is no longer exported becauseit now requires more input variables and is no longer convenient to use.To obtain the default specification of the model types use one of themain functions (*_imp()), setn.adapt = 0 (andn.iter = 0), and obtain the model types as<mymodel>$models.list_models() now returns information on allsub-models, including the main analysis models (previously it includedonly information on covariates).parameters() has changed. The functionreturns a list of matrices, one per analysis model, with information onthe response variable, response category, name of the regressioncoefficient and its associated covariate.missinfo = TRUE insummar()adds information on the missing values in the data involved in a JointAImodel (number and proportion of complete cases, number and proportion ofmissing values per variable).ridge has changed toshrinkage. Ifshrinkage = "ridge", a ridgeprior is used for all regression coefficients in all sub-models. If avector of response variable names is provided toshinkage,ridge priors are only used for the coefficients in these models.default_hyperpars(): The default hyper-parameters forrandom effects are no longer provided as a function but moreconsistently with the hyper-parameters for other model parts, as avector (within the list of all hyper-parameters).default_hyperpars():the default number ofdegrees of freedom in the Wishart distribution used for the inverse ofthe random effects covariance matrix is now the number of random effects+ 1 (was the number of random effects before).seed inJointAIis now only local, i.e., in functions in whichset.seed()is called, the random number generator state.Random.seedbefore setting the seed is recorded, and re-set to that value on exitingthe function.predDF() the argumentvar has changedtovars and expects a formula. This extends thefunctionality ofpredDF() to let multiple variablesvary.JointAI object have changed.Potentially relevant for users:JointAI objects now contain information on thecomputational time and environment they were run in: the elementcomp_info contains the time-stamp the model was fitted, theduration of the computation, the JointAI version number and the Rsession info.jagsmodel.warn andmess now alsoaffect the output ofrjags.future::plan() for how the“future” should be handled. As a consequence, the argumentsparallel andn.cores are no longer used.Information on the setting that was used with regards to parallelcomputation is returned in aJointAI object viacomp_list$future.clmm covariatemodel when there are no baseline covariates in the modelnewdata forpredict() that does notcontain the outcome variableadd_samples(): calculation ofend() ofMCMC samples fixedadd_samples() when used in parallel withthinning fixedpredict() can now handlenewdata withmissing outcome values; predicted values for cases with missingcovariates areNA (prediction with incomplete covariates isplanned to be implemented in the future)get_MIdat() andplot_imp_distr() when only one variable has missingvaluesncores has changed ton.cores forconsistency withn.iter,n.chains, etc.coxph_imp() does no longer use a counting processimplementation but uses the likelihood in JAGS directly via the zerostrickpredict() now has an argumentlength tochange number of evaluation pointssummary(),predict(),traceplot(),densplot(),GR_crit(),MC_error() now have an argumentexclude_chains that allows to specify chains that should beomittedcitation() now refers to a manuscript on arXivglmm_lognorm available to impute level-1 covariateswith a log-normal mixed modelresiduals() andplot() availablefor (some of the) main analysis types (details see documentation)models added toget_models() sothat the user can specify to also include models for complete covariates(which are then positioned in the sequence of models according to thesystematic used inJointAI). Specification of a modelnot needed for imputation prints a notification.JointAI objects (most types) now also include residualsand fitted values (so far, only using fixed effects)print.JointAI fixedXl is no longer included indata_list when it is not used in the modelsubset when specified as vectorsummary: range of iterations is printedcorrectly now when argumentend is usedsummary() callsGR_crit() with argumentautoburnin = FALSE unless specified otherwise via...inits is specified as a function, the function isevaluated and the resulting list passed to JAGS (previously the functionwas passed to JAGS)simong andsimWide havechanged (more variables, less subjects)imp_pars = TRUE (when user specified viamonitor_params orsubset)survreg_imp the sign of the regression coefficientis now opposite to match the one fromsurvregmeth has changed tomodelsadd_samples(): bug that copied the last chain to allother chains fixedXc, sothat specification of functions of covariates in auxiliary variablesworks betterdensplot() issue (all plotsshowed all lines) fixedplot_all(),densplot(), andtraceplot() limit the number of plots on one page to 64when rows and columns of the layout are not user specified (to avoid the‘figure margins too large’ error)longDF example data: new version containingcomplete and incomplete categorical longitudinal variables (and variablenames L1 and L2 changed to c1 and c2)list_impmodels() changed tolist_models() (butlist_impmodels() is kept asan alias for now)clm_imp() andclmm_imp(): new functionsfor analysis ofordinal (mixed) modelscoxph_imp(): new function to fit Cox proportionalhazards models with incomplete (baseline) covariatesno_model allows to specify names of completelyobserved variables for which no model should be specified (e.g., “time”in a mixed model)ridge = TRUEallows to use shrinkage priors on the precision of the regressioncoefficients in the analysis modelplot_all() can now handle variables from classesDate andPOSIXtparallel allows different MCMC chains tobe sampled in parallelncores allows to specify the maximumnumber of cores to be usedseed added for reproducible results; alsoa sampler (.RNG.name) and seed value for the sampler(.RNG.seed) are set or added to user-provided initialvalues (necessary for parallel sampling and reproducibility ofresults)plot_imp_distr(): new function to plot distribution ofobserved and imputed valuesRinvD is no longer selected to be monitored in randomintercept model (RinvD is not used in such a model)summary(): reduced default number of digitsmeth now uses default values if only specifiedfor subset of incomplete variablesget_MIdat(): argumentminspace added toensure spacing of iterations selected as imputationsdensplot(): accepts additional options, e.g.,lwd,col, …list_models() replaces the functionlist_impmodels() (which is now an alias)coef() method added forJointAI object andsummary.JointAI objectconfint() method added forJointAIobjectprint() method added forJointAIobjectsurvreg_imp() added to perform analysis of parametric(Weibull) survival modelsglme_imp() added to perform generalized linear mixedmodellingtraceplot(),densplot(): specification ofnrow ANDncol possible; fixed bug when onlynrow specifiedcontrast.arg that nowin some cases cause error| # JointAI 0.3.2 |
|---|
| # JointAI 0.3.1 |
## Bug fixes *plot_all()uses correct level-2 %NA in title *simWide: case with noobservedbmi values removed *traceplot(),densplot():ncol andnrow nowwork withuse_ggplot = TRUE *traceplot(),densplot(): error in specification ofnrowfixed *densplot(): use of color fixed * functions withargumentsubset now return random effects covariance matrixcorrectly *summary() displays output with row name whenonly one node is returned and fixed display ofD matrix *GR_crit(): Literature reference corrected *predict(): prediction with varying factor fixed * noscaling for variables involved in a function to avoid problems withre-scaling |
## Minor changes *plot_all()usesxpd = TRUE when printing text for character variables*list_impmodels() uses line break when output of predictorvariables exceedsgetOption("width") *summary() now displays tail-probabilities for off-diagonalelements ofD * added option to show/hide constant effectsof auxiliary variables in plots *predict(): now alsoreturnsnewdata extended with prediction |
monitor_params is now checked to avoid problems whenonly part of the main parameters is selectedmd.pattern() now uses ggplot, which scales better thanthe previous versionlm_imp(),glm_imp() andlme_imp() now ask about overwriting a model fileanalysis_main = T stays selected when other parametersare followed as wellget_MIdat(): argumentinclude added toselect if original data are included and id variable.id isadded to the datasetsubset argument uses same logit asmonitor_params argumentlm_imp(),glm_imp() andlme_imp() now take argumenttrunc in order totruncate the distribution of incomplete variablessummary() now omits auxiliary variables from theoutputimp_par_list is now returned from JointAI modelscat_vars is no longer returned fromlm_imp(),glm_imp() andlme_imp(), because it is contained inMlist$refsplot_all() function addeddensplot() andtraceplot() optional withggplotdensplot() option to combine chains beforeplottingNHANES,simLong andsimWide addedlist_impmodels to print information on the imputationmodels and hyper-parametersparameters() added to display the parameters to be/thatwere monitoredset_refcat() added to guide specification of referencecategoriesmd_pattern(): does not generate duplicate plot anymoreget_MIdat(): imputed values are now filled in in thecorrect orderget_MIdat(): variables imputed withlognorm are now included when extracting an imputeddatasetget_MIdat(): imputed values of transformed variablesare now included in imputed datasetsmeth argumentmd.pattern(): adaptation to new version ofmd.pattern() from themice packageNaN toNAgamma andbeta imputation methodsimplemented