sdlrm {sdlrm} | R Documentation |
Modified Skew Discrete Laplace Regression for Integer-Valued Data
Description
Fit of the modified skew discrete Laplace (SDL) regression model via maximum
likelihood for a parameterization of this distribution that is indexed by the mean, a
dispersion parameter, and the mode (xi
).
Usage
sdlrm(
formula,
data,
subset,
na.action,
phi.link = "log",
xi = 0,
control = sdl_control(...),
...
)
## S3 method for class 'sdlrm'
print(x, digits = max(3, getOption("digits") - 3), ...)
Arguments
formula |
a symbolic description of the model, of type |
data |
an optional data frame containing the variables in the formula. By default the variables are taken from environment(formula). |
subset |
an optional vector specifying a subset of observations to be used in the fitting process. (See additional details about how this argument interacts with data-dependent bases in the ‘Details’ section of the model.frame documentation.) |
na.action |
a function which indicates what should happen when the data contain |
phi.link |
character specification of the link function for the dispersion parameter. The links
|
xi |
the mode of the distribution, an integer value. |
control |
a list of control arguments specified via |
... |
arguments passed to |
x |
a fitted model object of class |
digits |
a non-null value for digits specifies the minimum number of significant digits to be printed in values. |
Value
The sdlrm
function returns an object of class "sdlrm"
, which consists of a
list with the following components:
- coefficients
a list containing the elements "
mean
" and "dispersion
" that consist of the estimates of the coefficients associated with the mean and the dispersion parameter, respectively.- fitted.values
a vector with the fitted means.
- phi
a vector with the fitted dispersion parameters.
- phi.link
the link function used for the dispersion parameter model.
- xi
the specified mode for the model.
- logLik
log-likelihood value of the fitted model.
- vcov
asymptotic covariance matrix of the maximum likelihood estimator of the model parameters vector.
- nobs
Sample size.
- y
the response vector.
- x
a list with elements "
mean
" and "dispersion
" containing the model matrices from the respective models.- optim.pars
object returned by
optim
function in thesdlrm
function.- call
the function call.
- formula
the formula used to specify the model in
sdlrm
.- terms
a list with elements "mean", "dispersion" and "full" containing the terms objects for the respective models.
The print()
function returns a basic summary of the model fit with the estimated
coefficients, the log-likelihood value, the mode specified in the fit, and the Akaike (AIC)
and Bayesian (BIC) information criteria.
Author(s)
Rodrigo M. R. de Medeiros <rodrigo.matheus@ufrn.br>
References
Medeiros, R. M. R., and Bourguignon, M. (2025). Modified skew discrete Laplace regression models for integer valued data with applications to paired samples. Manuscript submitted for publication.
See Also
summary.sdlrm
for more detailed summaries,
residuals.sdlrm
to extract residuals from the fitted model,
predict.sdlrm
for predictions, including mean and dispersion fitted values,
fitted variances, and fitted quantiles,
plot.sdlrm
for diagnostic plots.
choose_mode
for mode estimation via profile likelihood.
envelope
to create normal probability graphs with simulated envelope.
disp_test
to test the hypothesis of constant dispersion.
Information on additional methods for "sdlrm"
objects can be found at sdlrm-methods
.
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 with a model only for the mean (mode = 1)
fit0 <- sdlrm(difference ~ group, data = pss, xi = 1)
fit0
summary(fit0)
# Fit a double model (mean and dispersion)
fit <- sdlrm(difference ~ group | group, data = pss, xi = 1)
fit
summary(fit)