-
Notifications
You must be signed in to change notification settings - Fork 3
/
simple_two_arm_designer.Rd
48 lines (40 loc) · 1.67 KB
/
simple_two_arm_designer.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simple_two_arm_designer.R
\name{simple_two_arm_designer}
\alias{simple_two_arm_designer}
\title{Create a simple two arm design}
\usage{
simple_two_arm_designer(N = 100, prob = 0.5, control_mean = 0,
control_sd = 1, ate = 1, treatment_mean = control_mean + ate,
treatment_sd = control_sd, rho = 1)
}
\arguments{
\item{N}{An integer. Sample size.}
\item{prob}{A number in [0,1]. Probability of assignment to treatment.}
\item{control_mean}{A number. Average outcome in control.}
\item{control_sd}{A positive number. Standard deviation in control.}
\item{ate}{A number. Average treatment effect.}
\item{treatment_mean}{A number. Average outcome in treatment. Overrides \code{ate} if both specified.}
\item{treatment_sd}{A non-negative number. Standard deviation in treatment. By default equals \code{control_sd}.}
\item{rho}{A number in [-1,1]. Correlation between treatment and control outcomes.}
}
\value{
A simple two-arm design.
}
\description{
Builds a design with one treatment and one control arm.
Treatment effects can be specified either by providing \code{control_mean} and \code{treatment_mean}
or by specifying a \code{control_mean} and \code{ate}.
}
\details{
Units are assigned to treatment using complete random assignment. Potential outcomes are normally distributed according to the mean and sd arguments.
See \href{https://declaredesign.org/library/articles/simple_two_arm.html}{vignette online}.
}
\examples{
#Generate a simple two-arm design using default arguments
simple_two_arm_design <- simple_two_arm_designer()
}
\author{
\href{https://declaredesign.org/}{DeclareDesign Team}
}
\concept{experiment}