Learn R Programming

DirichletReg (version 0.3-0)

DirichletRegModel: Methods for the class DirichletRegModel

Description

These are available methods for the results of Dirichlet regression models and objects of class DirichletRegModel. These methods contain functions for print and summary of the data, generate fitted values and predicting new values using predict. Various types of residuals are implemented and confint can be used to compute confidence intervals of the parameters. Furthermore logLik extracts the log-likelihood of the model and vcov extracts the covariance matrix of the parameter estimates.

Usage

## S3 method for class 'DirichletRegModel':
print(x, digits = max(3, getOption("digits") - 3), \ldots)

## S3 method for class 'DirichletRegModel':
summary(object, digits = max(3, getOption("digits") - 3), \ldots)

## S3 method for class 'DirichletRegModel':
fitted(object, mu = TRUE, alpha = FALSE, phi = FALSE, \ldots)

## S3 method for class 'DirichletRegModel':
predict(object, newdata, mu = TRUE, alpha = FALSE, phi = FALSE, \ldots)

## S3 method for class 'DirichletRegModel':
residuals(object, type = c("standardized", "composite", "raw"), \ldots)

## S3 method for class 'DirichletRegModel':
confint(object, parm, level, \ldots, type=c("all", "beta", "gamma"), e = FALSE)

## S3 method for class 'DirichletRegConfint':
print(x, digits = 3, \ldots)

## S3 method for class 'DirichletRegModel':
logLik(object, \ldots)
## S3 method for class 'DirichletRegModel':
vcov(object, \ldots)

Arguments

x
an object of class DirichletRegModel
object
an object of class DirichletRegModel or DirichletRegConfint for printing an object obtained by confint.DirichletRegModel
alpha
logical; returns alpha values
mu
logical; returns expected values
phi
logical; returns precision values
type
for residuals: defines the type of residuals to be computed "standardized" (i.e. Pearson), "composite", or "raw" for confint: defines the type of parameter ("all"
newdata
a data.frame containing new observations
parm
a vector containing names of the parameters to print
level
(a vector of) confidence level(s), defaults to .95
e
logical; returns parameters in exponentiated form
digits
the number of digits in the output
...
further arguments

Examples

Run this code
AL <- DR_data(ArcticLake[, 1:3])
  modl <- DirichReg(AL ~ depth + I(depth^2) | phi ~ depth, data = ArcticLake)
  modl
  summary(modl)
  head(fitted(modl))
  head(predict(modl))
  head(residuals(modl))
  confint(modl)
  logLik(modl)
  vcov(modl)

Run the code above in your browser using DataLab