R: Truncated Inverse Cumulative Density Function of a...
trun.q
R Documentation
Truncated Inverse Cumulative Density Function of a gamlss.family Distribution
Description
Creates a function to produce the inverse of a truncated cumulative density function generated from a current GAMLSS family distribution.
For continuous distributions left truncation at 3 means that the random variable can take the value 3.
For discrete distributions left truncation at 3 means that the random variable can take values from 4 onwards.
This is the same for right truncation. Truncation at 15 for a discrete variable means that
15 and greater values are not allowed but for continuous variable it mean values greater that 15 are not allowed
(so 15 is a possible value).
Usage
trun.q(par, family = "NO", type = c("left", "right", "both"),
varying = FALSE, ...)
Arguments
par
a vector with one (for "left" or "right" truncation) or two elements for "both". When the argument varying = TRUE then par can be a vector or a matrix with two columns respectively.
family
a gamlss.family object, which is used to define the distribution and the link functions of the various parameters.
The distribution families supported by gamlss() can be found in gamlss.family.
Functions such as BI() (binomial) produce a family object.
type
whether left, right or in both sides truncation is required, (left is the default)
varying
whether the truncation varies for diferent observations. This can be usefull in regression analysis. If varying = TRUE then par should be an n-length vector for type equal "left" and "right" and an n by 2 matrix for type="both"
Rigby, R. A. and Stasinopoulos D. M. (2005). Generalized additive models for location, scale and shape,(with discussion),
Appl. Statist., 54, part 3, pp 507-554.
Stasinopoulos D. M., Rigby R.A. and Akantziliotou C. (2003) Instructions on how to use the GAMLSS package in R.
Accompanying documentation in the current GAMLSS help files, (see also http://www.gamlss.org/).