Parallel TDMM fitting wrapper
tdmm.parallel.RdFit TDMM with parallel chains through tdmm().
Usage
tdmm.parallel(data, family = c("gaussian", "bernoulli", "poisson"), nknots = NULL, subject.var = "subject.ID",
time.var = "time", y.var = "y", x.var = NULL, degree = 3, n.chains = 3, n.iter = 10000, n.burn = 3000,
n.thin = 5, n.adapt = 10000, n.cores = min(n.chains, parallel::detectCores()), jags.dir = NULL, quiet = FALSE,
seed = NULL, n_basis = NULL, control = NULL, priors = NULL, random_intercept = TRUE)Arguments
- data
Data frame with one row per observation and columns for subject ID, time, response, and covariates.
- family
One of "gaussian", "bernoulli", or "poisson".
- nknots
Deprecated
nknotsargument using the interval-count convention. Do not supply withn_basis.- subject.var
Name of the subject ID column.
- time.var
Name of the numeric observation-time column.
- y.var
Name of the response column.
- x.var
Names of numeric covariates, in coefficient order; NULL selects all columns other than subject ID, time, and response.
- degree
B-spline polynomial degree; default 3 (cubic).
- n.chains
Number of chains;
controlis recommended.- n.iter
Total iterations;
controlis recommended.- n.burn
Burn-in iterations;
controlis recommended.- n.thin
Thinning interval;
controlis recommended.- n.adapt
Adaptation iterations;
controlis recommended.- n.cores
Number of parallel cores;
controlis recommended.- jags.dir
Optional model directory; ordinarily leave this
NULL.- quiet
Suppress JAGS progress output when TRUE.
- seed
Random seed;
controlis recommended.- n_basis
Actual number of B-spline basis functions. Omission resolves to 8.
- control
Optional list from tdmm_control() controlling chains, iterations, burn-in, thinning, adaptation, seed, parallel execution, and cores.
- priors
Optional family-specific list, normally obtained from tdmm.priors(family) and modified by the user.
- random_intercept
TRUE(the default) includes a subject-specific random intercept for repeated observations.FALSEfits without one for independent observations.
Details
For parallel fitting, tdmm(control = tdmm_control(parallel = TRUE, cores = ...)) is recommended. This wrapper retains the existing tdmm.parallel() arguments and delegates fitting to tdmm().