-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathintegrity.Rmd
More file actions
73 lines (46 loc) · 1.31 KB
/
integrity.Rmd
File metadata and controls
73 lines (46 loc) · 1.31 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---
title: "Data integrity and quality assurance"
date: "`r Sys.Date()`"
output: distill::distill_article
---
```{r}
library(tidyverse)
library(sperm)
library(targets)
library(gt)
```
# Cleaned data
The cleaned data can be accessed using targets:
```{r}
tar_read(model_dat)
```
## Modelling variables
We're interested in assessing
> `outcome = intervention_class + type of infertility`
Currently `class` is set to `major_intervention_grouping` and `intervention` is set to `grouped_intervention`. The `moderator` is `type_of_infertility`.
> Kerry, is this correct? Very easy to update if not :)
## Cleaning class labels
There are 10 interventions with more than one class label.
```{r}
tar_read(qa_class) %>%
gt()
```
There needs to be at most one class label per intervention or the model will complain. Charles has set the class to be the most-used class label for each intervention.
> Kerry please check you're happy with the class labels :)
```{r}
tar_read(model_dat) %>%
count(intervention, class) %>%
select(-n) %>%
gt()
```
## Modelling input
Here's a random sample of ten observations:
```{r, layout="l-page"}
tar_read(wide_obs) %>%
sample_n(10) %>%
gt() %>%
tab_header("Modelling data",
subtitle = "10 randomly-selected observations") %>%
tab_options(
)
```