View source: R/mc_S3_methods.R
| anova.mcglm | R Documentation |
Performs Wald chi-square tests for assessing the significance of
fixed-effect terms in the linear predictors of an mcglm model.
The tests are conducted separately for each response variable and
are particularly useful for joint hypothesis testing of regression
coefficients associated with categorical covariates with more than
two levels. This function is not intended for model comparison.
## S3 method for class 'mcglm'
anova(object, ..., verbose = TRUE)
object |
An object of class |
... |
Additional arguments. Currently ignored. |
verbose |
Logical indicating whether the Wald test results should be printed
to the console. If |
The Wald tests are computed using the observed covariance matrix of the regression parameter estimates. For each response variable, joint tests are performed for sets of parameters corresponding to the same model term, as defined by the design matrix.
A list of data frames, one for each response variable. Each data frame contains the results of Wald chi-square tests for the fixed-effect terms in the corresponding linear predictor, with the following columns:
Name of the covariate or model term tested.
Value of the Wald chi-square statistic.
Degrees of freedom associated with the test.
P-value of the Wald test.
The returned object is invisible and is primarily intended for programmatic use.
Wagner Hugo Bonat, wbonat@ufpr.br
summary.mcglm, coef.mcglm,
vcov.mcglm
x1 <- seq(-1, 1, length.out = 100)
x2 <- gl(5, 20)
beta <- c(5, 0, -2, -1, 1, 2)
X <- model.matrix(~ x1 + x2)
set.seed(123)
y <- rnorm(100, mean = X %*% beta, sd = 1)
data <- data.frame(y = y, x1 = x1, x2 = x2)
fit <- mcglm(c(y ~ x1 + x2), list(mc_id(data)), data = data)
anova(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.