basicPower computes the basic power transformation


  • Ytra=basicPower(Y,ColtoTra,la)example
  • Ytra=basicPower(Y,ColtoTra,la,Name,Value)example



Ytra =basicPower(Y, ColtoTra, la) Example of transformation.


Ytra =basicPower(Y, ColtoTra, la, Name, Value) Simulated data check inverse transformation.


expand all

  • Example of transformation.
  • Mussels data.

    la=[0.5 0 0.5 0 0];
    % Transform all columns of matrix Y according to the values of la using
    % basic power transformation

  • Simulated data check inverse transformation.
  • n=100;p=5;
    la=[0.5 0 -0.5 2 0];
    % Transform all columns of matrix Y according to the values of la

    Input Arguments

    expand all

    Y — Input data. Matrix.

    n x v data matrix; n observations and v variables. Rows of Y represent observations, and columns represent variables.

    Missing values (NaN's) and infinite values (Inf's) are allowed, since observations (rows) with missing or infinite values will automatically be excluded from the computations.

    Data Types: single|double

    ColtoTra — Variable to transform. Vector.

    k x 1 integer vector specifying the variables which must be transformed. If it is missing and length(la)=v all variables are transformed

    Data Types: single|double

    la — transformation parameters. Vector.

    k x 1 vector containing set of transformation parameters for the k ColtoTra.

    Data Types: single|double

    Name-Value Pair Arguments

    Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

    Example: 'inverse',true

    inverse —Inverse transformation.logical.

    If inverse is true, the inverse transformation is returned. The default value of inverse is false.

    Example: 'inverse',true

    Data Types: Logical

    Output Arguments

    expand all

    Ytra —transformed data matrix. Matrix

    n x v data matrix containing transformed observations When $\lambda \ne 0$ \[ ytra = y^\lambda \] else \[ ytra = log(y) \]


    Box, G.E.P. and Cox, D.R. (1964), An analysis of transformations (with Discussion), "Journal of the Royal Statistical Society Series B", Vol. 26, pp. 211-252.

    See Also


    This page has been automatically generated by our routine publishFS