Skip to contents

Model fitting

dlmtree()
Fit tree structured distributed lag models
dlmtree.control.diagnose()
Diagnostic control settings for dlmtree model fitting
dlmtree.control.family()
Family control settings for dlmtree model fitting
dlmtree.control.het()
Control settings for dlmtree model fitting, when used for heterogeneous models
dlmtree.control.hyper()
Hyperparameter control settings for dlmtree model fitting
dlmtree.control.mcmc()
MCMC control settings for dlmtree model fitting
dlmtree.control.mix()
Control settings for dlmtree model fitting, when used for mixture models
dlmtree.control.monotone()
Control settings for dlmtree model fitting, when used for monotone model
dlmtree.control.tdlnm()
Control settings for dlmtree model fitting, when used for TDLNM
diagnose()
diagnose

Model summary

Obtain results from the model fit

combine.models()
Combines information from DLMs of single exposure
combine.models.tdlmm()
Combines information from DLMs of mixture exposures.
summary()
summary
estDLM()
Calculates subgroup-specific lag effects for heterogeneous models
ppRange()
Makes a 'pretty' output of a group of numbers
predict()
predict
adj_coexposure()
Adjusting for expected changes in co-exposure (TDLMM)
print()
print

Visualization

Visualize distributed lag functions

plot(<summary.monotone>)
Returns variety of plots for model summary of class 'monotone'
plot(<summary.tdlm>)
Plots a distributed lag function for model summary of 'tdlm'
plot(<summary.tdlmm>)
Plots DLMMs for model summary of class 'tdlmm'
plot(<summary.tdlnm>)
Returns variety of plots for model summary of class 'tdlnm'

HDLM & HDLMM

Useful functions for HDLM & HDLMM

pip()
Calculates posterior inclusion probabilities (PIPs) for modifiers in HDLM & HDLMM
shiny()
shiny
splitpoints()
Determines split points for continuous modifiers

Simulation

Simulate datasets

sim.hdlmm()
Creates simulated data for HDLM & HDLMM
sim.tdlmm()
Creates simulated data for TDLM & TDLMM
sim.tdlnm()
Creates simulated data for TDLNM

Data

Built-in datasets

coExp
Randomly sampled exposure from Colorado counties
exposureCov
Exposure covariance structure
pm25Exposures
PM2.5 Exposure data
zinbCo
Time-series exposure data for ZINB simulated data
get_sbd_dlmtree()
Download simulated data for dlmtree articles

Cpp source code & Misc.

cppIntersection()
fast set intersection tool assumes sorted vectors A and B
dlmEst()
Calculates the distributed lag effect with DLM matrix for linear models.
dlmtreeGPFixedGaussian()
dlmtree model with fixed Gaussian process approach
dlmtreeGPGaussian()
dlmtree model with Gaussian process approach
dlmtreeHDLMGaussian()
dlmtree model with shared HDLM approach
dlmtreeHDLMMGaussian()
dlmtree model with HDLMM approach
dlmtreeTDLMFixedGaussian()
dlmtree model with fixed Gaussian approach
dlmtreeTDLMNestedGaussian()
dlmtree model with nested Gaussian approach
dlmtreeTDLM_cpp()
dlmtree model with nested HDLM approach
dlnmEst()
Calculates the distributed lag effect with DLM matrix for non-linear models.
dlnmPLEst()
Calculates the distributed lag effect with DLM matrix for non-linear models.
drawTree()
Draws a new tree structure
mixEst()
Calculates the lagged interaction effects with MIX matrix for linear models.
monotdlnm_Cpp()
dlmtree model with monotone tdlnm approach
ppRange()
Makes a 'pretty' output of a group of numbers
rcpp_pgdraw()
Multiple draw polya gamma latent variable for var c[i] with size b[i]
rtmvnorm()
Truncated multivariate normal sampler, mean mu, cov sigma, truncated (0, Inf)
ruleIdx()
Calculates the weights for each modifier rule
scaleModelMatrix()
Centers and scales a matrix
splitPIP()
Calculates the posterior inclusion probability (PIP).
tdlmm_Cpp()
dlmtree model with tdlmm approach
tdlnm_Cpp()
dlmtree model with tdlnm approach
zeroToInfNormCDF()
Integrates (0,inf) over multivariate normal