Multinomial: Multinomial distribution in GAMLSS

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

Description

The set of function presented here is useful for fitting multinomial regression within gamlss.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
MN3(mu.link = "log", sigma.link = "log")
MN4(mu.link = "log", sigma.link = "log", nu.link = "log")
MN5(mu.link = "log", sigma.link = "log", nu.link = "log", tau.link = "log")
MULTIN(type = "3")
fittedMN(model)

dMN3(x, mu = 1, sigma = 1, log = FALSE)
dMN4(x, mu = 1, sigma = 1, nu = 1, log = FALSE)
dMN5(x, mu = 1, sigma = 1, nu = 1, tau = 1, log = FALSE)

pMN3(q, mu = 1, sigma = 1, lower.tail = TRUE, log.p = FALSE)
pMN4(q, mu = 1, sigma = 1, nu = 1, lower.tail = TRUE, log.p = FALSE)
pMN5(q, mu = 1, sigma = 1, nu = 1, tau = 1, lower.tail = TRUE, log.p = FALSE)

qMN3(p, mu = 1, sigma = 1, lower.tail = TRUE, log.p = FALSE)
qMN4(p, mu = 1, sigma = 1, nu = 1, lower.tail = TRUE, log.p = FALSE)
qMN5(p, mu = 1, sigma = 1, nu = 1, tau = 1, lower.tail = TRUE, log.p = FALSE)

rMN3(n, mu = 1, sigma = 1)
rMN4(n, mu = 1, sigma = 1, nu = 1)
rMN5(n, mu = 1, sigma = 1, nu = 1, tau = 1)

Arguments

mu.link

the link function for mu

sigma.link

the link function for sigma

nu.link

the link function for nu

tau.link

the link function for tau

x

the x variable

q

vector of quantiles

p

vector of probabilities

lower.tail

logical; if TRUE (default), probabilities are P[X <= x] otherwise, P[X > x].

log.p

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

log

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

n

the number of observations

mu

the mu parameter

sigma

the sigma parameter

nu

the nu parameter

tau

the tau parameter

type

permitted values are 2 (Binomial), 3, 4, and 5

model

a gamlss multinomial fitted model

Details

GAMLSS is in general not suitable for multinomial regression. Nevertheless multinomial regression can be fitted within GAMLSS if the response variable y has less than five categories. The function here provide the facilities to do so. The functions MN3(), MN4() and MN5() fit multinomial responses with 3, 4 and 5 categories respectively. The function MULTIN() can be used instead of codeMN3(), MN4() and MN5() by specifying the number of levels of the response. Note that MULTIN(2) will produce a binomial fit.

Value

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

Author(s)

Mikis Stasinopoulos, Bob Rigby and Vlasios Voudouris

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.

Stasinopoulos D. M., Rigby R.A. and Akantziliotou C. (2006) Instructions on how to use the GAMLSS package in R. Accompanying documentation in the current GAMLSS help files, (see also http://www.gamlss.org/).

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, http://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

gamlss.family, BI

Examples

1
2
3
4
5
 dMN3(3)
 pMN3(2)
 qMN3(.6)
 rMN3(10)
  

Stan125/gamlss.dist documentation built on May 12, 2019, 7:38 a.m.