Skip to content

Commit

Permalink
Here is my submission for Lab 2 (as is). Looking forward to feedback …
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-K-Addo committed Jan 31, 2023
1 parent ee5ba50 commit 02f871a
Show file tree
Hide file tree
Showing 2 changed files with 567 additions and 8 deletions.
20 changes: 12 additions & 8 deletions week-02/Lab 2.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ author: "Daniel Addo"
date: "`r Sys.Date()`"
output: html_document
editor_options:
chunk_output_type: console
chunk_output_type: inline
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(dplyr)
```

# Design 1
Expand All @@ -20,7 +18,7 @@ design_one <- function(N_samp = 228, # Total number of participants
trt_effect = rep(0.35,4), # treatment effect for each arm
alpha = 0.35, beta = 0.65, # prior
n_post = 1000, # number of posterior draws
seed_setting = 8, # set seed for replication
seed_setting = 4832, # set seed for replication
allocation_size = 40 # Initial Sample to allocate
){
set.seed(seed_setting)
Expand Down Expand Up @@ -51,8 +49,14 @@ design_one <- function(N_samp = 228, # Total number of participants
return(output)
}
design_one(N_samp, trt_n, trt_effect,
alpha, beta, n_post, seed_setting)
design_one(N_samp = 228, # Total number of participants
trt_n = 4, # Number of Arms
trt_effect = rep(0.35,4), # treatment effect for each arm
alpha = 0.35, beta = 0.65, # prior
n_post = 1000, # number of posterior draws
seed_setting = 4832, # set seed for replication
allocation_size = 40 # Initial Sample to allocate
)
```
Expand All @@ -65,7 +69,7 @@ design_two <- function(N_samp = 228, # Total number of participants
trt_effect = rep(0.35,4), # treatment effect for each arm
alpha = 0.35, beta = 0.65, # prior
n_post = 1000, # number of posterior draws
seed_setting = 8, # set seed for replication
seed_setting = 4832, # set seed for replication
allocation_size = 40 # Initial Sample to allocate
){
set.seed(seed_setting) # Set seed
Expand Down Expand Up @@ -136,7 +140,7 @@ design_two(N_samp = 228, # Total number of participants
trt_effect = rep(0.35,4), # treatment effect for each arm
alpha = 0.35, beta = 0.65, # prior
n_post = 1000, # number of posterior draws
seed_setting = 9, # set seed for replication
seed_setting = 4832, # set seed for replication
allocation_size = 40 # Initial Sample to allocate
)
```
555 changes: 555 additions & 0 deletions week-02/Lab-2.html

Large diffs are not rendered by default.

0 comments on commit 02f871a

Please sign in to comment.