powered by
Creates a configuration to fit nuisance parameters using generalized additive models via mgcv::gam(). Supports smooth terms like s().
mgcv::gam()
s()
mcee_config_gam(target, formula, family = NULL, clipping = NULL)
A configuration list for use with mcee_general.
mcee_general
Character. Nuisance parameter name ("p", "q", "eta", "mu", "nu").
RHS-only formula (e.g., ~ X1 + s(time) + s(X2, k=5)).
~ X1 + s(time) + s(X2, k=5)
Optional GLM family. Defaults to binomial() for "p"/"q", gaussian() for "eta"/"mu"/"nu".
binomial()
gaussian()
Optional numeric vector c(lo, hi) to clip predictions into [lo, hi] for numerical stability.
c(lo, hi)
# GAM with smooth time effect cfg_eta <- mcee_config_gam("eta", ~ X1 + s(dp, k = 4)) # GAM with multiple smooths cfg_mu <- mcee_config_gam("mu", ~ s(dp) + s(M, X1, k = 10))
Run the code above in your browser using DataLab