aceplot

aceplot produces the aceplot to visualize the results of ace

Syntax

Description

This function produces two figures. The first figure contains a series of panels for transformed X_j vs. X_j (with a rug plot long the tick marks), while the second figure contains: the plot of transformed y vs.

y, the plot of residuals vs. fit and the plot of transformed y vs. fit.

example

aceplot(out) Example of the use of ace based on the Wang and Murphy data.

Examples

expand all

  • Example of the use of ace based on the Wang and Murphy data.
  • In order to have the possibility of replicating the results in R using library acepack function mtR is used to generate the random data.

    rng('default')
    seed=11;
    negstate=-30;
    n=200;
    X1 = mtR(n,0,seed)*2-1;
    X2 = mtR(n,0,negstate)*2-1;
    X3 = mtR(n,0,negstate)*2-1;
    X4 = mtR(n,0,negstate)*2-1;
    res=mtR(n,1,negstate);
    % Generate y
    y = log(4 + sin(3*X1) + abs(X2) + X3.^2 + X4 + .1*res );
    X = [X1 X2 X3 X4];
    % Apply the ace algorithm
    out= ace(y,X);
    % Show the output graphically using function aceplot
    aceplot(out)
    Click here for the graphical output of this example (link to Ro.S.A. website). Graphical output could not be included in the installation file because toolboxes cannot be greater than 20MB. To load locally the image files, download zip file http://rosa.unipr.it/fsda/images.zip and unzip it to <tt>(docroot)/FSDA/images</tt> or simply run routine <tt>downloadGraphicalOutput.m</tt>

    Input Arguments

    expand all

    out — Structure containing the output coming from ace procedure. Structure.

    Structure containing the following fields.

    Value Description
    ty

    n x 1 vector containing the transformed y values.

    tX

    n x p matrix containing the transformed X matrix.

    rsq

    the multiple R-squared value for the transformed values in the last iteration of the outer loop.

    y

    n x 1 vector containing the original y values.

    X

    n x p matrix containing the original X matrix.

    Data Types: struct

    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: 'highlight',1:10 , 'plots', [-3 3; -2 2; -2 2]

    highlight —units to highliight in the plot.vector.

    Vector contaning the numbers associate to the units to highlight in the plots.

    Example: 'highlight',1:10

    Data Types: double

    ylimy —2D array of size 3-by-2 which specifies the lower and upper limits for the 3 plots of the second figure.the first row refers to the plot of transformed y vs.

    y, the second row refers to the plot of residuals vs.

    fit and the third row to the the plot of transformed y vs.

    fit. The default value of ylimy is [], that is automtic scale is used.

    Example: 'plots', [-3 3; -2 2; -2 2]

    Data Types: single | double

    Output Arguments

    References

    Breiman, L. and Friedman, J.H. (1985), Estimating optimal transformations for multiple regression and correlation, "Journal of the American Statistical Association", Vol. 80, pp. 580-597.

    Wang D. and Murphy M. (2005), Identifying nonlinear relationships regression using the ACE algorithm, "Journal of Applied Statistics", Vol. 32, pp. 243-258.

    See Also

    |

    This page has been automatically generated by our routine publishFS