Description Usage Arguments Details Value Examples

Constructor of a list of density function, distribution function, quantile function, random generation and hazard function for the Transform-Both-Sides (TBS) distribution.

1 | ```
dist.error(dist="norm")
``` |

`dist` |
Distribution of error, dist = "norm", "t", "doubexp", "cauchy" or "logistic". A choice "all" can also be given, in which case a list with all the available distributions will be generated. |

This wrapper creates a list with the necessary information about a distribution to be used with the Transform-Both-Sides (TBS) model. It returns a list with five items, namely the density function, distribution function, quantile function, random generation function, and name (a string). For example, with dist = "norm" it gives list(dnorm,pnorm,qnorm,rnorm,"norm"). The idea is that the user can implement its own list to be used with the TBS, as long as it is a zero-centered unimodal symmetric distribution, and replace the call of dist.error with their own list (given in a similar way as the output of dist.error).

A list(d.dist,p.dist,q.dist,r.dist,name.dist) according with the chosen distribution. The functions d.dist,p.dist,q.dist,r.dist have to accept exactly two arguments: the first is the actual argument to the function, and the second is a parameter.

1 2 3 4 5 6 7 8 9 10 11 | ```
## this will return list(dcauchy,pcauchy,qcauchy,rcauchy,"cauchy")
dist = dist.error("cauchy")
## a user-built distribution would look like:
## dist = list(
## d = function(x,xi) dmydistrib(x,param=xi), # density
## p = function(x,xi) pmydistrib(x,param=xi), # distr
## q = function(x,xi) qmydistrib(x,param=xi), # quantile
## r = function(x,xi) rmydistrib(x,param=xi), # generation
## name = "mydistrib"
## )
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.