Error {demest} | R Documentation

## Specify the error term in a prior for a main effect or interaction.

### Description

Priors for main effects or interactions, such as age effects or age-sex interactions, typically include an error term. The error terms can be specified using function `Error`.

### Usage

    Error(robust = FALSE, df = 4, scale = HalfT())

### Arguments

`robust` | Whether to use a t distribution. Defaults to `FALSE`.
`df` | The degrees of freedom for the t distribution. Defaults to 4.
`scale` | Prior for the `scale` parameter. An object of class `HalfT`.

### Details

If `robust = FALSE` (the default), then the error term has a normal distribution,

`error[j] ~ N(0, scale^2)`.

The `scale` parameter has a half-t prior, which is described in the documentation for function `HalfT`.

If `robust = TRUE`, then, by default, the error term has a t distribution with 4 degrees of freedom,

`error[j] ~ t(4, 0, scale^2)`.

Users can supply alternative values for the degrees of freedom. The `scale` parameter has a half-t prior, described in the documentation for `HalfT`.

### Value

An object of class `Error`

### Examples

    Error()
    Error(robust = TRUE)
    Error(robust = TRUE, df = 10)
    Error(scale = HalfT(scale = 0.5, max = 1))
    Error(scale = HalfT(mult = 0.5))

[Package demest version 0.0.0.3.1 Index]