Description Usage Arguments Details Value Note Author(s) References Examples
The fuction RBS()
defines the BS distribution, a two paramenter
distribution, for a gamlss.family object to be used in GAMLSS fitting using using the
function gamlss()
, with mean equal to the parameter mu
and sigma
equal the precision parameter. The functions dRBS
, pRBS
, qRBS
and
rBS
define the density, distribution function, quantile function and random
genetation for the RBS
parameterization of the RBS distribution.
1 2 3 4 5 6 7 | RBS(mu.link = "identity", sigma.link = "identity")
dRBS(x, mu = 1, sigma = 1, log = FALSE)
pRBS(q, mu = 1, sigma = 1, lower.tail = TRUE, log.p = FALSE)
qRBS(p, mu = 1, sigma = 1, lower.tail = TRUE, log.p = FALSE)
rRBS(n, mu = 1, sigma = 1)
plotRBS(mu = .5, sigma = 1, from = 0, to = 0.999, n = 101, ...)
meanRBS(obj)
|
mu.link |
object for which the extraction of model residuals is meaningful. |
sigma.link |
type of residual to be used. |
x, q |
vector of quantiles |
mu |
vector of scale parameter values |
sigma |
vector of shape parameter values |
log, |
log.p logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x] |
p |
vector of probabilities. |
n |
number of observations. If |
from |
where to start plotting the distribution from |
to |
up to where to plot the distribution |
obj |
a fitted RBS object |
... |
other graphical parameters for plotting |
The parametrization of the normal distribution given in the function RBS() is
f_{Y}(y;μ,δ)=\frac{\exp≤ft(δ/2\right)√{δ+1}}{4√{πμ}\,y^{3/2}} ≤ft[y+\frac{δ μ}{δ+1}\right] \exp≤ft(-\frac{δ}{4} ≤ft[\frac{y\{δ+1\}}{δμ}+\frac{δμ}{y\{δ+1\}}\right]\right) y>0.
returns a gamlss.family
object which can be used to fit a normal distribution in the gamlss()
function.
For the function RBS(), mu is the mean and sigma is the precision parameter of the Birnbaum-Saunders distribution.
Manoel Santos-Neto manoel.ferreira@ufcg.edu.br, F.J.A. Cysneiros cysneiros@de.ufpe.br, Victor Leiva victorleivasanchez@gmail.com and Michelli Barros michelli.karinne@gmail.com
Leiva, V., Santos-Neto, M., Cysneiros, F.J.A, Barros, M. (2014) Birnbaum-Saunders statistical modelling: a new approach. Statistical Modelling, v. 14, p. 21-48, 2014.
1 2 3 4 5 6 7 8 9 10 11 12 13 | plotRBS()
dat <- rRBS(1000); hist(dat)
fit <- gamlss(dat~1,family=RBS(),method=CG())
meanRBS(fit)
##install.packages(faraway)
library(faraway)
data(cpd)
attach(cpd)
model0 = gamlss(actual ~ projected, family=RBS(mu.link="identity"),method=CG())
summary(model0)
model = gamlss(actual ~ 0+projected, family=RBS(mu.link="identity"),method=CG())
summary(model)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.