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,
component = "all",
vcov = NULL,
vcov_args = NULL,
verbose = TRUE,
...
)
# S3 method for emmGrid
p_value(model, ci = 0.95, adjust = "none", ...)
A statistical model.
Additional arguments
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.
For linear mixed models, method
can be
"kenward"
or
"satterthwaite"
.
Model component for which parameters should be shown. See
the documentation for your object's class in model_parameters()
for
further details.
Variance-covariance matrix used to compute uncertainty estimates (e.g., for robust standard errors). This argument accepts a covariance matrix, a function which returns a covariance matrix, or a string which identifies the function to be used to compute the covariance matrix.
A covariance matrix
A function which returns a covariance matrix (e.g., stats::vcov()
)
A string which indicates the kind of uncertainty estimates to return.
Heteroskedasticity-consistent: "vcovHC"
, "HC"
, "HC0"
, "HC1"
, "HC2"
, "HC3"
, "HC4"
, "HC4m"
, "HC5"
. See ?sandwich::vcovHC
.
Cluster-robust: "vcovCR"
, "CR0"
, "CR1"
, "CR1p"
, "CR1S"
, "CR2"
, "CR3"
. See ?clubSandwich::vcovCR
.
Bootstrap: "vcovBS"
, "xy"
, "residual"
, "wild"
, "mammen"
, "webb"
. See ?sandwich::vcovBS
.
Other sandwich
package functions: "vcovHAC"
, "vcovPC"
, "vcovCL"
, "vcovPL"
.
List of arguments to be passed to the function identified by
the vcov
argument. This function is typically supplied by the sandwich
or clubSandwich packages. Please refer to their documentation (e.g.,
?sandwich::vcovHAC
) to see the list of available arguments.
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