Wrapper for topicsTest function from the topics package

textTopicsTest(
  model,
  pred_var_x = NULL,
  pred_var_y = NULL,
  group_var = NULL,
  control_vars = c(),
  test_method = "linear_regression",
  ...
)

Arguments

model

(list) The trained model

pred_var_x

(string) The x variable name to be predicted, and to be plotted (only needed for regression or correlation)

pred_var_y

(string) The y variable name to be predicted, and to be plotted (only needed for regression or correlation)

group_var

(string) The variable to group by (only needed for t-test)

control_vars

(vector) The control variables (not supported yet)

test_method

(string) The test method to use, either "correlation","t-test", "linear_regression","logistic_regression", or "ridge_regression"

...

Parameter settings from topicsTest in the topics-package.

Value

A list of the test results, test method, and prediction variable