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.
- Author:
- Joseph Ramsey
-
Constructor Summary
ConstructorsConstructorDescriptionRegressionDataset(DataSet data) Constructs a linear regression model for the given tabular data set.RegressionDataset(Matrix data, List<Node> variables) -
Method Summary
Modifier and TypeMethodDescriptiongetGraph()static RegressionResultregress(double[] target, double[][] regressors) Regressestargeton theregressors, yielding a regression plane.Regresses the target on the given regressors.voidsetAlpha(double alpha) Sets the alpha level for deciding which regressors are significant based on their p values.voidsetRows(int[] rows)
-
Constructor Details
-
RegressionDataset
Constructs a linear regression model for the given tabular data set.- Parameters:
data- A rectangular data set, the relevant variables of which are continuous.
-
RegressionDataset
-
-
Method Details
-
setAlpha
public void setAlpha(double alpha) 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
- 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
Description copied from interface:RegressionRegressestargeton theregressors, yielding a regression plane.- Specified by:
regressin interfaceRegression- Parameters:
target- the target variable, being regressed.regressors- the list of variables being regressed on.- Returns:
- the regression plane.
-
setRows
public void setRows(int[] rows) -
getResidualsWithoutFirstRegressor
-