Closed kaz462 closed 1 year ago
QSTESTCD=ACTOT
PARAMCD=ACTOT
, 799 (directly from qs, should it be 818?) + 241 imputed records (DTYPE=LOCF
) PARAMCD=ACTOT
, 818 (directly from qs) + 222 imputed records (DTYPE=LOCF
)Take a detailed example USUBJID="01-701-1294" CDISC qs
> qs %>% filter(QSTESTCD=="ACTOT") %>%
+ select(USUBJID, QSSEQ, VISIT, QSTESTCD, QSTEST,QSSTRESN) %>%
+ filter(USUBJID=="01-701-1294")
# A tibble: 4 × 6
USUBJID QSSEQ VISIT QSTESTCD QSTEST QSSTRESN
<chr> <dbl> <chr> <chr> <chr> <dbl>
1 01-701-1294 5015 BASELINE ACTOT ADAS-COG(11) Subscore 9
2 01-701-1294 5030 WEEK 8 ACTOT ADAS-COG(11) Subscore 14
3 01-701-1294 5045 WEEK 12 ACTOT ADAS-COG(11) Subscore 6
4 01-701-1294 5060 RETRIEVAL ACTOT ADAS-COG(11) Subscore 9
CDISC adadas
For the record with QSSEQ=5045
and AVISIT=Week 8
, DTYPE
is populated as LOCF
, but this record is directly from qs
dataset not imputed.
> qc_adadas %>% filter(PARAMCD=="ACTOT") %>%
+ select(USUBJID, QSSEQ, PARAMCD, AVISITN, AVISIT, VISIT, AVAL, DTYPE, ANL01FL, ADT, ADY) %>%
+ arrange(USUBJID, AVISITN) %>% filter(USUBJID=="01-701-1294")
# A tibble: 5 × 11
USUBJID QSSEQ PARAMCD AVISITN AVISIT VISIT AVAL DTYPE ANL01FL ADT ADY
<chr> <dbl> <chr> <dbl> <chr> <chr> <dbl> <chr> <chr> <date> <dbl>
1 01-701-1294 5015 ACTOT 0 Baseline BASELINE 9 "" "Y" 2013-03-24 1
2 01-701-1294 5030 ACTOT 8 Week 8 WEEK 8 14 "" "Y" 2013-05-22 60
3 01-701-1294 5045 ACTOT 8 Week 8 WEEK 12 14 "LOCF" "" 2013-06-14 83
4 01-701-1294 5045 ACTOT 16 Week 16 WEEK 12 14 "LOCF" "Y" 2013-06-14 83
5 01-701-1294 5060 ACTOT 24 Week 24 RETRIEVAL 9 "" "Y" 2013-10-08 199
adadas generated by R
DTYPE
is not LOCF
for the record with QSSEQ=5045
and AVISIT=Week 8
, which makes more sense to me.
> adadas %>% filter(PARAMCD=="ACTOT") %>%
+ select(USUBJID, QSSEQ, PARAMCD, AVISITN, AVISIT, VISIT, AVAL, DTYPE, ANL01FL, ADT, ADY) %>%
+ arrange(USUBJID, AVISITN) %>% filter(USUBJID=="01-701-1294")
# A tibble: 5 × 11
USUBJID QSSEQ PARAMCD AVISITN AVISIT VISIT AVAL DTYPE ANL01FL ADT ADY
<chr> <dbl> <chr> <dbl> <chr> <chr> <dbl> <chr> <chr> <date> <dbl>
1 01-701-1294 5015 ACTOT 0 Baseline BASELINE 9 "" "Y" 2013-03-24 1
2 01-701-1294 5030 ACTOT 8 Week 8 WEEK 8 14 "" "Y" 2013-05-22 60
3 01-701-1294 5045 ACTOT 8 Week 8 WEEK 12 6 "" "" 2013-06-14 83
4 01-701-1294 5045 ACTOT 16 Week 16 WEEK 12 6 "LOCF" "Y" 2013-06-14 83
5 01-701-1294 5060 ACTOT 24 Week 24 RETRIEVAL 9 "" "Y" 2013-10-08 199
Used
derive_locf_records()
to derivePARAMCD=ACTOT, DTYPE=LOCF
, differences with original adadas are due to below two issues:derive_locf_records()
from admiral 0.9.0:by_vars
parameter. Those variables are blanks forDTYPE=LOCF
if we use this function.keep_vars
inderive_locf_records()
keep_vars
toderive_locf_records()
, and saved it asR/derive_locf_records_()
, adadas.R is using this updated function for now