From aba4ac081d841b36081f5a05cd1f611cafe6a5f0 Mon Sep 17 00:00:00 2001
From: GitHub Actions
Note: We only display variables that were derived. A +
+Note: We only display variables that were derived. A user running this code will have additional adsl variables displayed. You can use the Choose Columns to Display button to add more variables into the table.
@@ -323,8 +307,8 @@
adsl <- adsl %>%
derive_var_trtdurd()
EOSDT
)= DSCAT == "DISPOSITION EVENT" & DSDECOD != "SCREEN FAILURE"
)The ds_ext
dataset:
The adsl
dataset:
The derive_vars_dt()
function allows to impute partial
+
The adsl
dataset:
The derive_vars_dt()
function allows to impute partial
dates as well. If imputation is needed and missing days are to be
imputed to the first of the month and missing months to the first month
of the year, set highest_imputation = "M"
.
EOSSTT
)= exprs(EOSSTT = format_eosstt(DSDECOD)),
missing_values = exprs(EOSSTT = "ONGOING")
)
-
-This call would return the input dataset with the column +
+This call would return the input dataset with the column
EOSSTT
added.
If the derivation must be changed, the user can create his/her own
function to map DSDECOD
to a suitable EOSSTT
@@ -443,8 +427,8 @@
DCSREAS
,
filter_add = DSCAT == "DISPOSITION EVENT" &
!(DSDECOD %in% c("SCREEN FAILURE", "COMPLETED", NA))
)
-
-This call would return the input dataset with the column +
+This call would return the input dataset with the column
DCSREAS
and DCSREASP
added.
If the derivation must be changed, the user can define that
derivation in the filter_add
argument of the function to
@@ -476,8 +460,8 @@
DCSREAS
,
new_vars = exprs(DCSREASP = DSTERM),
filter_add = DSCAT == "DISPOSITION EVENT" & DSDECOD %in% "OTHER"
)
-
-
+
+
RANDDT
)
@@ -495,8 +479,8 @@ RANDDT
))This call would return the input dataset with the column
RANDDT
is added.
DTHDT
)= "DTH",
dtc = DTHDTC
)This call would return the input dataset with the columns +
+This call would return the input dataset with the columns
DTHDT
added and, by default, the associated date imputation
flag (DTHDTF
) populated with the controlled terminology
outlined in the ADaM IG for date imputations. If the imputation flag is
@@ -577,8 +561,8 @@
DTHCAUS
)= "first",
dthcaus = AEDECOD
)
-
-+ +- -src_ds <- dthcaus_source( dataset_name = "ds", filter = DSDECOD == "DEATH" & grepl("DEATH DUE TO", DSTERM), @@ -586,8 +570,8 @@
Cause of Death (
DTHCAUS
)= "first", dthcaus = "Death in DS" )Once the sources are defined, the function +
+Once the sources are defined, the function
derive_var_dthcaus()
can be used to deriveDTHCAUS
:- -@@ -596,8 +580,8 @@Cause of Death (
DTHCAUS
)src_ae, src_ds, source_datasets = list(ae = ae, ds = ds_ext) )The function also offers the option to add some traceability +
+The function also offers the option to add some traceability variables (e.g.
DTHDOM
would store the domain where the date of death is collected, andDTHSEQ
would store thexxSEQ
value of that domain). To add them, the @@ -627,8 +611,8 @@Cause of Death (
DTHCAUS
)src_ae, src_ds, source_datasets = list(ae = ae, ds = ds_ext) )
LSTALVDT
)= list(ae = ae, adsl = adsl, lb = lb),
mode = "last"
)Similarly to dthcaus_source()
, the traceability
+
Similarly to dthcaus_source()
, the traceability
variables can be added by specifying the set_values_to
argument in date_source()
.
@@ -747,8 +731,8 @@Derive the Last Date Known Alive (
LSTALVDT
)= list(ae = ae, adsl = adsl, lb = lb), mode = "last" )
AGEGR1
or REGION1
= format_agegr1(AGE),
REGION1 = format_region1(COUNTRY)
)SAFFL
)
@@ -815,8 +799,8 @@ SAFFL
)= SAFFL,
condition = (EXDOSE > 0 | (EXDOSE == 0 & str_detect(EXTRT, "PLACEBO")))
)The CDISC pilot EX
domain data does not contain a dose
+
The CDISC pilot EX
domain data does not contain a dose
adjustment flag or the planned dose information. For demonstration
purposes, this will be added to the data.
@@ -258,8 +242,8 @@Derive/Impute Numeric Date/Time and Analysis Day (
ADT
adex <- derive_vars_dt(adex, new_vars_prefix = "AST", dtc = EXSTDTC) adex <- derive_vars_dt(adex, new_vars_prefix = "AEN", dtc = EXENDTC)
The next examples demonstrates the datetime imputation features +
+The next examples demonstrates the datetime imputation features
available in the derive_vars_dtm()
function, where the time
is imputed as “00:00:00”:
@@ -277,8 +261,8 @@Derive/Impute Numeric Date/Time and Analysis Day (
ADT= "last", new_vars_prefix = "AEN" )
The example above imputes the start date to the first first day of +
+The example above imputes the start date to the first first day of the month and imputes the end date to the last day of the month.
Please see the Date and Time Imputation for additional examples on calculating and imputing analysis dates.
@@ -289,8 +273,8 @@ADT= TRTSDT,
source_vars = exprs(ASTDT, AENDT)
)
-
-
+
+
The units of the calculated duration can also be changed. In this +
+The units of the calculated duration can also be changed. In this example, the duration is output as years:
adex <- adex %>%
@@ -315,8 +299,8 @@ Compute duration for a record= ASTDT,
end_date = AENDT
)
Please refer to the derive_vars_duration()
documentation
+
Please refer to the derive_vars_duration()
documentation
for detailed information on the input parameters.
It may be necessary to calculate additional intermediate values. For example, the cumulative doses received and cumulative planned doses may @@ -327,8 +311,8 @@
It may be of additional interest to turn a single record containing +
+It may be of additional interest to turn a single record containing dosing summary information into a set of multiple single records, each representing a single dose over the interval specified by the summary record. This is another approach to deriving a total dose parameter when @@ -341,8 +325,8 @@
A record with PARAMCD == "TDOSE"
is created with
+
A record with PARAMCD == "TDOSE"
is created with
PARCAT1
set to "OVERALL"
using the records in
ADEX
where PARAMCD == "DOSE"
by summing
AVAL
. In addition, the ASTDT
, and
@@ -496,8 +480,8 @@
Dose intensity can be calculated using the function +
+Dose intensity can be calculated using the function
derive_param_doseint()
. The planned dose and administered
dose are passed into the function and a new record is created with the
dose intensity calculation. Again, only those variables specified in the
@@ -510,8 +494,8 @@
The default calculation for dose intensity is: Administered Doses / +
+The default calculation for dose intensity is: Administered Doses / Planned Doses * 100.
Please see the derive_param_doseint()
documentation to
see how planned doses of 0 or NA
are handled.
AVALCATx
)TRUE ~ NA_character_
)
)
-
-
+
+
ASEQ
@@ -650,8 +634,8 @@ ASEQ
= exprs(PARCAT1, ASTDT, VISIT, VISITNUM, EXSEQ, PARAMN),
check_type = "error"
)ADSL
variables
diff --git a/patch/articles/bds_finding.html b/patch/articles/bds_finding.html
index c7d8d2bb5f..5d10af6da8 100644
--- a/patch/articles/bds_finding.html
+++ b/patch/articles/bds_finding.html
@@ -33,7 +33,7 @@
admiral
- 0.12.0
+ 0.12.1
ADT
,
@@ -242,8 +226,8 @@ ADTExample calls:
advs <- derive_vars_dt(advs, new_vars_prefix = "A", dtc = VSDTC)
-
-If imputation is needed and the date is to be imputed to the first of
+
+If imputation is needed and the date is to be imputed to the first of
the month, the call would be:
advs <- derive_vars_dt(
@@ -252,8 +236,8 @@ Derive/Impute Numeric Date/Time and Analysis Day (ADT= VSDTC,
highest_imputation = "M"
)
-
-Similarly, ADTM
may be created using the function
+
+Similarly, ADTM
may be created using the function
derive_vars_dtm()
. Imputation may be done on both the date
and time components of ADTM
.
@@ -278,8 +262,8 @@ Derive/Impute Numeric Date/Time and Analysis Day (ADT
advs <-
derive_vars_dy(advs, reference_date = TRTSDT, source_vars = exprs(ADT))
-
-
+
+
PARAMCD
, PARAM
,
@@ -373,8 +357,8 @@ PARAMCD
, PARAM
,
by_vars = exprs(VSTESTCD)
)
#> All `VSTESTCD` are mapped.Please note, it may be necessary to include other variables in the +
+Please note, it may be necessary to include other variables in the
join. For example, perhaps the PARAMCD
is based on
VSTESTCD
and VSPOS
, it may be necessary to
expand this lookup or create a separate look up for
@@ -395,8 +379,8 @@
AVAL
, AVALC
)= VSSTRESN,
AVALC = VSSTRESC
)
-
-
+
+
BSA
,
@@ -419,8 +403,8 @@ BSA
,
get_unit_expr = VSSTRESU,
filter = VSSTAT != "NOT DONE" | is.na(VSSTAT)
)Likewise, function call below, to create parameter +
+Likewise, function call below, to create parameter
Body Surface Area
(BSA) and Body Mass Index
(BMI) for ADVS
domain. Note that if height is collected
only once use constant_by_vars
to specify the subject-level
@@ -445,8 +429,8 @@
BSA
,
filter = VSSTAT != "NOT DONE" | is.na(VSSTAT),
constant_by_vars = exprs(USUBJID)
)
-
-Similarly, for ADEG
, the parameters QTCBF
+
Similarly, for ADEG
, the parameters QTCBF
QTCBS
and QTCL
can be created with a function
call. See example below for PARAMCD
=
QTCF
.
BSA
,
dataset_add = select(param_lookup, -VSTESTCD),
by_vars = exprs(PARAMCD)
)
-
-
+
+
APHASE
,
@@ -576,8 +560,8 @@ ONTRTFL
)= TRTSDT,
ref_end_date = TRTEDT
)This function returns the original data frame with the column +
+This function returns the original data frame with the column
ONTRTFL
added. Additionally, this function does have
functionality to handle a window on the ref_end_date
. For
example, if on-treatment is defined as between treatment start and
@@ -621,8 +605,8 @@
ONTRTFL
)= AP01EDT,
span_period = TRUE
)
-
-
+
+
ANRIND
)
@@ -636,8 +620,8 @@ ANRIND
)The function is called as:
advs <- derive_var_anrind(advs)
BASETYPE
, ABLFL
,
@@ -689,8 +673,8 @@ BASETYPE
, ABLFL
,
),
filter = (!is.na(AVAL) & ADT <= TRTSDT & !is.na(BASETYPE))
)Note: Additional examples of the +
+Note: Additional examples of the
derive_var_extreme_flag()
function can be found above.
Lastly, the BASE
, BASEC
and
BNRIND
columns can be derived using the
@@ -717,8 +701,8 @@
BASETYPE
, ABLFL
,
source_var = ANRIND,
new_var = BNRIND
)
-
-
+
+
CHG
,
@@ -735,8 +719,8 @@ CHG
,
advs <- derive_var_chg(advs)
advs <- derive_var_pchg(advs)
If the variables should not be derived for all records, e.g., for +
+If the variables should not be derived for all records, e.g., for
post-baseline records only, restrict_derivation()
can be
used.
R2BASE
)= ANRLO,
new_var = R01ANRLO
)
-
-If the variables should not be derived for all records, e.g., for +
+If the variables should not be derived for all records, e.g., for
post-baseline records only, restrict_derivation()
can be
used.
ANL01FL
)),
filter = !is.na(AVISITN)
)
-
-Another common example would be flagging the worst value for a +
+Another common example would be flagging the worst value for a
subject, parameter, and visit. For this example, we will assume we have
3 PARAMCD
values (SYSBP
, DIABP
,
and RESP
). We will also assume high is worst for
@@ -835,8 +819,8 @@
ANL01FL
))
) %>%
arrange(STUDYID, USUBJID, BASETYPE, PARAMCD, AVISIT)
-
-
+
+
TRTA
, TRTP
)
@@ -874,8 +858,8 @@ ASEQ
= exprs(PARAMCD, ADT, AVISITN, VISITNUM, ATPTN),
check_type = "error"
)AVALCATx
)
@@ -903,8 +887,8 @@ AVALCATx
)avalcat_lookup,
by = exprs(PARAMCD, AVALCA1N)
)PARAMCD
)
@@ -1025,8 +1009,8 @@ PARAMC
PARAM = "Mean Arterial Pressure 2 (mmHg)"
)
)
Note that in practice for efficacy parameters you might use +
+Note that in practice for efficacy parameters you might use randomization date as the time to event origin date.
View(adsl)
-
-View(adrs)
-
-An event for progression free survival occurs if
+ +View(adrs)
+
+An event for progression free survival occurs if
In the following example a time-to-event parameter for each preferred term in the AE dataset is derived.
View(adsl)
-
-View(ae)
-
-+ ++ +View(ae)
- - + +# define time to first adverse event event # ttae <- event_source( dataset_name = "ae", @@ -734,8 +718,8 @@
Deriving Time-to-Even PARCAT2 = AEDECOD ) )
AVAL
)= STARTDT,
end_date = ADT
)ASEQ
)
@@ -768,8 +752,8 @@ ASEQ
)= exprs(PARAMCD),
check_type = "error"
)Here’s how all these above derived variables then look in the dataset.
- -Some further examples of “merged” functions are +
+Some further examples of “merged” functions are
derive_vars_merged_lookup()
to join a user-defined lookup
table as commonly used in BDS ADaMs or
derive_var_merged_summary()
to merge summarized values from
@@ -370,8 +354,8 @@
Now, let’s consider another example of +
+Now, let’s consider another example of
derive_vars_joined()
. For this we’ll need to additionally
use the join_vars
argument, which is where the user needs
to call out any variables from the additional dataframe being used in
@@ -399,8 +383,8 @@
The derive_vars_joined()
function could also be used to
+
The derive_vars_joined()
function could also be used to
join the original dataframe back with itself, which may be necessary if
you’re comparing across different observations. For example, the below
shows how a “nadir” calculation would be achieved which checks for the
@@ -422,8 +406,8 @@
There exists a further function +
+There exists a further function
derive_var_joied_exist_flag()
, which follows a similar
principle to the “joined” set as explained here. This can be used for
whenever one set of observations “confirms” another set in a dataframe,
@@ -465,8 +449,8 @@
Common further examples of usage of this set of functions could be +
+Common further examples of usage of this set of functions could be
using derive_var_extreme_dt()
for last known alive date
calculation or derive_extreme_records()
for creating
derived minimum or maximum value records.
Here is an example of how to achieve the same with +
+Here is an example of how to achieve the same with
using call_derivation()
, where any different arguments are
passed using params()
:
@@ -238,8 +222,8 @@Call Derivation= exprs(USUBJID, VSTESTCD), order = exprs(VSORRES, VSSEQ) )
In the example, you can see how in these higher order functions, +
+In the example, you can see how in these higher order functions,
derivation
is where the user supplies the name of the
derivation function to apply, with no trailing parentheses required.
Then variable_params
is used to pass a list of the
@@ -274,8 +258,8 @@
Developing your ADaM scripts this way using +
+Developing your ADaM scripts this way using
call_derivation()
could give the following benefits:
As you can see in the example, the derivation_slice
+
As you can see in the example, the derivation_slice
ordering is important. Here we addressed all the AEs on or after study
day 1 first, and then we used filter = TRUE
option to catch
all remaining records (in this case pre-treatment AEs).
The order is only important when the slices are not mutually +
+The order is only important when the slices are not mutually
exclusive, so in the above case the moderate AE slice could have been
above the severe AE slice, for example, and there would have been no
difference to the result. However the third slice had to come last to
diff --git a/patch/articles/hys_law.html b/patch/articles/hys_law.html
index c47975a6b5..490cea91e5 100644
--- a/patch/articles/hys_law.html
+++ b/patch/articles/hys_law.html
@@ -33,7 +33,7 @@
admiral
- 0.12.0
+ 0.12.1
Advanced User Guides
-
-
CRITy
,
@@ -237,8 +221,8 @@ CRITy
,
)
) %>%
select(STUDYID, USUBJID, TRT01A, PARAMCD, LBSEQ, ADT, AVISIT, ADY, AVAL, ANRHI, CRIT1, CRIT1FL)LBTESTCD
and Joining by Potential
@@ -277,8 +261,8 @@ LBTESTCD
and Joining by Potential
new_vars = exprs(BILI_DT = ADT, BILI_CRITFL = CRIT1FL),
mode = "first"
)The last step would be binding these rows back to whatever previous +
+The last step would be binding these rows back to whatever previous
dataset is appropriate based on your data specifications, in this case,
it would be best suited to bind back to our adlb_annotated
object.
adlbhy <- adlb_annotated %>%
bind_rows(hylaw_params)
-
-Here we demonstrated what is the base-case that may be asked of as a +
+Here we demonstrated what is the base-case that may be asked of as a
trial programmer. The reality is that Hy’s Law and assessing potential
DILI events can get rather complex quite quickly. Differences in
assessment across organizations and specific trials might require
diff --git a/patch/articles/imputation.html b/patch/articles/imputation.html
index 1ca3a4fbb8..fe87fc15ff 100644
--- a/patch/articles/imputation.html
+++ b/patch/articles/imputation.html
@@ -33,7 +33,7 @@
admiral
- 0.12.0
+ 0.12.1
Advanced User Guides
= "first"
) %>%
derive_vars_dtm_to_dt(exprs(ASTDTM))
-
-
+
+
Create an Imputed Date Variable and Imputation Flag Variable
@@ -513,8 +497,8 @@
Create an
highest_imputation = "M",
date_imputation = "first"
)
Impute Time without Imputing Date
@@ -538,8 +522,8 @@
Impute Time without Imputing Date= "h",
time_imputation = "first"
)
Avoid Imputed Dates Before a Particular Date
@@ -572,8 +556,8 @@
Avoid Imputed Dates Before
time_imputation = "first",
min_dates = exprs(TRTSDTM)
)
Avoid Imputed Dates After a Particular Date
@@ -603,8 +587,8 @@
Avoid Imputed Dates After a
time_imputation = "last",
max_dates = exprs(DTHDT, DCUTDT)
)
Imputation Without Creating a New Variable
@@ -627,8 +611,8 @@
Imputation Without Creating
date_imputation = "first"
) < TRTSDT
)
Using More Than One Imputation Rule for a Variable
@@ -658,8 +642,8 @@
Using More Than One
args = params(time_imputation = "last")
)
)
Likewise, the list of terms defined in the
admiral metadata to implement NCI-CTCAEv5 is below:
(Terms identical to NCI-CTCAEv4, except Hyperglycemia
,
Hyperglycemia (Fasting)
and Hypophosphatemia
)
which are not present in NCI-CTCAEv5.
Finally, the list of terms defined in the admiral
metadata to implement DAIDS is below:
Using CDISC data these lab tests can be mapped to the correct
+
Using CDISC data these lab tests can be mapped to the correct
terms, firstly create PARAMCD
, PARAM
,
AVAL
, ANRLO
and ANRHI
, also some
lab grading criteria require BASE
and PCHG
, so
@@ -512,8 +496,8 @@
atoxgr_criteria_ctcv5()
or
atoxgr_criteria_daids()
, the metadata is in the data folder
of admiral. admiral also gives the option to combine
ATOXGRL
and ATOXGRH
into one variable, namely
ATOXGR
. Grades held in ATOXGRL
will be given a
@@ -523,8 +507,8 @@
adlb <- adlb %>%
derive_var_atoxgr()
Similarly, there is criteria applicable to Fasting Glucose as well as non-Fasting Glucose for “Hyperglycemia” so again this was split into 2 rows, and noted in the COMMENT variable. Note “Hypoglycemia” does not require to be split into 2 rows:
For term “INR Increased” there is the following criteria:
admiral assumed worst case and used both parts of the
criteria for grading, so comparing lab value against ULN and also BASE.
The decision made was put in the COMMENT
field.
For TERM “Hyperuricemia”, the criteria for Grade 1 and Grade 3 is the
same with respect to the lab value, so worse case is assumed as grade 3.
The decision made was put in the COMMENT
field.
A similar approach was taken for TERM “Hypokalemia” where Grade 1 and
Grade 2 criteria is the same with respect to the lab value, so worse
case is assumed as grade 2. The decision made was put in the
COMMENT
field.
admiral assumed worst case and used both parts of the
criteria for grading, so comparing lab value against ULN and also BASE.
The decision made was put in the COMMENT
field.
Similarly, for terms “Lipase Increased” and “Serum amylase
+
Similarly, for terms “Lipase Increased” and “Serum amylase
increased” there is the following criteria:
admiral assumed worst case and implemented highest
grade possible. The decision made was put in the COMMENT
field.
For TERM “Hyperuricemia”, the criteria for Grade 1 and Grade 3 is the
same with respect to the lab value, so worse case is assumed as grade 3.
The decision made was put in the COMMENT
field.
A similar approach was taken for TERM “Hypokalemia” and “Hyponatremia”. For “Hypokalemia”, where Grade 1 and Grade 2 criteria is the same with respect to the lab value, then worse case is assumed as @@ -755,8 +739,8 @@
FILTER
in the
metadata. We use {admiral} function compute_duration
to
calculate age, see TERM = “Cholesterol, Fasting, High”: Note: All possible values must be covered for each TERM defined, for TERM = “Absolute Lymphocyte Count, Low” and “Absolute CD4+ Count, Low” there is only grading criteria defined for age > 5 years. Therefore, @@ -841,8 +825,8 @@
Similarly, for terms “Absolute CD4+ Count, Low” and “Absolute Lymphocyte Count, Low”, the criteria is based on subjects “not HIV infected”, this is captured in COMMENT field.
For term “Acidosis”, “Alkalosis” and “Direct Bilirubin, High (> 28 days of age)”, {admiral} grades as high as possible, so assumes worst case and subject has “life-threatening consequences”. This is captured in COMMENT field.
Similarly, for term “Lactate, High”, {admiral} only grade 1 and
+
Similarly, for term “Lactate, High”, {admiral} only grade 1 and
2, and there is the following criteria:
admiral assumed worst case and assume “without
acidosis”. The decision made was put in the COMMENT
field.
For TERM “Direct Bilirubin, High (<= 28 days of age)” and “Uric Acid, High” the criteria is not given in SI unit. The conversion to SI unit is in the comment field.
See also Date and Time Imputation.
+ +See also Date and Time Imputation.
To derive on-treatment flag (ONTRTFL
) in an ADaM dataset
+
To derive on-treatment flag (ONTRTFL
) in an ADaM dataset
with a single occurrence date, we use
derive_var_ontrtfl()
.
The expected result is the input dataset with an additional column @@ -506,8 +490,8 @@
data("queries")
+ +- -adae1 <- tibble::tribble( ~USUBJID, ~ASTDTM, ~AETERM, ~AESEQ, ~AEDECOD, ~AELLT, ~AELLTCD, "01", "2020-06-02 23:59:59", "ALANINE AMINOTRANSFERASE ABNORMAL", @@ -539,8 +523,8 @@
Derive Query Variables) adae_query <- derive_vars_query(dataset = adae1, dataset_queries = queries)
Similarly to SMQ, the
+derive_vars_query()
function can +Similarly to SMQ, the
derive_vars_query()
function can be used to derive Standardized Drug Groupings (SDG).- - + +sdg <- tibble::tribble( @@ -559,8 +543,8 @@
Derive Query Variables"05", "2020-06-09 23:59:59", "Diuretic 2" ) adcm_query <- derive_vars_query(adcm, sdg)
ADSL
variables
@@ -573,8 +557,8 @@ ADSL
variables= select(adsl, !!!negate_vars(adsl_vars)),
by_vars = exprs(STUDYID, USUBJID)
)Next we will also join ADSL
data with EX
+
Next we will also join ADSL
data with EX
and derive dates/times. This section uses the admiral
functions derive_vars_merged()
,
derive_vars_dtm()
, and
@@ -370,8 +354,8 @@
Similarly, find next dose information using +
+Similarly, find next dose information using
derive_vars_joined()
with the filter_join
parameter as ADTM <= ADTM.join
. Here we keep the next
dose analysis date ADTM_next
, the next actual dose
@@ -517,8 +501,8 @@
Use the same method to find the previous and next nominal times. Note +
+Use the same method to find the previous and next nominal times. Note that here the data are sorted by nominal time rather than the actual time. This will tell us when the previous dose and the next dose were supposed to occur. Sometimes this will differ from the actual times in a @@ -557,8 +541,8 @@
For nominal relative times we calculate NRRLT
generally
+
For nominal relative times we calculate NRRLT
generally
as NFRLT - NFRLT_prev
and NXRLT
as
NFRLT - NFRLT_next
.
@@ -662,8 +646,8 @@Combine PC and EX Records and Derive Relative Time VariablesTRUE ~ NFRLT - NFRLT_next ) )
ADPC
data with Duplicated Records
@@ -837,8 +821,8 @@ ADPC
data with Duplicated Records= "Y",
ANL02FL = if_else(is.na(DTYPE), "Y", NA_character_),
)ASEQ
@@ -886,8 +870,8 @@ ASEQ
derive_vars_merged(
dataset_add = select(param_lookup, -PCTESTCD), by_vars = exprs(PARAMCD)
)ADSL
variables
@@ -1037,8 +1021,8 @@ ADPPK
= NFRLT %/% 24 + 1,
AVISIT = paste("Day", AVISITN),
)ADPPK
@@ -1140,8 +1124,8 @@ ADPPK
TRUE ~ NFRLT - NFRLT_prev
)
)ASEQ
and Remove Temporary Variables
@@ -1253,8 +1237,8 @@ ASEQ
and Remove Temporary Variables-starts_with("AVISIT"), -starts_with("PARAM"),
-ends_with("TMF"), -starts_with("TRT"), -starts_with("ATPT"), -DRUG
)ADPPK
Data
@@ -1407,8 +1391,8 @@ ADPPK
Data) %>%
arrange(STUDYIDN, USUBJIDN, AFRLT, EVID) %>%
mutate(RECSEQ = row_number())
data("example_qs")
qs <- example_qs
+ + - - + +
We handle unscheduled visits as normal visits. For deriving visits +
+We handle unscheduled visits as normal visits. For deriving visits
based on time-windows, see Visit
and Period Variables. And for flagging values to be used for
analysis, see derive_var_extreme_flag()
.
For the GDS-SF questionnaire, the total score is defined as the +
+For the GDS-SF questionnaire, the total score is defined as the average of the item values transformed to the range [0, 15] and rounded up to the next integer. If more than five items are missing, the total score is considered as missing. This parameter can be derived by @@ -293,8 +277,8 @@
After deriving the scores by visit, the baseline and change from +
+After deriving the scores by visit, the baseline and change from baseline variables can be derived:
adgdssf <- adgdssf %>%
@@ -323,8 +307,8 @@ Scales and Scores= exprs(PARAMCD, ADT),
check_type = "error"
)
Then a time to deterioration parameter can be derived by:
+ +Then a time to deterioration parameter can be derived by:
# Define event
deterioration_event <- event_source(
@@ -429,8 +413,8 @@ Time to Deterioration/Improvement= STARTDT,
end_date = ADT
)
For flagging deteriorations at two consecutive assessments or +
+For flagging deteriorations at two consecutive assessments or
considering death due to progression at the last assessment as
confirmation, the tmp_obs_nr_var
argument is helpful:
@@ -486,8 +470,8 @@Time to Confirmed/ CHGCAT1.join == "WORSENED" & ADY.join >= ADY + 7 | tmp_obs_nr == max(tmp_obs_nr.join) & DTHCAUS == "PROGRESSIVE DISEASE") )
For definitive deterioration (deterioration at all following +
+For definitive deterioration (deterioration at all following
assessments), parameter summary functions like all()
can be
used in the filter condition:
@@ -500,8 +484,8 @@Time to Confirmed/ join_type = "after", filter = CHGCAT1 == "WORSENED" & all(CHGCAT1.join == "WORSENED") )
The time-to-event parameter can be derived in the same way as for the +
+The time-to-event parameter can be derived in the same way as for the unconfirmed parameters (see Time to Deterioration/Improvement).
@@ -563,8 +547,8 @@Please note that the denominator may depend on the answers of some of +
+Please note that the denominator may depend on the answers of some of the questions. For example, a given questionnaire might direct someone to go from question #4 directly to question #8 based on their response to question #4, because questions #5, #6 and #7 would not apply in that @@ -634,8 +618,8 @@