Learn R Programming

stats4teaching (version 0.1.0)

cassay: Clinical Assay

Description

Simulates a clinical Assay with 2 groups (control and treatment) before and after intervention.

Usage

cassay(n, mean = 0, sigma = 1, coefvar = NULL,
        d.cohen = NULL, dec = 2)

Value

List containing the following components:

  • Data: a data frame containing the samples created (Columns: Group, PreTest & PostTest).

  • Model: linear regression model.

Arguments

n

size of samples.

mean

sample mean. Same for both groups before intervention (Pre-test).

sigma

sample standard error.

coefvar

sample coefficient of variation.

d.cohen

size effect (d-Cohen). If not given, randomly generated.

dec

number of decimals for observations.

Examples

Run this code
cassay(c(10,12), mean = 115, sigma = 7.5, d.cohen= 1.5)
cassay(24, mean = 100, sigma = 5.1)

Run the code above in your browser using DataLab