I want to settle the group size of covid group to be 300 and normal group to be 150

```
sim_d_and_fit <-function(seed,n, probs=c(0.05, 0.95)) {
mu_n <-0
mu_c <-0.3
set.seed(seed)
d <-
tibble(group =c(rep("normal",150),rep("covid",300)))%>%
mutate(condition = ifelse(group =="normal",0,1),
y = ifelse(group =="normal",rnorm(150, mean = mu_n, sd =1),
rnorm(300, mean = mu_c, sd =1)))
update(fit,
newdata = d,
seed = seed) %>%
fixef(probs = probs) %>%
data.frame() %>%
rownames_to_column("parameter") %>%
filter(parameter =="condition")
}
```

and when I tried to rum the model

```
n_sim <-100
s1 <-
tibble(seed =1:n_sim) %>%
mutate(b1 = map(seed, sim_d_and_fit, n =c(150,300))) %>%
unnest(b1)%>%
mutate(width = Q95 - Q5)
```

I got this error message

```
Error in `mutate()`:
! Problem while computing `b1 = map(seed, sim_d_and_fit, n =
c(150, 300))`.
Caused by error in `map()`:
! Formula or list of formulas required.
Backtrace:
1. ... %>% mutate(width = Q95 - Q5)
9. rethinking::map(seed, sim_d_and_fit, n = c(150, 300))
10. base::stop("Formula or list of formulas required.")
```