R: Methods for the Class 'DirichletRegModel'

DirichletRegModel {DirichletReg} | R Documentation

## 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), ...)

    ## S3 method for class 'DirichletRegModel'
    summary(object, ...)

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

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

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

    ## S3 method for class 'DirichletRegModel'
    confint(object, parm, level, ..., type=c("all", "beta", "gamma"), exp = FALSE)

    ## S3 method for class 'DirichletRegConfint'
    print(x, digits = 3, ...)

    ## S3 method for class 'DirichletRegModel'
    logLik(object, ...)

    ## S3 method for class 'DirichletRegModel'
    AIC(object, ..., k = 2)

    ## S3 method for class 'DirichletRegModel'
    BIC(object, ...)

    ## S3 method for class 'DirichletRegModel'
    nobs(object, ...)

    ## S3 method for class 'DirichletRegModel'
    vcov(object, ...)

    ## S3 method for class 'DirichletRegModel'
    update(object, formula., ..., evaluate = TRUE)

    ## S3 method for class 'DirichletRegModel'
    drop1(object, scope, test = c("LRT", "none"), k = 2, sort = TRUE, ...)

### 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"`, `"beta"`, or `"gamma"`) for which confidence values are returned
`newdata` | a `data.frame` containing new observations
`k` | number for the weighting of parameters
`parm` | a vector containing names of the parameters to print
`level` | (a vector of) confidence level(s), defaults to `.95`
`exp` | logical; returns parameters in exponentiated form
`digits` | the number of digits in the output
`formula.` | the new formula to be updated, see `update.formula` and `update.Formula`
`evaluate` | if `FALSE` the updated call will be returned, but not evaluated
`scope` | defines the scope of variables to be dropped, see `drop1`
`test` | defines the type of test for `drop1`
`sort` | if `TRUE`, p-values will be sorted in decreasing order.
`...` | further arguments

### Author(s)

Marco J. Maier

### Examples

    ALake <- ArcticLake
    ALake$AL <- DR_data(ArcticLake[, 1:3])

    mod1 <- DirichReg(AL ~ depth + I(depth^2) | depth, data = ALake, model="alternative")

    update(mod1, . ~ . | . + I(depth^2), evaluate = FALSE)
    mod1

    drop1(mod1)   ### issues a caveat when used for the first time in an R session

    summary(mod1)

    head(fitted(mod1))

    predict(mod1, newdata = data.frame("depth" = seq(10, 100, 10)))

    head(residuals(mod1))

    confint(mod1)
    confint(mod1, exp = TRUE)

    logLik(mod1)
    round(vcov(mod1), 5)

[Package DirichletReg version 0.7-0 Index]