|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--dwvisser.statistics.LinearFitErrY
Given a data set, performs a linear regression, then can be queried for the results. Based on code in Numerical Recipes in C
Field Summary | |
double[] |
residual
|
Constructor Summary | |
LinearFitErrY()
do-nothing initializer to re-use this same code for multiple fits |
|
LinearFitErrY(double[] x,
double[] y)
Creates and performs linear regression on unweighted data set. |
|
LinearFitErrY(double[] x,
double[] y,
double[] sig)
Creates and performs linear regression on weighted data set. |
|
LinearFitErrY(java.io.File batch,
java.io.File out)
|
Method Summary | |
double |
calculateY(double x)
|
void |
fit(double[] x,
double[] y)
|
void |
fit(double[] x,
double[] y,
double[] sig)
|
double |
get_p_value()
|
double |
getChiSq()
|
int |
getDegreesOfFreedom()
|
double |
getOffset()
|
double |
getOffsetErr()
|
double |
getReducedChiSq()
|
double |
getSlope()
|
double |
getSlopeErr()
|
LinearFitErrY |
invertFit()
Inverts x and y data sets. |
static void |
main(java.lang.String[] args)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public double[] residual
Constructor Detail |
public LinearFitErrY()
public LinearFitErrY(double[] x, double[] y, double[] sig) throws StatisticsException
x
- the x coordinates of the pointsy
- the y coordinates of the pointssig
- the error bars on the y coordinatespublic LinearFitErrY(double[] x, double[] y) throws StatisticsException
x
- the x coordinates of the pointsy
- the y coordinates of the pointspublic LinearFitErrY(java.io.File batch, java.io.File out) throws StatisticsException
Method Detail |
public void fit(double[] x, double[] y, double[] sig) throws StatisticsException
StatisticsException
public void fit(double[] x, double[] y) throws StatisticsException
StatisticsException
public double getSlope()
public double getSlopeErr()
public double getOffset()
public double getOffsetErr()
public double getChiSq()
public double getReducedChiSq()
public int getDegreesOfFreedom()
public double get_p_value()
public double calculateY(double x)
public LinearFitErrY invertFit() throws StatisticsException
StatisticsException
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
args
- the command line arguments
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |