Generalized Linear Model Constructor
Definition
Namespace: Extreme.Statistics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
Overload List
GeneralizedLinearModel(IDataFrame, String, String, String[])
Constructs a new binomial GeneralizedLinearModel.
public GeneralizedLinearModel(
IDataFrame dataFrame,
string dependentVariable,
string countVariable,
string[] independentVariables
)
Parameters
- dataFrame IDataFrame
- A data frame containing the data for the regression.
- dependentVariable String
- The name of the variable that contains the number of successes.
- countVariable String
- The name of the variable that contains the total number of trials.
- independentVariables String[]
- An array containing the names of the independent variable.
GeneralizedLinearModel(Vector<Double>, Vector<Double>, Matrix<Double>, Vector<Double>)
Constructs a new binomial GeneralizedLinearModel.
public GeneralizedLinearModel(
Vector<double> dependentData,
Vector<double> countData,
Matrix<double> independentData,
Vector<double> weights = null
)
Parameters
- dependentData Vector<Double>
- A vector that contains the number of successful trials.
- countData Vector<Double>
- A vector that contains the total number of trials.
- independentData Matrix<Double>
- A matrix that contains the data for the independent variables.
- weights Vector<Double> (Optional)
- (Optional.) A vector that contains the weight for each observation.
Exceptions
ArgumentNullException | dependentData is null.
-or- independentData is null. |
GeneralizedLinearModel(Vector<Double>, Vector<Double>, Vector<Double>[], Vector<Double>)
Constructs a new binomial GeneralizedLinearModel.
public GeneralizedLinearModel(
Vector<double> dependentVariable,
Vector<double> countVariable,
Vector<double>[] independentVariables,
Vector<double> weights = null
)
Parameters
- dependentVariable Vector<Double>
- A vector that contains the number of successful trials for each observation.
- countVariable Vector<Double>
- A vector that contains the total number of trials for each observation.
- independentVariables Vector<Double>[]
- An array of vectors that contain the independent variables.
- weights Vector<Double> (Optional)
- (Optional.) A vector that contains the weight for each observation.
Exceptions
ArgumentNullException | dependentVariable is null.
-or- independentVariables is null. |
GeneralizedLinearModel(IDataFrame, String, ModelFamily, LinkFunction, String)
Constructs a new GeneralizedLinearModel.
public GeneralizedLinearModel(
IDataFrame dataFrame,
string formula,
ModelFamily family = null,
LinkFunction link = null,
string weightVariable = null
)
Parameters
- dataFrame IDataFrame
- A data frame containing the data for the regression.
- formula String
- A formula that specifies the variables in the model. It should not include the link function.
- family ModelFamily (Optional)
- Optional. The probability distribution family of the model.
- link LinkFunction (Optional)
- Optional. The link function of the model. The default is the canonical link function for family.
- weightVariable String (Optional)
- The name of the variable that contains the case weights. May be null.
Exceptions
FormatException | The formula is not in the correct format. |
GeneralizedLinearModel(Vector<Double>, Matrix<Double>, ModelFamily, LinkFunction, Vector<Double>)
Constructs a new GeneralizedLinearModel.
public GeneralizedLinearModel(
Vector<double> dependentData,
Matrix<double> independentData,
ModelFamily family = null,
LinkFunction link = null,
Vector<double> weights = null
)
Parameters
- dependentData Vector<Double>
- A vector that contains the data for the dependent variable.
- independentData Matrix<Double>
- A matrix that contains the data for the independent variable.
- family ModelFamily (Optional)
- Optional. The probability distribution family of the model.
- link LinkFunction (Optional)
- Optional. The link function of the model.
- weights Vector<Double> (Optional)
- (Optional.) A vector that contains the weight for each observation.
Exceptions
ArgumentNullException | dependentData is null.
-or- independentData is null. |
GeneralizedLinearModel(Vector<Double>, IEnumerable<Vector<Double>>, ModelFamily, LinkFunction, Vector<Double>)
Constructs a new GeneralizedLinearModel.
public GeneralizedLinearModel(
Vector<double> dependentVariable,
IEnumerable<Vector<double>> independentVariables,
ModelFamily family = null,
LinkFunction link = null,
Vector<double> weights = null
)
Parameters
- dependentVariable Vector<Double>
- A vector that specifies the dependent variable.
- independentVariables IEnumerable<Vector<Double>>
- An array of vectors that contain the independent variables.
- family ModelFamily (Optional)
- Optional. The probability distribution family of the model.
- link LinkFunction (Optional)
- Optional. The link function of the model.
- weights Vector<Double> (Optional)
- (Optional.) A vector containing the weight associated with each observation.
Exceptions
ArgumentNullException | dependentVariable is null.
-or- independentVariables is null. |
GeneralizedLinearModel(IDataFrame, String, String[], ModelFamily, LinkFunction, String)
Constructs a new GeneralizedLinearModel.
public GeneralizedLinearModel(
IDataFrame dataFrame,
string dependentVariable,
string[] independentVariables,
ModelFamily family = null,
LinkFunction link = null,
string weightVariable = null
)
Parameters
- dataFrame IDataFrame
- A data frame containing the data for the regression.
- dependentVariable String
- The name of the dependent variable.
- independentVariables String[]
- An array containing the names of the independent variable.
- family ModelFamily (Optional)
- Optional. The probability distribution family of the model.
- link LinkFunction (Optional)
- Optional. The link function of the model.
- weightVariable String (Optional)
- The name of the variable that contains the case weights. May be null.