| sdlrm-methods | R Documentation |
Additional methods for "sdlrm" objects.
## 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)
formula |
a model formula or terms object or an |
... |
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
|
model.frame returns a data.frame containing the variables required
by formula and any additional arguments provided via ....
model.matrix returns the design matrix used in the regression structure,
as specified by the parm argument.
coef returns a numeric vector of estimated regression coefficients, based
on the parm argument. If parm = "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 the parm 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 on k.
Rodrigo M. R. de Medeiros <rodrigo.matheus@ufrn.br>
# 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.