Learn R Programming

sn (version 0.4-18)

sn.2logL.profile: Twice profile relative negative loglikelihood for skew-normal models

Description

Computation and plot of 1-dimensional and 2-dimensional profile relative (-2)*loglikelihood for skew-normal regression models.

Usage

sn.2logL.profile(X=matrix(rep(1, n)), y,
    param.range=c(sqrt(var(y)) * c(2/3, 3/2), -0.95, 0.95),
    use.cp=TRUE, npts=51 %/% d, plot.it=TRUE, ...)

Arguments

y
a numeric vector. Missing values (NA's) are not allowed.
X
a matrix of explanatory variables. It must have col(X) equal to length(y), and it must include a column of 1's if an intercept term is required. Missing values (NA's) are not allowed. If X is missing, a
param.range
a numeric vector of length either 2 or 4. If the length is 2, the dimensional value d is set to 1, and a 1-dimensional profile is computed and plotted, for the shape or skewness parameter (depending on the parametrization adopted; see below);
use.cp
logical value which selects the parametrization adopted. If use.cp=TRUE (default value), the centred parametrization is used, otherwise the direct parametrization is adopted.
npts
number of points (in the scalar case) or grid size (in the two-dimensional case).
plot.it
logical value which determines if plotting takes place; default is TRUE.
...
any additional parameter is passed to sn.em.

Value

  • A list containing the following components
  • param1vectors of the parameters values where the function has been evaluated. If d=2, the second vector contains NAs.
  • param.namesa character vector of two elements with the names of the param1 and param2.
  • 2logLa vector or a matrix which represents the profile (-2)*loglikelihood; this is in the "relative" version, i.e. setting the maximum value to be 0.
  • maximuma numeric value with the maximum which has been subtracted to obtain the "relative" version of 2logL.

Side Effects

If plot.it=TRUE, a plot of the profile twice relative negative loglikeliood (called the `deviance') is produced on a graphical device. When length(fixed.comp)=1, a plot of the deviance is produced as a function of the chosen parameter component. When length(fixed.comp)=2, a contour plot of the deviance is produced with contour lines corresponding to confidence regions of approximate probability levels c(0.25, 0.5, 0.75, 0.90, 0.95, 0.99).

Details

Likelihood maximization is performed by sn.em.

See the reference below for explanation of the two possible parametrizations.

References

Azzalini, A. and Capitanio, A. (1999). Statistical applications of the multivariate skew-normal distribution. J.Roy.Statist.Soc. B 61, 579--602.

See Also

sn.em, sn.mle

Examples

Run this code
data(ais, package="sn")
attach(ais)
a <- sn.2logL.profile(y=bmi)
a <- sn.2logL.profile(y=bmi, use.cp=FALSE, param.range=c(3,6,1,5))
a <- sn.2logL.profile(X=cbind(1,lbm), y=bmi, param.range=c(0.5,0.95), npts=31)
#
data(frontier, package="sn")
a <- sn.2logL.profile(y=frontier, param.range=c(0.8,2, 2,30),
        use.cp=FALSE, npts=16)

Run the code above in your browser using DataLab