public class LinReg extends Object
Constructor and Description |
---|
LinReg(double[] aX,
double[] aY)
Constructor for regression calculations
|
LinReg(P1D aXY)
constructor for regression calculations.
|
Modifier and Type | Method and Description |
---|---|
void |
addPoint(double xValue,
double yValue)
Add a point to the data and redo the regression
|
void |
doc()
Show online documentation.
|
P1D[] |
getConfidence()
Get confidence intervals for means
|
P1D[] |
getConfidence(Color color)
Get confidence intervals for means
|
P1D |
getConfidenceBand(Color color,
double transparency)
Calculate confidence band in form of P1D with errors.
|
P1D |
getConfidenceBand(int Npoints,
Color color,
double transparency)
Calculate confidence band in form of P1D with errors.
|
double |
getCorrelation()
Get correlation coefficient
|
int |
getDataLength()
Get the size of the input data
|
double[] |
getDataX()
Get an array with X data
|
double[] |
getDataY()
Get an array with Y data
|
double |
getIntercept()
Get Intercept
|
double |
getInterceptError()
Get the standard error on intercept
|
double |
getMaxAbsoluteResidual()
Get max absolute residual
|
double |
getMaxX()
Get a maximum value for X
|
double |
getMaxY()
Get maximum value in Y
|
double |
getMinX()
Get a minimum value for X
|
double |
getMinY()
Get minimum value for Y
|
double |
getMSE()
Get MSE value
|
double |
getPearsonR()
Get pearson R
|
P1D[] |
getPrediction()
Get prediction lines
|
P1D[] |
getPrediction(Color color)
Get prediction lines
|
P1D |
getPredictionBand()
Calculate the prediction band in form of P1D with errors.
|
P1D |
getPredictionBand(Color color)
Calculate the prediction band in form of P1D with errors.
|
P1D |
getPredictionBand(Color color,
double transparency)
Calculate the prediction band in form of P1D with errors.
|
P1D |
getPredictionBand(int Npoints,
Color color,
double transparency)
Calculate the prediction band in form of P1D with errors.
|
P1D |
getResiduals()
Get residuals
|
F1D |
getResult()
Get the linear regression result
|
double |
getSlope()
Get slope
|
double |
getSlopeError()
Get the standard error on slope
|
double |
getSSE()
Get SSE value
|
double |
getSSR()
Ger SSR value
|
double |
getSumXSquared()
Get sun of the square
|
double |
getSxx()
Get Sxx value: sumXsquared - sumX * sumX / n
|
double |
getSyy()
Get SYY value: sumYsquared - sumY * sumY / n
|
double |
getXBar()
Get average x
|
double |
getYBar()
Get average Y
|
void |
reset()
reset data to 0
|
public LinReg(double[] aX, double[] aY)
aX
- is the array of x dataaY
- is the array of y datapublic LinReg(P1D aXY)
aXY
- P1D container for X and Y valuespublic void reset()
public double getCorrelation()
public double getIntercept()
public double getInterceptError()
public double getSlopeError()
public double getSlope()
public P1D getResiduals()
public double[] getDataX()
public double[] getDataY()
public void addPoint(double xValue, double yValue)
xValue
- X valueyValue
- Y valuepublic double getMinX()
public double getMaxX()
public double getMinY()
public double getMaxY()
public double getMaxAbsoluteResidual()
public double getSxx()
public double getSyy()
public double getSSR()
public double getSSE()
public double getMSE()
public double getXBar()
public double getYBar()
public int getDataLength()
public double getPearsonR()
public double getSumXSquared()
public F1D getResult()
public P1D[] getConfidence()
public P1D[] getConfidence(Color color)
color
- color used to drawpublic P1D[] getPrediction()
public P1D[] getPrediction(Color color)
color
- color used to drawpublic P1D getConfidenceBand(Color color, double transparency)
color
- Color used to show the bandtransparancy
- level of color transparency (between 0 and 1)public P1D getConfidenceBand(int Npoints, Color color, double transparency)
Npoints
- number of points to display the bandcolor
- Color used to show the bandtransparancy
- level of color transparency (between 0 and 1)public P1D getPredictionBand()
public P1D getPredictionBand(Color color)
color
- Color used to show the bandpublic P1D getPredictionBand(Color color, double transparency)
color
- Color used to show the bandtransparancy
- level of color transparency (between 0 and 1)public P1D getPredictionBand(int Npoints, Color color, double transparency)
Npoints
- number of points for evaluationcolor
- Color used to show the bandtransparancy
- level of color transparency (between 0 and 1)public void doc()
Jas4pp 1.5 © Java Analysis Studio for Particle Physics