Learn R Programming

mfcurve (version 1.0.2)

mfcurve_preprocessing: Preprocess data and compute group statistics

Description

Prepares the data and computes descriptive statistics and t-tests for groups defined by combinations of categorical factors.

Usage

mfcurve_preprocessing(data, outcome, factors, alpha = 0.05, test = "mean")

Value

A list with:

group_stats

Data frame with computed statistics and CI bounds.

group_stats_vis

Visualization-ready version with rounded values.

lower_data

Data for the lower panel (without y positions).

grand_mean

Overall mean of the outcome variable.

level

Confidence level used.

Arguments

data

Data frame containing the variables.

outcome

Name of the numeric outcome variable (string).

factors

Character vector of factor variable names for grouping.

alpha

Significance level for the t-tests and confidence intervals. Default is 0.05.

test

Reference for t-tests: "mean" (grand mean), "leave-one-out" (mean of all other groups), or "zero" (testing against 0).