YULE: Yule distribution for fitting a GAMLSS model

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

The function YULE defines the Yule distribution, a one parameter distribution, for a gamlss.family object to be used in GAMLSS fitting using the function gamlss(), with mean equal to the parameter mu. The functions dYULE, pYULE, qYULE and rYULE define the density, distribution function, quantile function and random generation for the YULE parameterization of the Yule distribution.

Usage

1
2
3
4
5
6
YULE(mu.link = "log")
dYULE(x, mu = 2, log = FALSE)
pYULE(q, mu = 2, lower.tail = TRUE, log.p = FALSE) 
qYULE(p, mu = 2, lower.tail = TRUE, log.p = FALSE, 
    max.value = 10000)
rYULE(n, mu = 2)

Arguments

mu.link

Defines the mu.link, with "log" link as the default for the mu parameter

x

vector of (non-negative integer) quantiles.

q

vector of quantiles.

p

vector of probabilities.

n

number of random values to return.

mu

vector of positive mu values.

lower.tail

logical; if TRUE (default) probabilities are P[Y≤q y], otherwise, P[Y>y].

log, log.p

logical; if TRUE probabilities p are given as log(p).

max.value

constant; generates a sequence of values for the cdf function.

Details

The Yule distribution has density

p(y)=beta(lambda+1, x+1)/beta(lambda, 1)

where

lambda = (mu+1)/mu

for y=0,1,2,… and mu>0.

Value

Returns a gamlss.family object which can be used to fit a Yule distribution in the gamlss() function.

Author(s)

Fiona McElduff, Bob Rigby and Mikis Stasinopoulos.

References

Wimmer, G. and Altmann, G. (1999) Thesaurus of univariate discrete probability distributions. Stamm.

See Also

gamlss.family

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
par(mfrow=c(2,2))
y<-seq(0,20,1)
plot(y, dYULE(y), type="h")
q <- seq(0, 20, 1)
plot(q, pYULE(q), type="h")
p<-seq(0.0001,0.999,0.05)
plot(p , qYULE(p), type="s")
dat <- rYULE(100)
hist(dat)
#summary(gamlss(dat~1, family=YULE))


Search within the gamlss.dist package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.