Hi I have this table here:
variable | level | vaccinated = 0 (n=16455) | vaccinated = 1 (n=1297 | Total (n=17752) | p-value |
---|---|---|---|---|---|
Sex | M | 8,586 (52.2) | 714(55.1) | 9,3023 (12,1) | 1,22 |
F | 1,2323(12,1) | 1,2323(12,1) | 9,3023 (12,1) | 1,223 | |
Agegroup | 0-15 | 12,313(9,1) | 1,2323(12,1) | 9,3023 (12,1) | 12,23 |
16-20 | 12,313(9,1) | 1,2323(12,1) | 9,3023 (12,1) | 12.34 | |
21-25 | 12,313(9,1) | 1,2323(12,1) | 9,3023 (12,1) | 12.33 |
I have a lot more categories under variable - but i just showed a bi ofthe table with artificial data.
I wish to split the columns vaccinated = 0 (n=16455), vaccinated = 1 (n=1297) and Total (n=17752) into two columns so the frequency and percentages in these variables are seperated in their own column - should be like this:
variable | level | vaccinated = 0 (n=16455) | pct. = 0 | vaccinated = 1 (n=1297 | pct. = 1 | Total (n=17752) | p-value |
---|---|---|---|---|---|---|---|
Sex | M | 8,586 | 52.2 | 714 | 55.1 | 9,3023 (12,1) | 1,22 |
F | 1,2323 | 12,1 | 1,2323 | 12,1 | 9,3023 (12,1) | 1,223 | |
Agegroup | 0-15 | 12,313 | 9,1 | 1,2323 | 12,1 | 9,3023 (12,1) | 12,23 |
16-20 | 12,313 | 9,1 | 1,2323 | 12,1 | 9,3023 (12,1) | 12.34 | |
21-25 | 12,313 | 9,1 | 1,2323 | 12,1 | 9,3023 (12,1) | 12.33 |
And then the same for the Total (n=17752)...
how can I do so?