sdlrm-methods {sdlrm} | R Documentation |
Extract Information From a Modified Skew Discrete Laplace Regression Fit
Description
Additional methods for "sdlrm"
objects.
Usage
## S3 method for class 'sdlrm'
model.frame(formula, ...)
## S3 method for class 'sdlrm'
model.matrix(object, parm = c("mean", "dispersion"), ...)
## S3 method for class 'sdlrm'
coef(object, parm = c("mean", "dispersion", "full"), ...)
## S3 method for class 'sdlrm'
vcov(object, parm = c("mean", "dispersion", "full"), ...)
## S3 method for class 'sdlrm'
logLik(object, ...)
## S3 method for class 'sdlrm'
AIC(object, ..., k = 2)
Arguments
formula |
|
... |
further arguments passed to or from other methods. |
object |
an object of class |
parm |
a character indicating which group of parameters is to be considered in the function.
The options are |
k |
numeric, the penalty per parameter to be used; the default
|
Value
-
model.frame
returns adata.frame
containing the variables required byformula
and any additional arguments provided via...
. -
model.matrix
returns the design matrix used in the regression structure, as specified by theparm
argument. -
coef
returns a numeric vector of estimated regression coefficients, based on theparm
argument. Ifparm = "full"
, it returns a list with the components"mean"
and"dispersion"
, each containing the corresponding coefficient estimates. -
vcov
returns the asymptotic covariance matrix of the regression coefficients, based on theparm
argument. -
logLik
returns the log-likelihood value of the fitted model. -
AIC
returns a numeric value representing the Akaike Information Criterion (AIC), Bayesian Information Criterion, or another criterion, depending onk
.
Author(s)
Rodrigo M. R. de Medeiros <rodrigo.matheus@ufrn.br>
Examples
# Data set: pss (for description run ?pss)
barplot(table(pss$difference), xlab = "PSS index difference", ylab = "Frequency")
boxplot(pss$difference ~ pss$group, xlab = "Group", ylab = "PSS index difference")
# Fit a double model (mode = 1)
fit <- sdlrm(difference ~ group | group, data = pss, xi = 1)
# Coef
coef(fit)
coef(fit, parm = "dispersion")
coef(fit, parm = "full")
# vcov
vcov(fit)
vcov(fit, parm = "dispersion")
vcov(fit, parm = "full")
# Log-likelihood value
logLik(fit)
# AIC and BIC
AIC(fit)
AIC(fit, k = log(fit$nobs))
# Model matrices
model.matrix(fit)
model.matrix(fit, "dispersion")