dot-simulate_outcome: Simulate the Outcome Variable

.simulate_outcomeR Documentation

Simulate the Outcome Variable

Description

An internal helper function that takes a complete design matrix and simulates the dependent variable based on the specified fixed and random effects.

Usage

.simulate_outcome(
  design_df,
  formula,
  fixed_effects,
  sds_random,
  family = "gaussian"
)

Arguments

design_df

The data frame from .create_design_matrix.

formula

The model formula.

fixed_effects

A list of the fixed effects coefficients.

sds_random

A list of the random effects' standard deviations and correlations.

family

A string indicating the model family.

Value

The input design_df with an added column for the outcome variable.


PowRPriori documentation built on May 12, 2026, 5:06 p.m.