fwdtr {Rfwdmv}R Documentation

Maximum likelihood estimates of transformation parameters

Description

This function computes maximum likelihood estimates of transformation parameters. It uses the multivariate version of the parametric family of power transformations introduced by Box and Cox (1964).

Usage

fwdtr(X, bsb = ellipse.subset, n.bsb, lambda = 1, one.lambda = FALSE, col.to.transform = "all", boundaries = c(-3, 3))

Arguments

X a matrix or data frame containing a multivariate data set.
bsb usually a function of two variables: a matrix X containing the multivariate data and the number of units in the initial subset n.bsb. Alternatively, the initial subset my be specified directly by providing an integer vector containing the indices of the units to include in the initial subset.
n.bsb the percentage of units forming the initial subset. For example n.bsb = 40 implies that we start the search using as.integer(nrow(X) * 0.4) units. The default is n.bsb = 50.
lambda a scalar or a k x 1 vector containing set of transformation parameters. The ordering of Mahalanobis distances at each step of the forward search uses variables transformed with lambda. If lambda is a scalar all the variables in col.to.transform are transformed, for ordering Mahalanobis distances, using the commom supplied value.
one.lambda a logical value. If TRUE a common value lambda is estimated for all variables specified in col.to.transform.
col.to.transform a k x 1 integer vector specifying the variables which must be transformed. If col.to.transform = "all" all variables (columns of matrix X) are considered for transformation.
boundaries the upper and lower bounds for the estimates of the values of the transformation parameters.

Details

The analysis of data can often be improved by using transformed variables rather than the original variables themselves. There are physical reasons why a transformation might be expected to be helpful in some examples. If the data arise from a counting process, they often have a Poisson distribution and the square root transformation will provide observations with an approximately constant variance, independent of the mean. Similarly, concentrations are nonnegative variables and so cannot strictly be subject to additive errors of constant variance. Unfortunately the estimated transformation and related test statistics may be sensitive to the presence of one, or several, outliers. With this function we use the forward search to see how estimates of the transformation parameters evolve as we move through the ordered data. If a correct value of lambda has been found the parameter estimates will be stable until near the end of the search, where any outliers start to enter.

Value

a list with class fwdtr.

Author(s)

Fabrizio Laurini

References

Atkinson, A. C., Riani, M. and Cerioli, A. (2004) Exploring Multivariate Data with the Forward Search. Springer-Verlag New York.

See Also

fwdtr.object, profile.fwdtr.object

Examples

 
## Forward search on untrasformed data 
data(mussels.dat)
l.mle <- fwdtr(mussels.dat)
fwdtrMlePlot(l.mle)

## Forward search on transformed data as specified in vector lamdba 
data(mussels.dat)
l.mle <- fwdtr(mussels.dat,lambda = c(1, 0.5, 1, 0, 1/3))
fwdtrMlePlot(l.mle)

## estimate a common value of lambda for all the variables and use 1/3 to order Mahalanobis distances in each step of the search
data(mussels.dat)
l.mle <- fwdtr(mussels.dat, lambda = 1/3, one.lambda = TRUE)
fwdtrMlePlot(l.mle)

### Test variables 2 and 5
### The forward is based on untransformed data for variables 1, 3 and 4
### sqrt for variable 2 and third root for variable 5
l.mle <- fwdtr(mussels.dat, lambda = c(0.5, 1/3), col.to.transform = c(2, 5))
fwdtrMlePlot(l.mle)

[Package Rfwdmv version 0.72-2 Index]