This function defines a regression model with parameters, where the model can be one of a set of pre-defined models (see the argument RegressionModel
). The parameters can either be defined in a table or read from a resource file.
DefineRegression(
processData,
UseProcessData = FALSE,
DefinitionMethod = c("ResourceFile", "Table"),
GroupingVariables = character(),
RegressionModel = c("SimpleLinear", "Power"),
RegressionTable = data.table::data.table(),
FileName = character()
)
The current data produced by a previous instance of the function.
Logical: If TRUE use the existing function output in the process.
Character: A string naming the method to use, one of "Table" to define a table directly (in the GUI), and ResourceFile to read a file.
An optional vector of strings defining variables seving as grouping variables in the RegressionTable. Setting this adds the its elements as columns in the RegressionTable in the GUI.
Character: A string naming the model to use for the regression. See Details for options.
A table with one row defining the name of the dependent variable (column name DependentVariable
), the name of the independent variable (column name IndependentVariable
), and the Intersect
and Slope
if RegressionModel
= "SimpleLinear" and Factor
and Exponent
if RegressionModel
= "Power".
The path to a CSV file containing the columns DependentVariable
), IndependentVariable
and the RegressionTable
.
An object of StoX data type Regression
.
The currently implemented models are listed below:
SimpleLinear $$DependentVariable = Intercept + Slope * IndependentVariable$$
Power $$DependentVariable = Factor * IndependentVariable^{Exponent}$$
EstimateBioticRegression
for estimating regression parameters from a StoxBioticData
, IndividualsData
or SuperIndividualsData
object, and ImputeSuperIndividuals
for applying the regression to SuperIndividualsData
.