This function attempts to return, or compute, p-values of a model's parameters. See the documentation for your object's class:
Bayesian models (rstanarm, brms, MCMCglmm, ...)
Zero-inflated models (hurdle
, zeroinfl
, zerocount
, ...)
Marginal effects models (mfx)
Models with special components (DirichletRegModel
, clm2
, cgam
, ...)
p_value(model, ...)# S3 method for default
p_value(
model,
dof = NULL,
method = NULL,
robust = FALSE,
component = "all",
verbose = TRUE,
...
)
# S3 method for emmGrid
p_value(model, ci = 0.95, adjust = "none", ...)
A statistical model.
Arguments passed down to standard_error_robust()
when confidence
intervals or p-values based on robust standard errors should be computed.
Only available for models where method = "robust"
is supported.
Number of degrees of freedom to be used when calculating
confidence intervals. If NULL
(default), the degrees of freedom are
retrieved by calling degrees_of_freedom()
with
approximation method defined in method
. If not NULL
, use this argument
to override the default degrees of freedom used to compute confidence
intervals.
If "robust"
, and if model is supported by the sandwich
or clubSandwich packages, computes p-values based on robust
covariance matrix estimation.
Logical, if TRUE
, computes confidence intervals (or p-values)
based on robust standard errors. See standard_error_robust()
.
Model component for which parameters should be shown. See
the documentation for your object's class in model_parameters()
for
further details.
Toggle warnings and messages.
Confidence Interval (CI) level. Default to 0.95
(95%
).
Character value naming the method used to adjust p-values or
confidence intervals. See ?emmeans::summary.emmGrid
for details.
A data frame with at least two columns: the parameter names and the p-values. Depending on the model, may also include columns for model components etc.
# NOT RUN {
data(iris)
model <- lm(Petal.Length ~ Sepal.Length + Species, data = iris)
p_value(model)
# }
Run the code above in your browser using DataLab