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

a model formula or terms object or an "sdlrm" object.

...

further arguments passed to or from other methods.

object

an object of class "sdlrm", a result of a call to sdlrm.

parm

a character indicating which group of parameters is to be considered in the function. The options are "mean" (default) to obtain the output in relation to the coefficients associated with the mean, "dispersion" to obtain the output in relation to the coefficients associated with the dispersion, or "full" (when applicable) to consider all the parameters,

k

numeric, the penalty per parameter to be used; the default k = 2 is the classical AIC.

Value

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")

[Package sdlrm version 0.1.2 Index]