gamlss.tr-package {gamlss.tr}R Documentation

Generating and Fitting Truncated ‘gamlss.family’ Distributions

Description

This is an add on package to GAMLSS. The purpose of this package is to allow users to defined truncated distributions in GAMLSS models. The main function gen.trun() generates truncated version of an existing GAMLSS family distribution.

Details

The DESCRIPTION file:

Package: gamlss.tr
Type: Package
Title: Generating and Fitting Truncated `gamlss.family' Distributions
Version: 5.1-9
Date: 2024-01-28
Author: Mikis Stasinopoulos <d.stasinopoulos@gre.ac.uk>, Bob Rigby <r.rigby@gre.ac.uk>
Maintainer: Mikis Stasinopoulos <d.stasinopoulos@gre.ac.uk>
LazyLoad: yes
Depends: R (>= 2.2.1), gamlss.dist, gamlss (>= 5.0-0), methods
Description: This is an add on package to GAMLSS. The purpose of this package is to allow users to defined truncated distributions in GAMLSS models. The main function gen.trun() generates truncated version of an existing GAMLSS family distribution.
License: GPL-2 | GPL-3
URL: https://www.gamlss.com/

Index of help topics:

fitTail                 For fitting truncated distribution to the tails
                        of data
gamlss.tr-package       Generating and Fitting Truncated
                        'gamlss.family' Distributions
gen.trun                Generates a truncated distribution from a
                        gamlss.family
trun                    Fits a Truncate Distribution from a
                        gamlss.family
trun.d                  Truncated Probability Density Function of a
                        gamlss.family Distribution
trun.p                  Truncated Cumulative Density Function of a
                        gamlss.family Distribution
trun.q                  Truncated Inverse Cumulative Density Function
                        of a gamlss.family Distribution
trun.r                  Generates Random Values from a Truncated
                        Density Function of a gamlss.family
                        Distribution

Author(s)

Mikis Stasinopoulos <d.stasinopoulos@gre.ac.uk>, Bob Rigby <r.rigby@gre.ac.uk>

Maintainer: Mikis Stasinopoulos <d.stasinopoulos@gre.ac.uk>

References

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.

Rigby, R. A., Stasinopoulos, D. M., Heller, G. Z., and De Bastiani, F. (2019) Distributions for modeling location, scale, and shape: Using GAMLSS in R, Chapman and Hall/CRC. An older version can be found in https://www.gamlss.com/.

Stasinopoulos D. M. Rigby R.A. (2007) Generalized additive models for location scale and shape (GAMLSS) in R. Journal of Statistical Software, Vol. 23, Issue 7, Dec 2007, https://www.jstatsoft.org/v23/i07/.

Stasinopoulos D. M., Rigby R.A., Heller G., Voudouris V., and De Bastiani F., (2017) Flexible Regression and Smoothing: Using GAMLSS in R, Chapman and Hall/CRC.

(see also https://www.gamlss.com/).

Examples

# generating a t-distribution from 0 to 100  	
gen.trun(par=c(0,100),family="TF", name="0to100", type="both")
op<-par(mfrow=c(2,2))
plot(function(x) dTF0to100(x, mu=80 ,sigma=20, nu=5), 0, 100, ylab="pdf")
plot(function(x) pTF0to100(x, mu=80 ,sigma=20, nu=5), 0, 100, ylab="cdf")
plot(function(x) qTF0to100(x, mu=80 ,sigma=20, nu=5), 0.01, .999, ylab="invcdf")
hist(s1<-rTF0to100(1000, mu=80 ,sigma=20, nu=5), ylab="hist", xlab="x", main="generated data")
par(op)

[Package gamlss.tr version 5.1-9 Index]