View source: R/mc_sic_covariance.R
| mc_sic_covariance | R Documentation |
Computes the Score Information Criterion (SIC) for covariance
components of a fitted mcglm object. The SIC-covariance is used
to select components of the matrix linear predictor and can be
employed in stepwise selection procedures.
mc_sic_covariance(object, scope, idx, data, penalty = 2, response, weights)
object |
An object of class |
scope |
A list of matrices to be tested for inclusion in the matrix linear predictor. |
idx |
An integer vector indicating which matrices in |
data |
A data frame containing all variables involved in the model. |
penalty |
A numeric penalty term applied to the SIC (default is 2). |
response |
An integer indicating the response variable for which the SIC-covariance is computed. |
weights |
An optional numeric vector of weights used in model fitting. If not provided, unit weights are assumed. |
The SIC-covariance is computed using the Pearson estimating function.
For each group of matrices defined by idx, a score-based test
statistic is calculated to assess the contribution of the associated
covariance components, penalized by model complexity.
A data frame with the following columns:
Score Information Criterion value.
Degrees of freedom associated with the test.
Total number of covariance parameters in the extended model.
Score-based test statistic.
Reference chi-squared quantile with 95% confidence level.
Bonat, W. H., et al. (2016). Modelling the covariance structure in marginal multivariate count models: Hunting in Bioko Island. Journal of Agricultural, Biological and Environmental Statistics, 22(4), 446–464.
Bonat, W. H. (2018). Multiple Response Variables Regression Models in R: The mcglm Package. Journal of Statistical Software, 84(4), 1–30.
mc_sic
set.seed(123)
SUBJECT <- gl(10, 10)
y <- rnorm(100)
data <- data.frame(y, SUBJECT)
Z0 <- mc_id(data)
Z1 <- mc_mixed(~ 0 + SUBJECT, data = data)
fit0 <- mcglm(
linear_pred = c(y ~ 1),
matrix_pred = list(Z0),
data = data
)
mc_sic_covariance(
fit0,
scope = Z1,
idx = 1,
data = data,
response = 1
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.