ref_spec
Usage
ref_spec( family = ref_gaussian(), location = ~1, scale = ~1, skew = ~1, tail = ~1, transform = "identity", method = "REML", use_bam = TRUE, bam_min_n = 20000L, control = list())Specification of a distributional reference model
Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
family |
A ref_family such as ref_gaussian() or ref_shash(). |
location, scale, skew, tail |
One-sided formulas for the additive predictors. Unused shape formulas default to ~ 1. |
transform |
Monotone response transform applied before fitting:"identity" (the default), "sqrt", "log", or a Box-Cox power$\lambda \ge 0$. The model is fitted to $h_\lambda(y)=(y^\lambda-1)/\lambda$ ($\log y$ at $\lambda=0$) and every predictive distribution is pushed back to the response scale, so densities carry the log Jacobian and quantiles, medians, hilo(), and CRPS are in the units of y. Anytransform other than the identity requires a positive outcome. |
method |
mgcv smoothness-selection method. |
use_bam |
Use mgcv::bam() when the family supports it andn >= bam_min_n. |
bam_min_n |
Minimum rows before bam() is considered. |
control |
Extra engine controls (list). |
An object of class ref_spec.
Examples
Section titled “Examples”ref_spec(family = ref_gaussian(), location = ~ s(age, k = 8) + sex)ref_spec(family = ref_shash(), location = ~ s(age, k = 8), transform = "log")