generate_sample: Function for generating samples

View source: R/Bf_simulation.R

generate_sampleR Documentation

Function for generating samples

Description

This function generates a sample with a given sample size for a true effect (with a given hypothetical effect size) or a true null effect. The function can generate samples for independent and paired study designs. For independent study designs provide both sd1 (experimental group) and s2 (control group), while for paired study designs provide only sd1 for the standard deviation of the difference scores between the two groups. For independent study designs the sample generating function assumes 0 correlation between the two groups.

Usage

generate_sample(
  n,
  sd_of_theory = 0,
  sd1,
  sd2 = NULL,
  true_effect = TRUE,
  correlation = 0
)

Arguments

n

integer.

sd_of_theory

numeric.

sd1

numeric.

sd2

numeric.

true_effect

logical.

correlation

numeric.

Value

The function returns a tibble with ...


BencePalfi/SampleSizeBF documentation built on April 3, 2025, 2:01 p.m.