| gen.trun {gamlss.tr} | R Documentation |
The gen.trun() function allows the user to generate the d, the p, the q, the r and the
gamlss fitting functions of a truncated distribution given that the input family is a current GAMLSS family distribution.
gen.trun(par = c(0), family = "NO", name = "tr", type = c("left", "right", "both"), ...)
par |
a vector with one (for left or right truncation) or two elements for both |
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. |
name |
the characters you want to add to the name of new truncated distribution, by default adds tr |
type |
whether left, right or in both sides truncation is required |
... |
for extra arguments |
Returns the d, the p, the q and the r functions of
a truncated distribution
Mikis Stasinopoulos d.stasinopoulos@londonmet.ac.uk and Bob Rigby r.rigby@londonmet.ac.uk
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.com/).
trun.d, trun.p, trun.q, trun.r
gen.trun(par=c(0,100),family="TF", name="0to100", type="both") plot(function(x) dTF0to100(x, mu=80 ,sigma=20, nu=5), 0, 100) plot(function(x) pTF0to100(x, mu=80 ,sigma=20, nu=5), 0, 100) plot(function(x) qTF0to100(x, mu=80 ,sigma=20, nu=5), 0.01, .999) hist(s1<-rTF0to100(1000, mu=80 ,sigma=20, nu=5)) m1<-gamlss(s1~1, family=TF0to100)