The set of function presented here is useful for fitting multinomial regression within gamlss.
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)
the link function for mu
the link function for sigma
the link function for nu
the link function for tau
the x variable
vector of quantiles
vector of probabilities
logical; if TRUE (default), probabilities are P[X <= x] otherwise, P[X > x].
logical; if TRUE, probabilities p are given as log(p).
logical; if TRUE, probabilities p are given as log(p).
the number of observations
the mu parameter
the sigma parameter
the nu parameter
the tau parameter
permitted values are 2 (Binomial), 3, 4, and 5
a gamlss multinomial fitted model
returns a gamlss.family
object which can be used to fit a binomial distribution in the gamlss()
function.
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.
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.
dMN3(3)
pMN3(2)
qMN3(.6)
rMN3(10)
Run the code above in your browser using DataLab