You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Table 2 is the first table most visitors to the site will take a look at. In the data prep section we have this code:
# Pre-Processing - Add any variables needed in your table to dfadsl<-adsl %>%
dplyr::mutate(AGEGR1= as.factor(dplyr::case_when(
AGE>=17&AGE<65~">=17 to <65",
AGE>=65~">=65",
AGE>=65&AGE<75~">=65 to <75",
AGE>=75~">=75"
)))
This variable we're creating is a bit confusing because these categories are not mutually exclusive. For example, one patient who is 70 years old would fall into ">=65"and">=65 to <75". But this can't be summarized from a single variable, but the code make it look like we're trying to do so.
I see from the spec, that these non-exclusive groups appear. But to match the spec, we'd need to update our summary code:
I would expect we'd need something more like this:
The text was updated successfully, but these errors were encountered:
ddsjoberg
changed the title
How do you want unobserved factor levels?
Age groups are not mutually exclusive and our results do not match Table 2 Spec
Nov 8, 2023
Table 2 is the first table most visitors to the site will take a look at. In the data prep section we have this code:
This variable we're creating is a bit confusing because these categories are not mutually exclusive. For example, one patient who is 70 years old would fall into
">=65"
and">=65 to <75"
. But this can't be summarized from a single variable, but the code make it look like we're trying to do so.I see from the spec, that these non-exclusive groups appear. But to match the spec, we'd need to update our summary code:
I would expect we'd need something more like this:
Created on 2023-11-08 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: