Package 'ssmn'

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

Help Index


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 [email protected] and Luis Benites Sanchez <[email protected]>

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

ssmn

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 nn where nn is the total of observations.

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 nn where nn is the total of observations.

X

the matrix of explanatory variables of dimension nx(p+1)n x (p+1) where nn is the total of observations and p is the number of variables.

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.