R/methods_cgam.R
, R/methods_gam.R
, R/methods_quantreg.R
model_parameters.cgam.Rd
Extract and compute indices and measures to describe parameters of generalized additive models (GAM(M)s).
# S3 method for cgam
model_parameters(
model,
ci = 0.95,
bootstrap = FALSE,
iterations = 1000,
standardize = NULL,
exponentiate = FALSE,
robust = FALSE,
p_adjust = NULL,
keep = NULL,
drop = NULL,
parameters = keep,
verbose = TRUE,
...
)
# S3 method for gam
model_parameters(
model,
ci = 0.95,
bootstrap = FALSE,
iterations = 1000,
standardize = NULL,
exponentiate = FALSE,
robust = FALSE,
p_adjust = NULL,
keep = NULL,
drop = NULL,
parameters = keep,
verbose = TRUE,
...
)
# S3 method for rqss
model_parameters(
model,
ci = 0.95,
bootstrap = FALSE,
iterations = 1000,
standardize = NULL,
exponentiate = FALSE,
robust = FALSE,
p_adjust = NULL,
keep = NULL,
drop = NULL,
parameters = keep,
verbose = TRUE,
...
)
model  A gam/gamm model. 

ci  Confidence Interval (CI) level. Default to 0.95 (95%). 
bootstrap  Should estimates be based on bootstrapped model? If

iterations  The number of bootstrap replicates. This only apply in the case of bootstrapped frequentist models. 
standardize  The method used for standardizing the parameters. Can be

exponentiate  Logical, indicating whether or not to exponentiate the
the coefficients (and related confidence intervals). This is typical for
logistic regression, or more generally speaking, for models with log
or logit links. Note: Deltamethod standard errors are also
computed (by multiplying the standard errors by the transformed
coefficients). This is to mimic behaviour of other software packages, such
as Stata, but these standard errors poorly estimate uncertainty for the
transformed coefficient. The transformed confidence interval more clearly
captures this uncertainty. For 
robust  Logical, if 
p_adjust  Character vector, if not 
keep  Character containing a regular expression pattern
that describes the parameters that should be included in the returned data
frame (for 
drop  Character containing a regular expression pattern
that describes the parameters that should be included in the returned data
frame (for 
parameters  Deprecated, alias for 
verbose  Toggle warnings and messages. 
...  Arguments passed to or from other methods. For instance, when

A data frame of indices related to the model's parameters.
The reporting of degrees of freedom for the spline terms
slightly differs from the output of summary(model)
, for example in the
case of mgcv::gam()
. The estimated degrees of freedom, column
edf
in the summaryoutput, is named df
in the returned data
frame, while the column df_error
in the returned data frame refers to
the residual degrees of freedom that are returned by df.residual()
.
Hence, the values in the the column df_error
differ from the column
Ref.df
from the summary, which is intentional, as these reference
degrees of freedom “is not very interpretable”
(web).
standardize_names()
to rename
columns into a consistent, standardized naming scheme.
library(parameters)
if (require("mgcv")) {
dat < gamSim(1, n = 400, dist = "normal", scale = 2)
model < gam(y ~ s(x0) + s(x1) + s(x2) + s(x3), data = dat)
model_parameters(model)
}
#> Loading required package: mgcv
#> Loading required package: nlme
#> This is mgcv 1.835. For overview type 'help("mgcvpackage")'.
#>
#> Attaching package: ‘mgcv’
#> The following object is masked from ‘package:mclust’:
#>
#> mvn
#> Gu & Wahba 4 term additive model
#> # Fixed Effects
#>
#> Parameter  Coefficient  SE  95% CI  t(384.97)  p
#> 
#> (Intercept)  7.82  0.10  [7.61, 8.02]  75.74  < .001
#>
#> # Smooth Terms
#>
#> Parameter  F  df  p
#> 
#> Smooth term (x0)  5.21  2.68  0.001
#> Smooth term (x1)  85.58  2.59  < .001
#> Smooth term (x2)  88.32  7.77  < .001
#> Smooth term (x3)  0.78  1.00  0.378