View source: R/4_standard_error.R
standard_error | R Documentation |
standard_error()
attempts to return standard errors of model
parameters.
standard_error(model, ...)
## Default S3 method:
standard_error(
model,
component = "all",
vcov = NULL,
vcov_args = NULL,
verbose = TRUE,
...
)
## S3 method for class 'factor'
standard_error(model, force = FALSE, verbose = TRUE, ...)
## S3 method for class 'glmmTMB'
standard_error(
model,
effects = "fixed",
component = "all",
verbose = TRUE,
...
)
## S3 method for class 'merMod'
standard_error(
model,
effects = "fixed",
method = NULL,
vcov = NULL,
vcov_args = NULL,
...
)
model |
A model. |
... |
Arguments passed to or from other methods. |
component |
Model component for which standard errors should be shown.
See the documentation for your object's class in |
vcov |
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.
|
vcov_args |
List of arguments to be passed to the function identified by
the |
verbose |
Toggle warnings and messages. |
force |
Logical, if |
effects |
Should standard errors for fixed effects ( |
method |
Method for computing degrees of freedom for
confidence intervals (CI) and the related p-values. Allowed are following
options (which vary depending on the model class): |
A data frame with at least two columns: the parameter names and the standard errors. Depending on the model, may also include columns for model components etc.
For Bayesian models (from rstanarm or brms), the standard error is the SD of the posterior samples.
model <- lm(Petal.Length ~ Sepal.Length * Species, data = iris)
standard_error(model)
# robust standard errors
standard_error(model, vcov = "HC3")
# cluster-robust standard errors
standard_error(model,
vcov = "vcovCL",
vcov_args = list(cluster = iris$Species)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.