Type: | Package |
Title: | Skew Scale Mixtures of Normal Distributions |
Version: | 1.1 |
Date: | 2016-08-08 |
Author: | Luis Benites Sanchez and Clecio da Silva Ferreira |
Maintainer: | Luis Benites Sanchez <lbenitesanchez@gmail.com> |
Imports: | mnormt, moments, truncdist, sn |
Description: | Performs the EM algorithm for regression models using Skew Scale Mixtures of Normal Distributions. |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
LazyData: | TRUE |
NeedsCompilation: | no |
Packaged: | 2016-08-08 15:53:59 UTC; Larissa |
Repository: | CRAN |
Date/Publication: | 2016-08-09 02:42:17 |
Skew Scale Mixtures of Normal Distributions
Description
It provides the density, distribution function, quantile function, random number generator, likelihood function, direct and EM algorithm for Maximum Likelihood estimators for a given sample, all this for regression models using Skew Scale Mixtures of Normal Distributions.
Details
Package: | ssmn |
Type: | Package |
Version: | 1.0 |
Date: | 2016-08-08 |
License: | GPL (>=2) |
Author(s)
Clecio da Silva Ferreira clecio.ferreira@ufjf.edu.br and Luis Benites Sanchez <lbenitesanchez@gmail.com>
References
C.S. Ferreira; H. Bolfarine; V. H. Lachos (2011). Skew scale mixture of normal distributions: properties and estimation. Statistical Methodology, 8(2), 154-171.
C. S. Ferreira, V. H. Lachos, H. Bolfarine (2015). Inference and diagnostics in skew scale mixtures of normal regression models. Journal of Statistical Computation and Simulation, 85, 517-537.
See Also
Examples
#See examples linked above.
Australian institute of sport data
Description
Data on 102 male and 100 female athletes collected at the Australian Institute of Sport.
Format
This data frame contains the following columns:
- sex
-
(0 = male or 1 = female)
- Ht
-
height (cm)
- Wt
-
weight (kg)
- LBM
-
lean body mass
- RCC
-
red cell count
- WCC
-
white cell count
- Hc
-
Hematocrit
- Hg
-
Hemoglobin
- Fe
-
input description
- BMI
-
body mass index, weight/(height)**2
- SSF
-
sum of skin folds
- Bfat
-
Percent body fat
- sport
-
Sport
References
S. Weisberg (2005). Applied Linear Regression, 3rd edition. New York: Wiley, Section 6.4
Examples
##Load the data
library(ssmn)
data(ais)
attach(ais)
#Set the response y and covariate x
x1 <- cbind(1,SSF,Ht)
y <- Bfat
##Fits a Skew Scale Mixtures of Normal Distributions to the data
fit.ssmn <- ssmn(y, x1, family="sn", method="EM", error = 1e-6, maxit=1000, show.envelope=FALSE)
#Show envelope
theta <- c(fit.ssmn$beta,fit.ssmn$sigma2,fit.ssmn$lambda)
envel(y,x1,theta,family="sn",alpha=0.05)
Skew Scale Mixtures of Normal Distributions
Description
It provides the density, distribution function, quantile function and random number generator for the Skew Scale Mixtures of Normal Distributions.
Usage
dssmn(x, location=0, scale=1, shape=0, nu= 1, gama=1, dp=NULL, family="sn")
pssmn(q, location=0, scale=1, shape=0, nu= 1, gama=1, dp=NULL, family="sn")
qssmn(p, location=0, scale=1, shape=0, nu= 1, gama=1, dp=NULL, family="sn")
rssmn(n, location=0, scale=1, shape=0, nu= 1, gama=1, dp=NULL, family="sn")
Arguments
x |
the response vector of length |
q |
vector of quantiles. |
p |
vector of probabilities. |
n |
number of observations. |
location |
parameter of location. |
scale |
parameter of scale. |
shape |
parameter of shape. |
nu |
degrees of freedom for "stn", "ssl" and "sep". For "scn", nu parameter is considered as proportion of outliers. |
gama |
factor scale, but only used by family "scn". |
dp |
vector of parameters. |
family |
Distribution famility to be used in fitting ("sn", "stn", "ssl", "scn", "sep") |
EM algorithm for Skew Scale Mixtures of Normal Distributions
Description
Performs the EM algorithm and envelope for regression models using Skew Scale Mixtures of Normal Distributions
Usage
ssmn(y, X, family="sn", method="EM", error = 1e-6, maxit=1000, show.envelope=FALSE)
envel(y,X, theta, family="sn", alpha=0.05)
Arguments
y |
the response vector of length |
X |
the matrix of explanatory variables of dimension |
family |
its defines the distribution to ber used: sn, stn, ssl, scn or sep. |
method |
the method to calculate the maximum likelihood estimates: EM algorithm or direct maximum likelihood estimates via Newton-Raphson. |
maxit |
Maximum number of iterations. |
error |
accuracy the convergence maximum error. |
show.envelope |
TRUE or FALSE. Indicates if envelope graph should be built for the fitted model. Default is FALSE. |
alpha |
1 - alpha is level of confidence. |
theta |
Estimated parameter vector |
Value
The function returns a list with 8 elements detailed as
iter |
number of iterations. |
tetha |
estimated parameter vector. |
SE |
Standard Error estimates. |
table |
Table containing the inference for the estimated parameters. |
loglik |
Log-likelihood value. |
AIC |
Akaike information criterion. |
BIC |
Bayesian information criterion. |
time |
processing time. |