Multinomial: Multinomial distribution in GAMLSS

MN3R Documentation

Multinomial distribution in GAMLSS

Description

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

Usage

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.

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, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1201/9780429298547")}. 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, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v023.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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1201/b21973")}

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

See Also

gamlss.family, BI

Examples

 dMN3(3)
 pMN3(2)
 qMN3(.6)
 rMN3(10)
  

gamlss.dist documentation built on Aug. 24, 2023, 1:06 a.m.