@CathyVI wrote:
@Patrick How can anyone with a value of 1 be counted as a single case. For example row 33 in our data. When form2=2,case32=0 and event46=1, the report_form_name should be Event46A instead of multiple.
Anyone with 2 double digits e.g., 110, 220 should remain as multiple.
So now it's about counting cases and no more forms which totally changes the story!
How would you want to report cases 112, 121, 211, 122, 212, 221? Please be specific and define all your cases. Provide both the variable they should appear under AND the time slot if there are multiple.
It would help if you could provide below table fully populated. With this data one can create formats which then should make the rest of the coding rather simple.
Multiple patterns can of course belong to the same case (case_no). It would then also help if you provide sample data for all the patterns.
Obs
pattern
case_no
time_slot
description
1
000
2
001
3
002
4
010
5
011
6
012
7
020
8
021
9
022
10
100
11
101
12
102
13
110
14
111
15
112
16
120
17
121
18
122
19
200
20
201
21
202
22
210
23
211
24
212
25
220
26
221
27
222
... View more