Title: | Skew Scale Mixtures of Normal Distributions |
---|---|
Description: | Performs the EM algorithm for regression models using Skew Scale Mixtures of Normal Distributions. |
Authors: | Luis Benites Sanchez and Clecio da Silva Ferreira |
Maintainer: | Luis Benites Sanchez <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.1 |
Built: | 2025-01-28 03:07:44 UTC |
Source: | https://github.com/lbenitesanchez/ssmn |
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.
Package: | ssmn |
Type: | Package |
Version: | 1.0 |
Date: | 2016-08-08 |
License: | GPL (>=2) |
Clecio da Silva Ferreira [email protected] and Luis Benites Sanchez <[email protected]>
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 examples linked above.
#See examples linked above.
Data on 102 male and 100 female athletes collected at the Australian Institute of Sport.
This data frame contains the following columns:
(0 = male or 1 = female)
height (cm)
weight (kg)
lean body mass
red cell count
white cell count
Hematocrit
Hemoglobin
input description
body mass index, weight/(height)**2
sum of skin folds
Percent body fat
Sport
S. Weisberg (2005). Applied Linear Regression, 3rd edition. New York: Wiley, Section 6.4
##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)
##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)
It provides the density, distribution function, quantile function and random number generator for the Skew Scale Mixtures of Normal Distributions.
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")
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")
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") |
Performs the EM algorithm and envelope for regression models using Skew Scale Mixtures of Normal Distributions
ssmn(y, X, family="sn", method="EM", error = 1e-6, maxit=1000, show.envelope=FALSE) envel(y,X, theta, family="sn", alpha=0.05)
ssmn(y, X, family="sn", method="EM", error = 1e-6, maxit=1000, show.envelope=FALSE) envel(y,X, theta, family="sn", alpha=0.05)
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 |
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. |