Learn R Programming

gamlss.dist (version 4.3-4)

MN3: 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

Value

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

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 code{MN3()}, MN4() and MN5() by specifying the number of levels of the response. Note that MULTIN(2) will produce a binomial fit.

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.

See Also

gamlss.family, BI

Examples

Run this code
dMN3(3)
 pMN3(2)
 qMN3(.6)
 rMN3(10)

Run the code above in your browser using DataLab