主要内容

BoxCoxSSE

SSE and confidence interval for Box-Cox transformations

    Description

    [sse, ci, lambda_out] = BoxCoxSSE(model, lambda_in) computes the sum of squares error sse and confidence interval ci for values of the model under different Box-Cox transforms as given by the parameter lambda).

    example

    [sse, ci, lambda_out] = BoxCoxSSE(Model) returns the default value in lambda_out when lambda_in is not specified.

    BoxCoxSSE(model, ...) If no output arguments are requested then a plot of SSE versus lambda is displayed. The confidence intervals are also displayed on this plot.

    Examples

    collapse all

    To try several different values of the Box-Cox parameter and plot the results:

    lambda = -3:0.5:3;
    [sse, ci] = BoxCoxSSE( M, lambda);
    semilogy( lambda, sse, 'bo-', lambda([1,end]), [ci, ci], 'r--' );
    xlabel( 'Box-Cox parameter, \lambda' );
    ylabel( 'SSE' );

    Note that BoxCoxSSE does not set a Box-Cox transform in the model. To do this use:

    M.Properties.BoxCox = 0; 
    [S,M] = M.Fit;

    Input Arguments

    collapse all

    Model object, specified as a mbcmodel.linearmodel object.

    Input data used to fit the model, specified as a vector.

    Output Arguments

    collapse all

    Sum of squares error, returned as a real scalar. sse is the same size as lamba_in and lamba_out.

    Confidence interval of sum of squares error, returned as a real scalar. There is no statistical difference between the Box-Cox transforms where sse less than ci.

    Output data used to fit the model, returned as a vector. If no lambda_in is specified, then default values are returned.

    Version History

    Introduced in R2007a