structure_predictions: Structure predictions to make testing easier.

View source: R/results.r

structure_predictionsR Documentation

Structure predictions to make testing easier.

Description

This function structures data for testing a prediction. Deals with predictions that are a matrix for mediation analysis. Also properly format factor variables.

Usage

structure_predictions(formula, data, predictions, method)

Arguments

formula

The formula used to identify all variables that are in the model that will be run.

data

The data used to create predictions.

predictions

The predictions to test. This should be the object returned from 'pr_list'.

method

A string indicating how variables not in 'predictions' should be treated. There are two options; "observed values" and "mean."

Value

A dataframe

See Also

Other internal functions: get_coef(), get_data(), get_draws(), get_formula(), get_link(), get_vcov(), results_coefficients(), results_contrasts(), results_predictions()


jacobaro/danalyze documentation built on Oct. 20, 2022, 8:09 a.m.