Community Server

The platform that enables you to build rich, interactive communities
Welcome to Community Server Sign in | Join | Help

Re: SKEWNESS fails if StdDev=0

  •  03-09-2010, 8:56 AM

    Re: SKEWNESS fails if StdDev=0

    John,

    I respect your view point. If anyone else bumps onto this problem, here's how I am handling it.
    PS: forcing to zero actually works quite well in my application: the first iteration starts at Skewness=0 (with a warning message) and then it wanders up and down as per the simulation, as desired.
    Rgds
    Gus

    NEWCMD MYSKEWNESS Input Skewness @statistics ?"Computes the skewness of data in the input vector."
       STDEV Input InputSD
       IF InputSD = 0
          DATA 0 Skewness
          OUTPUT "WARNING: The standard deviation of your input data is nil. Skewness is not defined. Forcing result to zero to avoid crashing.\n"
       ELSE
          MEAN input inputMean
          SIZE input inputSize
          LET skewness = sum((input - inputMean)^3) / ((inputSize - 1)* (inputSD^3))
       END
    END
View Complete Thread
Powered by Community Server, by Telligent Systems