Package edu.cmu.tetrad.regression
Class RegressionDataset
java.lang.Object
edu.cmu.tetrad.regression.RegressionDataset
- All Implemented Interfaces:
Regression
Implements a regression model from tabular continuous data.
- Version:
- $Id: $Id
- Author:
- josephramsey
-
Constructor Summary
ConstructorsConstructorDescriptionRegressionDataset(DataSet data) Constructs a linear regression model for the given tabular data set.RegressionDataset(Matrix data, List<Node> variables) Constructor for RegressionDataset. -
Method Summary
Modifier and TypeMethodDescriptiongetGraph()Getter for the fieldgraph.getResidualsWithoutFirstRegressor.static RegressionResultregress(double[] target, double[][] regressors) regress.regress.Regresses the target on the given regressors.voidsetAlpha(double alpha) Sets the significance level at which coefficients are judged to be significant.voidsetRows(int[] rows) Setter for the fieldrows.
-
Constructor Details
-
Method Details
-
regress
regress.
- Parameters:
target- an array of objectsregressors- an array of objects- Returns:
- a
RegressionResultobject
-
setAlpha
public void setAlpha(double alpha) Sets the significance level at which coefficients are judged to be significant.Sets the alpha level for deciding which regressors are significant based on their p values.
- Specified by:
setAlphain interfaceRegression- Parameters:
alpha- the significance level.
-
getGraph
Getter for the field
graph.- Specified by:
getGraphin interfaceRegression- Returns:
- This graph.
-
regress
Regresses the target on the given regressors.- Specified by:
regressin interfaceRegression- Parameters:
target- The target variable.regressors- The regressor variables.- Returns:
- The regression plane, specifying for each regressors its coefficeint, se, t, and p values, and specifying the same for the constant.
-
regress
regress.
- Specified by:
regressin interfaceRegression- Parameters:
target- aNodeobjectregressors- aNodeobject- Returns:
- a
RegressionResultobject
-
setRows
public void setRows(int[] rows) Setter for the field
rows.- Parameters:
rows- an array of objects
-
getResidualsWithoutFirstRegressor
getResidualsWithoutFirstRegressor.
- Returns:
- a
Vectorobject
-