RunModel: Run regression model

Description Usage Arguments Value

View source: R/RunModel.R

Description

RunModel is an internal function that applies a regression model to constructed model data and regurns model coefficients.

Usage

1
2
3
4
5
6
7
8
RunModel(
  formula,
  modelData,
  comparison = NULL,
  returnVars = "*",
  FUN = lm,
  ...
)

Arguments

formula

Formula to be used in model.

modelData

data.table with all data to be used in model. Constructed with BuildModelData function.

comparison

Vector containing rownames or numbers of x and y included in test.

returnVars

Character vector of coefficient variable names to return. By default, returns all coefficients for variables in xName. To return all coefficients (including intercept), use "*".

FUN

Function to be used for regression analysis. Defaults to lm().

...

Additional parameters to be passed to FUN.

Value

A data.table with model coefficients for all variables in returnVars. Includes comparison, variable name, Estimate, Std. Error, t- or z-value, and pValue.


okg3/MultiDataAnalysis documentation built on March 28, 2020, 12:20 p.m.