edu.ucla.stat.SOCR.distributions
Class TwoSidedPowerDistribution

java.lang.Object
  extended by edu.ucla.stat.SOCR.core.SOCRValueSettable
      extended by edu.ucla.stat.SOCR.core.Distribution
          extended by edu.ucla.stat.SOCR.distributions.TwoSidedPowerDistribution
All Implemented Interfaces:
IValueSettable, Pluginable, java.util.Observer

public class TwoSidedPowerDistribution
extends Distribution

A Java implementation of the (Two-Sided POwer (TSP) Distribution with specified: left, right, mean and power parameters http://www.springerlink.com/content/u71g0104356x70u1/ .


Field Summary
 
Fields inherited from class edu.ucla.stat.SOCR.core.Distribution
applet, CONTINUOUS, DISCRETE, MAXMGFXVAL, MAXMGFYVAL, MINMGFXVAL, MIXED, name
 
Constructor Summary
TwoSidedPowerDistribution()
          Default constructor: creates a beta distribution with left and right parameters equal to 1
TwoSidedPowerDistribution(double l, double r, double m, double p)
           
 
Method Summary
 double getDensity(double x)
          Define the TSP Density function
 double getLeft()
          ----------------------------------GET--------------------------
 double getMaxDensity()
          Compute the maximum getDensity
 double getMean()
          Compute the mean in closed form
 double getMed()
          Get the left LIMIT
 double getMedian()
          This method computes a default approximate median.
 double getMode()
          Compute the Mode
 java.lang.String getOnlineDescription()
          This method returns an online description of this distribution.
 double getPower()
          Get the right LIMIT
 double getRight()
          Get the right parameter
 double getVariance()
          Compute the variance in closed form
 void initialize()
          used for some subclass to initialize before being used
 void paramEstimate(double[] distData)
          HOW SHOULD THESE PARAMETERS be estimated?????
 void setLeft(double l)
          Sets the left parameter
 void setMed(double m)
          Sets the med parameter
 void setParameters(double l, double r, double m, double p)
          Set the parameters, compute the normalizing constant c, and specifies the all 4 parameters
 void setPower(double p)
          Sets the power
 void setRight(double r)
          Sets the right parameter
 void valueChanged(java.util.Observable o, java.lang.Object arg)
           
 
Methods inherited from class edu.ucla.stat.SOCR.core.Distribution
addObserver, betaCDF, comb, factorial, findGFRoot, findRoot, gamma, gammaCDF, getCDF, getDisplayPane, getDomain, getFailureRate, getGFDerivative, getGFSecondDerivative, getInstance, getLocalHelp, getMean, getMGF, getMgfDomain, getName, getPGF, getPGFDomain, getQuantile, getSampleMoment, getSD, getSOCRDistributionFunctors, getSOCRDistributions, getType, getVariance, inverseCDF, logGamma, perm, sampleMean, sampleVar, setApplet, setDomain, setDomain, setMGFDomain, setMGFDomain, setMGFParameters, setMGFParameters, setMGFParameters, setMGFParameters, setParameters, setPGFDomain, setPGFDomain, setPGFParameters, setPGFParameters, setPGFParameters, setPGFParameters, simulate, update, valueChanged
 
Methods inherited from class edu.ucla.stat.SOCR.core.SOCRValueSettable
createComponentSetter, createValueSetter, createValueSetter, createValueSetter, createValueSetter, getComponentSetter, getComponentSetters, getValueSetter, getValueSetters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TwoSidedPowerDistribution

public TwoSidedPowerDistribution(double l,
                                 double r,
                                 double m,
                                 double p)

TwoSidedPowerDistribution

public TwoSidedPowerDistribution()
Default constructor: creates a beta distribution with left and right parameters equal to 1

Method Detail

initialize

public void initialize()
Description copied from class: Distribution
used for some subclass to initialize before being used

Overrides:
initialize in class Distribution

valueChanged

public void valueChanged(java.util.Observable o,
                         java.lang.Object arg)
Overrides:
valueChanged in class Distribution

setParameters

public void setParameters(double l,
                          double r,
                          double m,
                          double p)
Set the parameters, compute the normalizing constant c, and specifies the all 4 parameters


setLeft

public void setLeft(double l)
Sets the left parameter


setRight

public void setRight(double r)
Sets the right parameter


setMed

public void setMed(double m)
Sets the med parameter


setPower

public void setPower(double p)
Sets the power


getLeft

public double getLeft()
----------------------------------GET--------------------------


getRight

public double getRight()
Get the right parameter


getMed

public double getMed()
Get the left LIMIT


getPower

public double getPower()
Get the right LIMIT


getDensity

public double getDensity(double x)
Define the TSP Density function

Specified by:
getDensity in class Distribution

getMaxDensity

public double getMaxDensity()
Compute the maximum getDensity

Overrides:
getMaxDensity in class Distribution

getMode

public double getMode()
Compute the Mode


getMedian

public double getMedian()
Description copied from class: Distribution
This method computes a default approximate median. This method should be overriden when there is a closed form expression for the median.

Overrides:
getMedian in class Distribution

getMean

public double getMean()
Compute the mean in closed form

Overrides:
getMean in class Distribution

getVariance

public double getVariance()
Compute the variance in closed form

Overrides:
getVariance in class Distribution

paramEstimate

public void paramEstimate(double[] distData)
HOW SHOULD THESE PARAMETERS be estimated?????

Overrides:
paramEstimate in class Distribution

getOnlineDescription

public java.lang.String getOnlineDescription()
This method returns an online description of this distribution.

Overrides:
getOnlineDescription in class Distribution