To use recodeflow with your data, you’ll need create the following worksheets:

  • variable_details - mapping of variables across datasets and a list of instructions on how to recode variables, and
  • variables - a list of variables to recode

Files can either be a .csv file that you import to R or a dataframe created directly in R.

If you have derived variables, you will also need to create custom functions. For more information on custom functions see the article derived variables.

Example data

Our examples use the dataset pbc from the package survival. We’ve split this dataset in two (tester1 and tester2) to mimic real data e.g., the same survey preformed in separate years. We’ve also added columns (agegrp5 and agegrp10) to this dataset for our examples.

We’ll use our example datasets and the variable stage. The variable stage captures the histologic stage of the patient’s disease (primary biliary cirrhosis (PBC)).

How to create the variable_details worksheet

The variable_details worksheet does two important steps. First, it maps variables across datasets. Second, it gives instructions on how to recode the variables.

Note: additional information for the variable_details worksheet is in the article variable_details.

Note: additional details on how to add derived variables to the variable_detials worksheet is in the article derived variables.

Rows

For the stage variable, there are the following six rows:

  • 4 rows for the 4 categories for the histological stage of the disease,
  • 1 row for the not applicable responses, and
  • 1 row for else.

Since stage is coded consistently across the two datasets (tester1 and tester2) we only need one row per categorical response.

Columns (14)

  1. variable: the name of the final recoded variable. We’ll use the same name as in the original dataset stage though you could rename the variable.

Write stage in the column variable in the six rows.

variable
age
age
age
albumin
albumin
albumin
alk.phos
alk.phos
ascites
ascites
ascites
ascites
alk.phos
ast
ast
ast
bili
bili
chol
chol
chol
copper
copper
edema
edema
edema
edema
edema
hepato
hepato
hepato
copper
platelet
platelet
platelet
protime
protime
hepato
sex
sex
sex
sex
spiders
spiders
spiders
spiders
stage
stage
stage
stage
stage
stage
status
status
status
status
protime
time
time
time
trig
trig
status
trt
trt
trt
trt
trig
example_der
agegrp10
agegrp10
agegrp10
agegrp10
agegrp10
agegrp10
agegrp10
agegrp5
agegrp5
agegrp5
agegrp5
agegrp5
agegrp5
agegrp5
agegrp5
agegrp5
agegrp5
agegrp5
agegrp5
age_cont
age_cont
age_cont
age_cont
age_cont
age_cont
age_cont
age_cont
age_cont
age_cont
age_cont
age_cont
age_cont
age_cont
age_cont
age_cont
age_cont
age_cont
age_cont
agegrp10
agegrp10
agegrp10
agegrp10
agegrp10
agegrp10
agegrp10
agegrp10
agegrp10
agegrp10
agegrp10
agegrp10
  1. typeEnd: indicates the type of variable (continous or categorical)for the recoded (final) variable. stage, which captures the stage of the disease, is a categorical variable in the original dataset and will remain a categorical variable after recoding.

Write ‘cat’ in the six rows.

variable dummyVariable typeEnd typeStart databaseStart variableStart variableStartLabel numValidCat recEnd catLabel catLabelLong units recStart catStartLabel variableStartShortLabel notes
age NA cont cont tester1; tester2 [age] age NA copy NA NA NA [20,80] NA age NA
age NA cont cont tester1; tester2 [age] age NA NA::b missing missing NA else NA age NA
age NA cont cont tester1; tester2 [age] age NA NA::a not applicable not applicable NA 999 NA age NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA copy NA NA NA [1,5] NA albumin NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA NA::b missing missing NA else NA albumin NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA NA::a not applicable not applicable NA 99 NA albumin NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA copy NA NA NA [200,15000] NA alk.phos NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA NA::b missing missing NA else NA alk.phos NA
ascites ascites_cat3_1 cat cat tester1; tester2 [ascites] ascites 2 0 ascites 0 ascites 0 NA 0 ascites 0 ascites NA
ascites ascites_cat3_2 cat cat tester1; tester2 [ascites] ascites 2 1 ascites 1 ascites 1 NA 1 ascites 1 ascites NA
ascites ascites_cat3_NA::b cat cat tester1; tester2 [ascites] ascites 2 NA::b missing missing NA else ascites 0 ascites NA
ascites ascites_cat3_NA::a cat cat tester1; tester2 [ascites] ascites 2 NA::a not applicable not applicable NA 9 not applicable NA NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA NA::a not applicable not applicable NA 99999 NA alk.phos NA
ast NA cont cont tester1; tester2 [ast] ast NA copy NA NA NA [20,500] NA ast NA
ast NA cont cont tester1; tester2 [ast] ast NA NA::b missing missing NA else NA ast NA
ast NA cont cont tester1; tester2 [ast] ast NA NA::a not applicable not applicable NA 9999 NA ast NA
bili NA cont cont tester1; tester2 [bili] bili NA copy NA NA NA [0,100] NA bili NA
bili NA cont cont tester1; tester2 [bili] bili NA NA::b missing missing NA else NA bili NA
chol NA cont cont tester1; tester2 [chol] chol NA copy NA NA NA [100,2000] NA chol NA
chol NA cont cont tester1; tester2 [chol] chol NA NA::b missing missing NA else NA chol NA
chol NA cont cont tester1; tester2 [chol] chol NA NA::a missing missing NA 9999 NA chol NA
copper NA cont cont tester1; tester2 [copper] copper NA copy NA NA NA [0,1000] NA copper NA
copper NA cont cont tester1; tester2 [copper] copper NA NA::b missing missing NA else NA copper NA
edema edema_cat3_1 cat cat tester1; tester2 [edema] edema 3 0 edema 0.0 edema 0.0 NA 0 edema 0.0 edema NA
edema edema_cat3_2 cat cat tester1; tester2 [edema] edema 3 0.5 edema 0.5 edema 0.5 NA 0.5 edema 0.5 edema NA
edema edema_cat3_3 cat cat tester1; tester2 [edema] edema 3 1 edema 1.0 edema 1.0 NA 1 edema 1.0 edema NA
edema edema_cat3_NA::b cat cat tester1; tester2 [edema] edema 3 NA::b missing missing NA else missing edema NA
edema edema_cat3_NA::a cat cat tester1; tester2 [edema] edema 3 NA::a not applicable not applicable NA 9 not applicable edema NA
hepato heapto_cat3_1 cat cat tester1; tester2 [hepato] hepato 2 0 hepato 0 hepato 0 NA 0 hepato 0 hepato NA
hepato heapto_cat3_1 cat cat tester1; tester2 [hepato] hepato 2 1 hepato 1 hepato 1 NA 1 hepato 1 hepato NA
hepato heapto_cat3_NA::a cat cat tester1; tester2 [hepato] hepato 2 NA::b missing missing NA else missing hepato NA
copper NA cont cont tester1; tester2 [copper] copper NA NA::a missing missing NA 9999 NA copper NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA copy NA NA NA [0,1000] NA platelet NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA NA::b missing missing NA else NA platelet NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA NA::a not applicable not applicable NA 9999 NA platelet NA
protime NA cont cont tester1; tester2 [protime] protime NA copy NA NA NA [5, 30] NA protime NA
protime NA cont cont tester1; tester2 [protime] protime NA NA::b missing missing NA else NA protime NA
hepato heapto_cat3_NA::b cat cat tester1; tester2 [hepato] hepato 2 NA::a not applicable not applicable NA 9 not applicable hepato NA
sex sex_cat2_1 cat cat tester1; tester2 [sex] sex 2 m sex m sex m NA m sex m sex NA
sex sex_cat2_2 cat cat tester1; tester2 [sex] sex 2 f sex f sex f NA f sex f sex NA
sex sex_cat2_NA::b cat cat tester1; tester2 [sex] sex 2 NA::b missing missing NA else sex m sex NA
sex sex_cat2_NA::a cat cat tester1; tester2 [sex] sex 2 NA::a not applicable not applicable NA 9 sex m sex NA
spiders spiders0 cat cat tester1; tester2 [spiders] spiders 2 0 spiders 0 spiders 0 NA 0 spiders 0 spiders NA
spiders spiders1 cat cat tester1; tester2 [spiders] spiders 2 1 spiders 1 spiders 1 NA 1 spiders 1 spiders NA
spiders spiders_NA::b cat cat tester1; tester2 [spiders] spiders 2 NA::b missing missing NA else spiders 0 spiders NA
spiders spiders_NA::a cat cat tester1; tester2 [spiders] spiders 2 NA::a not applicable not applicable NA 9 not applicable spiders NA
stage stage1 cat cat tester1; tester2 [stage] stage 4 1 stage 1 stage 1 NA 1 stage 1 stage NA
stage stage2 cat cat tester1; tester2 [stage] stage 4 2 stage 2 stage 2 NA 2 stage 2 stage NA
stage stage3 cat cat tester1; tester2 [stage] stage 4 3 stage 3 stage 3 NA 3 stage 3 stage NA
stage stage4 cat cat tester1; tester2 [stage] stage 4 4 stage 4 stage 4 NA 4 stage 4 stage NA
stage stage_NA::b cat cat tester1; tester2 [stage] stage 4 NA::b missing missing NA else missing stage NA
stage stage_NA::a cat cat tester1; tester2 [stage] stage 4 NA::a not applicable not applicable NA 9 not applicable stage NA
status status0 cat cat tester1; tester2 [status] status 3 0 status 0 status 0 NA 0 status 0 status NA
status status1 cat cat tester1; tester2 [status] status 3 1 status 1 status 1 NA 1 status 1 status NA
status status2 cat cat tester1; tester2 [status] status 3 2 status 2 status 2 NA 2 status 2 status NA
status status_NA::b cat cat tester1; tester2 [status] status 3 NA::b missing missing NA else status 0 status NA
protime NA cont cont tester1; tester2 [protime] protime NA NA::a not applicable not applicable NA 99 NA protime NA
time NA cont cont tester1; tester2 [time] time NA copy NA NA NA [0,5000] NA time NA
time NA cont cont tester1; tester2 [time] time NA NA::b missing missing NA else NA time NA
time NA cont cont tester1; tester2 [time] time NA NA::a not applicable not applicable NA 9999 NA time NA
trig NA cont cont tester1; tester2 [trig] trig NA copy NA NA NA [0,1000] NA trig NA
trig NA cont cont tester1; tester2 [trig] trig NA NA::b missing missing NA else NA trig NA
status status_NA::a cat cat tester1; tester2 [status] status 3 NA::a not applicable not applicable NA 9 not applicable status NA
trt trt1 cat cat tester1; tester2 [trt] trt 2 1 trt 1 trt 1 NA 1 trt 1 trt NA
trt trt2 cat cat tester1; tester2 [trt] trt 2 2 trt 2 trt 2 NA 2 trt 2 trt NA
trt trt_NA::b cat cat tester1; tester2 [trt] trt 2 NA::b missing missing NA else trt 1 trt NA
trt trt_NA::a cat cat tester1; tester2 [trt] trt 2 NA::a not applicable not applicable NA 9 not applicable trt NA
trig NA cont cont tester1; tester2 [trig] trig NA NA::a missing missing NA 9999 NA trig NA
example_der NA cont cont tester1; tester2 DerivedVar::[chol, bili] example_der NA Func::example_der_fun N/A N/A NA else N/A example_der A test derived variable
agegrp10 agegrp10_cat6_1 cat cat tester2 tester2::agegrp grouped age 6 1 20-29 20-29 years 1 20-29 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester2 tester2::agegrp grouped age 6 2 30-39 30-39 years 2 30-39 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester2 tester2::agegrp grouped age 6 3 40-49 40-49 years 3 40-49 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester2 tester2::agegrp grouped age 6 4 50-59 50-59 years 4 50-59 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester2 tester2::agegrp grouped age 6 5 60-69 60-69 years 5 60-69 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester2 tester2::agegrp grouped age 6 6 70-79 70-79 years 6 70-79 grouped age NA
agegrp10 agegrp10_cat6_NA::b cat cat tester2 tester2::agegrp grouped age 6 NA::b missing missing years else missing grouped age NA
agegrp5 agegrp5_cat11_1 cat cat tester1 tester1::agegrp grouped age 11 1 25-29 25-29 years 1 20-29 grouped age NA
agegrp5 agegrp5_cat11_2 cat cat tester1 tester1::agegrp grouped age 11 2 30-34 30-34 years 2 30-39 grouped age NA
agegrp5 agegrp5_cat11_3 cat cat tester1 tester1::agegrp grouped age 11 3 35-39 35-39 years 3 30-39 grouped age NA
agegrp5 agegrp5_cat11_4 cat cat tester1 tester1::agegrp grouped age 11 4 40-44 40-44 years 4 40-49 grouped age NA
agegrp5 agegrp5_cat11_5 cat cat tester1 tester1::agegrp grouped age 11 5 45-49 45-49 years 5 40-49 grouped age NA
agegrp5 agegrp5_cat11_6 cat cat tester1 tester1::agegrp grouped age 11 6 50-54 50-54 years 6 50-59 grouped age NA
agegrp5 agegrp5_cat11_7 cat cat tester1 tester1::agegrp grouped age 11 7 55-59 55-59 years 7 50-59 grouped age NA
agegrp5 agegrp5_cat11_8 cat cat tester1 tester1::agegrp grouped age 11 8 60-64 60-64 years 8 60-69 grouped age NA
agegrp5 agegrp5_cat11_9 cat cat tester1 tester1::agegrp grouped age 11 9 65-69 65-69 years 9 60-69 grouped age NA
agegrp5 agegrp5_cat11_10 cat cat tester1 tester1::agegrp grouped age 11 10 70-74 70-74 years 10 70-79 grouped age NA
agegrp5 agegrp5_cat11_11 cat cat tester1 tester1::agegrp grouped age 11 11 75-79 75-79 years 11 70-79 grouped age NA
agegrp5 agegrp5_cat11_NA::b cat cat tester1 tester1::agegrp grouped age 11 Na::b missing missing years else missing grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 27 NA NA years 1 20-29 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 32 NA NA years 2 30-39 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 37 NA NA years 3 30-39 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 42 NA NA years 4 40-49 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 47 NA NA years 5 40-49 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 52 NA NA years 6 50-59 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 57 NA NA years 7 50-59 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 62 NA NA years 8 60-69 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 67 NA NA years 9 60-69 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 72 NA NA years 10 70-79 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 77 NA NA years 11 70-79 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA NA::b NA NA years else missing grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 25 NA NA years 1 20-29 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 35 NA NA years 2 30-39 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 45 NA NA years 3 40-49 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 55 NA NA years 4 50-59 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 65 NA NA years 5 60-69 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 75 NA NA years 6 70-79 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age 6 NA::b NA NA years else missing grouped age NA
agegrp10 agegrp10_cat6_1 cat cat tester1 tester1::agegrp grouped age 6 1 20-29 20-29 years 1 20-29 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester1 tester1::agegrp grouped age 6 2 30-39 30-39 years 2 30-39 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester1 tester1::agegrp grouped age 6 2 30-39 30-39 years 3 30-39 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester1 tester1::agegrp grouped age 6 3 40-49 40-49 years 4 40-49 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester1 tester1::agegrp grouped age 6 3 40-49 40-49 years 5 40-49 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester1 tester1::agegrp grouped age 6 4 50-59 50-59 years 6 50-59 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester1 tester1::agegrp grouped age 6 4 50-59 50-59 years 7 50-59 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester1 tester1::agegrp grouped age 6 5 60-69 60-69 years 8 60-69 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester1 tester1::agegrp grouped age 6 5 60-69 60-69 years 9 60-69 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester1 tester1::agegrp grouped age 6 6 70-79 70-79 years 10 70-79 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester1 tester1::agegrp grouped age 6 6 70-79 70-79 years 11 70-79 grouped age NA
agegrp10 agegrp10_cat6_NA::b cat cat tester1 tester1::agegrp grouped age 6 NA::b missing missing years else missing grouped age NA
  1. typeStart: indicates the type of variable (continous or categorical) for the original variable. stage is a categorical variable in the original dataset.

Write ‘cat’ in the six rows.

variable dummyVariable typeEnd typeStart databaseStart variableStart variableStartLabel numValidCat recEnd catLabel catLabelLong units recStart catStartLabel variableStartShortLabel notes
age NA cont cont tester1; tester2 [age] age NA copy NA NA NA [20,80] NA age NA
age NA cont cont tester1; tester2 [age] age NA NA::b missing missing NA else NA age NA
age NA cont cont tester1; tester2 [age] age NA NA::a not applicable not applicable NA 999 NA age NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA copy NA NA NA [1,5] NA albumin NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA NA::b missing missing NA else NA albumin NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA NA::a not applicable not applicable NA 99 NA albumin NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA copy NA NA NA [200,15000] NA alk.phos NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA NA::b missing missing NA else NA alk.phos NA
ascites ascites_cat3_1 cat cat tester1; tester2 [ascites] ascites 2 0 ascites 0 ascites 0 NA 0 ascites 0 ascites NA
ascites ascites_cat3_2 cat cat tester1; tester2 [ascites] ascites 2 1 ascites 1 ascites 1 NA 1 ascites 1 ascites NA
ascites ascites_cat3_NA::b cat cat tester1; tester2 [ascites] ascites 2 NA::b missing missing NA else ascites 0 ascites NA
ascites ascites_cat3_NA::a cat cat tester1; tester2 [ascites] ascites 2 NA::a not applicable not applicable NA 9 not applicable NA NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA NA::a not applicable not applicable NA 99999 NA alk.phos NA
ast NA cont cont tester1; tester2 [ast] ast NA copy NA NA NA [20,500] NA ast NA
ast NA cont cont tester1; tester2 [ast] ast NA NA::b missing missing NA else NA ast NA
ast NA cont cont tester1; tester2 [ast] ast NA NA::a not applicable not applicable NA 9999 NA ast NA
bili NA cont cont tester1; tester2 [bili] bili NA copy NA NA NA [0,100] NA bili NA
bili NA cont cont tester1; tester2 [bili] bili NA NA::b missing missing NA else NA bili NA
chol NA cont cont tester1; tester2 [chol] chol NA copy NA NA NA [100,2000] NA chol NA
chol NA cont cont tester1; tester2 [chol] chol NA NA::b missing missing NA else NA chol NA
chol NA cont cont tester1; tester2 [chol] chol NA NA::a missing missing NA 9999 NA chol NA
copper NA cont cont tester1; tester2 [copper] copper NA copy NA NA NA [0,1000] NA copper NA
copper NA cont cont tester1; tester2 [copper] copper NA NA::b missing missing NA else NA copper NA
edema edema_cat3_1 cat cat tester1; tester2 [edema] edema 3 0 edema 0.0 edema 0.0 NA 0 edema 0.0 edema NA
edema edema_cat3_2 cat cat tester1; tester2 [edema] edema 3 0.5 edema 0.5 edema 0.5 NA 0.5 edema 0.5 edema NA
edema edema_cat3_3 cat cat tester1; tester2 [edema] edema 3 1 edema 1.0 edema 1.0 NA 1 edema 1.0 edema NA
edema edema_cat3_NA::b cat cat tester1; tester2 [edema] edema 3 NA::b missing missing NA else missing edema NA
edema edema_cat3_NA::a cat cat tester1; tester2 [edema] edema 3 NA::a not applicable not applicable NA 9 not applicable edema NA
hepato heapto_cat3_1 cat cat tester1; tester2 [hepato] hepato 2 0 hepato 0 hepato 0 NA 0 hepato 0 hepato NA
hepato heapto_cat3_1 cat cat tester1; tester2 [hepato] hepato 2 1 hepato 1 hepato 1 NA 1 hepato 1 hepato NA
hepato heapto_cat3_NA::a cat cat tester1; tester2 [hepato] hepato 2 NA::b missing missing NA else missing hepato NA
copper NA cont cont tester1; tester2 [copper] copper NA NA::a missing missing NA 9999 NA copper NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA copy NA NA NA [0,1000] NA platelet NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA NA::b missing missing NA else NA platelet NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA NA::a not applicable not applicable NA 9999 NA platelet NA
protime NA cont cont tester1; tester2 [protime] protime NA copy NA NA NA [5, 30] NA protime NA
protime NA cont cont tester1; tester2 [protime] protime NA NA::b missing missing NA else NA protime NA
hepato heapto_cat3_NA::b cat cat tester1; tester2 [hepato] hepato 2 NA::a not applicable not applicable NA 9 not applicable hepato NA
sex sex_cat2_1 cat cat tester1; tester2 [sex] sex 2 m sex m sex m NA m sex m sex NA
sex sex_cat2_2 cat cat tester1; tester2 [sex] sex 2 f sex f sex f NA f sex f sex NA
sex sex_cat2_NA::b cat cat tester1; tester2 [sex] sex 2 NA::b missing missing NA else sex m sex NA
sex sex_cat2_NA::a cat cat tester1; tester2 [sex] sex 2 NA::a not applicable not applicable NA 9 sex m sex NA
spiders spiders0 cat cat tester1; tester2 [spiders] spiders 2 0 spiders 0 spiders 0 NA 0 spiders 0 spiders NA
spiders spiders1 cat cat tester1; tester2 [spiders] spiders 2 1 spiders 1 spiders 1 NA 1 spiders 1 spiders NA
spiders spiders_NA::b cat cat tester1; tester2 [spiders] spiders 2 NA::b missing missing NA else spiders 0 spiders NA
spiders spiders_NA::a cat cat tester1; tester2 [spiders] spiders 2 NA::a not applicable not applicable NA 9 not applicable spiders NA
stage stage1 cat cat tester1; tester2 [stage] stage 4 1 stage 1 stage 1 NA 1 stage 1 stage NA
stage stage2 cat cat tester1; tester2 [stage] stage 4 2 stage 2 stage 2 NA 2 stage 2 stage NA
stage stage3 cat cat tester1; tester2 [stage] stage 4 3 stage 3 stage 3 NA 3 stage 3 stage NA
stage stage4 cat cat tester1; tester2 [stage] stage 4 4 stage 4 stage 4 NA 4 stage 4 stage NA
stage stage_NA::b cat cat tester1; tester2 [stage] stage 4 NA::b missing missing NA else missing stage NA
stage stage_NA::a cat cat tester1; tester2 [stage] stage 4 NA::a not applicable not applicable NA 9 not applicable stage NA
status status0 cat cat tester1; tester2 [status] status 3 0 status 0 status 0 NA 0 status 0 status NA
status status1 cat cat tester1; tester2 [status] status 3 1 status 1 status 1 NA 1 status 1 status NA
status status2 cat cat tester1; tester2 [status] status 3 2 status 2 status 2 NA 2 status 2 status NA
status status_NA::b cat cat tester1; tester2 [status] status 3 NA::b missing missing NA else status 0 status NA
protime NA cont cont tester1; tester2 [protime] protime NA NA::a not applicable not applicable NA 99 NA protime NA
time NA cont cont tester1; tester2 [time] time NA copy NA NA NA [0,5000] NA time NA
time NA cont cont tester1; tester2 [time] time NA NA::b missing missing NA else NA time NA
time NA cont cont tester1; tester2 [time] time NA NA::a not applicable not applicable NA 9999 NA time NA
trig NA cont cont tester1; tester2 [trig] trig NA copy NA NA NA [0,1000] NA trig NA
trig NA cont cont tester1; tester2 [trig] trig NA NA::b missing missing NA else NA trig NA
status status_NA::a cat cat tester1; tester2 [status] status 3 NA::a not applicable not applicable NA 9 not applicable status NA
trt trt1 cat cat tester1; tester2 [trt] trt 2 1 trt 1 trt 1 NA 1 trt 1 trt NA
trt trt2 cat cat tester1; tester2 [trt] trt 2 2 trt 2 trt 2 NA 2 trt 2 trt NA
trt trt_NA::b cat cat tester1; tester2 [trt] trt 2 NA::b missing missing NA else trt 1 trt NA
trt trt_NA::a cat cat tester1; tester2 [trt] trt 2 NA::a not applicable not applicable NA 9 not applicable trt NA
trig NA cont cont tester1; tester2 [trig] trig NA NA::a missing missing NA 9999 NA trig NA
example_der NA cont cont tester1; tester2 DerivedVar::[chol, bili] example_der NA Func::example_der_fun N/A N/A NA else N/A example_der A test derived variable
agegrp10 agegrp10_cat6_1 cat cat tester2 tester2::agegrp grouped age 6 1 20-29 20-29 years 1 20-29 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester2 tester2::agegrp grouped age 6 2 30-39 30-39 years 2 30-39 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester2 tester2::agegrp grouped age 6 3 40-49 40-49 years 3 40-49 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester2 tester2::agegrp grouped age 6 4 50-59 50-59 years 4 50-59 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester2 tester2::agegrp grouped age 6 5 60-69 60-69 years 5 60-69 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester2 tester2::agegrp grouped age 6 6 70-79 70-79 years 6 70-79 grouped age NA
agegrp10 agegrp10_cat6_NA::b cat cat tester2 tester2::agegrp grouped age 6 NA::b missing missing years else missing grouped age NA
agegrp5 agegrp5_cat11_1 cat cat tester1 tester1::agegrp grouped age 11 1 25-29 25-29 years 1 20-29 grouped age NA
agegrp5 agegrp5_cat11_2 cat cat tester1 tester1::agegrp grouped age 11 2 30-34 30-34 years 2 30-39 grouped age NA
agegrp5 agegrp5_cat11_3 cat cat tester1 tester1::agegrp grouped age 11 3 35-39 35-39 years 3 30-39 grouped age NA
agegrp5 agegrp5_cat11_4 cat cat tester1 tester1::agegrp grouped age 11 4 40-44 40-44 years 4 40-49 grouped age NA
agegrp5 agegrp5_cat11_5 cat cat tester1 tester1::agegrp grouped age 11 5 45-49 45-49 years 5 40-49 grouped age NA
agegrp5 agegrp5_cat11_6 cat cat tester1 tester1::agegrp grouped age 11 6 50-54 50-54 years 6 50-59 grouped age NA
agegrp5 agegrp5_cat11_7 cat cat tester1 tester1::agegrp grouped age 11 7 55-59 55-59 years 7 50-59 grouped age NA
agegrp5 agegrp5_cat11_8 cat cat tester1 tester1::agegrp grouped age 11 8 60-64 60-64 years 8 60-69 grouped age NA
agegrp5 agegrp5_cat11_9 cat cat tester1 tester1::agegrp grouped age 11 9 65-69 65-69 years 9 60-69 grouped age NA
agegrp5 agegrp5_cat11_10 cat cat tester1 tester1::agegrp grouped age 11 10 70-74 70-74 years 10 70-79 grouped age NA
agegrp5 agegrp5_cat11_11 cat cat tester1 tester1::agegrp grouped age 11 11 75-79 75-79 years 11 70-79 grouped age NA
agegrp5 agegrp5_cat11_NA::b cat cat tester1 tester1::agegrp grouped age 11 Na::b missing missing years else missing grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 27 NA NA years 1 20-29 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 32 NA NA years 2 30-39 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 37 NA NA years 3 30-39 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 42 NA NA years 4 40-49 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 47 NA NA years 5 40-49 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 52 NA NA years 6 50-59 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 57 NA NA years 7 50-59 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 62 NA NA years 8 60-69 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 67 NA NA years 9 60-69 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 72 NA NA years 10 70-79 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 77 NA NA years 11 70-79 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA NA::b NA NA years else missing grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 25 NA NA years 1 20-29 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 35 NA NA years 2 30-39 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 45 NA NA years 3 40-49 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 55 NA NA years 4 50-59 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 65 NA NA years 5 60-69 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 75 NA NA years 6 70-79 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age 6 NA::b NA NA years else missing grouped age NA
agegrp10 agegrp10_cat6_1 cat cat tester1 tester1::agegrp grouped age 6 1 20-29 20-29 years 1 20-29 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester1 tester1::agegrp grouped age 6 2 30-39 30-39 years 2 30-39 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester1 tester1::agegrp grouped age 6 2 30-39 30-39 years 3 30-39 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester1 tester1::agegrp grouped age 6 3 40-49 40-49 years 4 40-49 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester1 tester1::agegrp grouped age 6 3 40-49 40-49 years 5 40-49 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester1 tester1::agegrp grouped age 6 4 50-59 50-59 years 6 50-59 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester1 tester1::agegrp grouped age 6 4 50-59 50-59 years 7 50-59 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester1 tester1::agegrp grouped age 6 5 60-69 60-69 years 8 60-69 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester1 tester1::agegrp grouped age 6 5 60-69 60-69 years 9 60-69 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester1 tester1::agegrp grouped age 6 6 70-79 70-79 years 10 70-79 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester1 tester1::agegrp grouped age 6 6 70-79 70-79 years 11 70-79 grouped age NA
agegrp10 agegrp10_cat6_NA::b cat cat tester1 tester1::agegrp grouped age 6 NA::b missing missing years else missing grouped age NA
  1. databaseStart: indicates the name of the database(s) from which the original variable(s) is(are) obtained.

Write the dataset names, separated by a comma, in the six rows

variable dummyVariable typeEnd typeStart databaseStart variableStart variableStartLabel numValidCat recEnd catLabel catLabelLong units recStart catStartLabel variableStartShortLabel notes
age NA cont cont tester1; tester2 [age] age NA copy NA NA NA [20,80] NA age NA
age NA cont cont tester1; tester2 [age] age NA NA::b missing missing NA else NA age NA
age NA cont cont tester1; tester2 [age] age NA NA::a not applicable not applicable NA 999 NA age NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA copy NA NA NA [1,5] NA albumin NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA NA::b missing missing NA else NA albumin NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA NA::a not applicable not applicable NA 99 NA albumin NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA copy NA NA NA [200,15000] NA alk.phos NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA NA::b missing missing NA else NA alk.phos NA
ascites ascites_cat3_1 cat cat tester1; tester2 [ascites] ascites 2 0 ascites 0 ascites 0 NA 0 ascites 0 ascites NA
ascites ascites_cat3_2 cat cat tester1; tester2 [ascites] ascites 2 1 ascites 1 ascites 1 NA 1 ascites 1 ascites NA
ascites ascites_cat3_NA::b cat cat tester1; tester2 [ascites] ascites 2 NA::b missing missing NA else ascites 0 ascites NA
ascites ascites_cat3_NA::a cat cat tester1; tester2 [ascites] ascites 2 NA::a not applicable not applicable NA 9 not applicable NA NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA NA::a not applicable not applicable NA 99999 NA alk.phos NA
ast NA cont cont tester1; tester2 [ast] ast NA copy NA NA NA [20,500] NA ast NA
ast NA cont cont tester1; tester2 [ast] ast NA NA::b missing missing NA else NA ast NA
ast NA cont cont tester1; tester2 [ast] ast NA NA::a not applicable not applicable NA 9999 NA ast NA
bili NA cont cont tester1; tester2 [bili] bili NA copy NA NA NA [0,100] NA bili NA
bili NA cont cont tester1; tester2 [bili] bili NA NA::b missing missing NA else NA bili NA
chol NA cont cont tester1; tester2 [chol] chol NA copy NA NA NA [100,2000] NA chol NA
chol NA cont cont tester1; tester2 [chol] chol NA NA::b missing missing NA else NA chol NA
chol NA cont cont tester1; tester2 [chol] chol NA NA::a missing missing NA 9999 NA chol NA
copper NA cont cont tester1; tester2 [copper] copper NA copy NA NA NA [0,1000] NA copper NA
copper NA cont cont tester1; tester2 [copper] copper NA NA::b missing missing NA else NA copper NA
edema edema_cat3_1 cat cat tester1; tester2 [edema] edema 3 0 edema 0.0 edema 0.0 NA 0 edema 0.0 edema NA
edema edema_cat3_2 cat cat tester1; tester2 [edema] edema 3 0.5 edema 0.5 edema 0.5 NA 0.5 edema 0.5 edema NA
edema edema_cat3_3 cat cat tester1; tester2 [edema] edema 3 1 edema 1.0 edema 1.0 NA 1 edema 1.0 edema NA
edema edema_cat3_NA::b cat cat tester1; tester2 [edema] edema 3 NA::b missing missing NA else missing edema NA
edema edema_cat3_NA::a cat cat tester1; tester2 [edema] edema 3 NA::a not applicable not applicable NA 9 not applicable edema NA
hepato heapto_cat3_1 cat cat tester1; tester2 [hepato] hepato 2 0 hepato 0 hepato 0 NA 0 hepato 0 hepato NA
hepato heapto_cat3_1 cat cat tester1; tester2 [hepato] hepato 2 1 hepato 1 hepato 1 NA 1 hepato 1 hepato NA
hepato heapto_cat3_NA::a cat cat tester1; tester2 [hepato] hepato 2 NA::b missing missing NA else missing hepato NA
copper NA cont cont tester1; tester2 [copper] copper NA NA::a missing missing NA 9999 NA copper NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA copy NA NA NA [0,1000] NA platelet NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA NA::b missing missing NA else NA platelet NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA NA::a not applicable not applicable NA 9999 NA platelet NA
protime NA cont cont tester1; tester2 [protime] protime NA copy NA NA NA [5, 30] NA protime NA
protime NA cont cont tester1; tester2 [protime] protime NA NA::b missing missing NA else NA protime NA
hepato heapto_cat3_NA::b cat cat tester1; tester2 [hepato] hepato 2 NA::a not applicable not applicable NA 9 not applicable hepato NA
sex sex_cat2_1 cat cat tester1; tester2 [sex] sex 2 m sex m sex m NA m sex m sex NA
sex sex_cat2_2 cat cat tester1; tester2 [sex] sex 2 f sex f sex f NA f sex f sex NA
sex sex_cat2_NA::b cat cat tester1; tester2 [sex] sex 2 NA::b missing missing NA else sex m sex NA
sex sex_cat2_NA::a cat cat tester1; tester2 [sex] sex 2 NA::a not applicable not applicable NA 9 sex m sex NA
spiders spiders0 cat cat tester1; tester2 [spiders] spiders 2 0 spiders 0 spiders 0 NA 0 spiders 0 spiders NA
spiders spiders1 cat cat tester1; tester2 [spiders] spiders 2 1 spiders 1 spiders 1 NA 1 spiders 1 spiders NA
spiders spiders_NA::b cat cat tester1; tester2 [spiders] spiders 2 NA::b missing missing NA else spiders 0 spiders NA
spiders spiders_NA::a cat cat tester1; tester2 [spiders] spiders 2 NA::a not applicable not applicable NA 9 not applicable spiders NA
stage stage1 cat cat tester1; tester2 [stage] stage 4 1 stage 1 stage 1 NA 1 stage 1 stage NA
stage stage2 cat cat tester1; tester2 [stage] stage 4 2 stage 2 stage 2 NA 2 stage 2 stage NA
stage stage3 cat cat tester1; tester2 [stage] stage 4 3 stage 3 stage 3 NA 3 stage 3 stage NA
stage stage4 cat cat tester1; tester2 [stage] stage 4 4 stage 4 stage 4 NA 4 stage 4 stage NA
stage stage_NA::b cat cat tester1; tester2 [stage] stage 4 NA::b missing missing NA else missing stage NA
stage stage_NA::a cat cat tester1; tester2 [stage] stage 4 NA::a not applicable not applicable NA 9 not applicable stage NA
status status0 cat cat tester1; tester2 [status] status 3 0 status 0 status 0 NA 0 status 0 status NA
status status1 cat cat tester1; tester2 [status] status 3 1 status 1 status 1 NA 1 status 1 status NA
status status2 cat cat tester1; tester2 [status] status 3 2 status 2 status 2 NA 2 status 2 status NA
status status_NA::b cat cat tester1; tester2 [status] status 3 NA::b missing missing NA else status 0 status NA
protime NA cont cont tester1; tester2 [protime] protime NA NA::a not applicable not applicable NA 99 NA protime NA
time NA cont cont tester1; tester2 [time] time NA copy NA NA NA [0,5000] NA time NA
time NA cont cont tester1; tester2 [time] time NA NA::b missing missing NA else NA time NA
time NA cont cont tester1; tester2 [time] time NA NA::a not applicable not applicable NA 9999 NA time NA
trig NA cont cont tester1; tester2 [trig] trig NA copy NA NA NA [0,1000] NA trig NA
trig NA cont cont tester1; tester2 [trig] trig NA NA::b missing missing NA else NA trig NA
status status_NA::a cat cat tester1; tester2 [status] status 3 NA::a not applicable not applicable NA 9 not applicable status NA
trt trt1 cat cat tester1; tester2 [trt] trt 2 1 trt 1 trt 1 NA 1 trt 1 trt NA
trt trt2 cat cat tester1; tester2 [trt] trt 2 2 trt 2 trt 2 NA 2 trt 2 trt NA
trt trt_NA::b cat cat tester1; tester2 [trt] trt 2 NA::b missing missing NA else trt 1 trt NA
trt trt_NA::a cat cat tester1; tester2 [trt] trt 2 NA::a not applicable not applicable NA 9 not applicable trt NA
trig NA cont cont tester1; tester2 [trig] trig NA NA::a missing missing NA 9999 NA trig NA
example_der NA cont cont tester1; tester2 DerivedVar::[chol, bili] example_der NA Func::example_der_fun N/A N/A NA else N/A example_der A test derived variable
agegrp10 agegrp10_cat6_1 cat cat tester2 tester2::agegrp grouped age 6 1 20-29 20-29 years 1 20-29 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester2 tester2::agegrp grouped age 6 2 30-39 30-39 years 2 30-39 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester2 tester2::agegrp grouped age 6 3 40-49 40-49 years 3 40-49 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester2 tester2::agegrp grouped age 6 4 50-59 50-59 years 4 50-59 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester2 tester2::agegrp grouped age 6 5 60-69 60-69 years 5 60-69 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester2 tester2::agegrp grouped age 6 6 70-79 70-79 years 6 70-79 grouped age NA
agegrp10 agegrp10_cat6_NA::b cat cat tester2 tester2::agegrp grouped age 6 NA::b missing missing years else missing grouped age NA
agegrp5 agegrp5_cat11_1 cat cat tester1 tester1::agegrp grouped age 11 1 25-29 25-29 years 1 20-29 grouped age NA
agegrp5 agegrp5_cat11_2 cat cat tester1 tester1::agegrp grouped age 11 2 30-34 30-34 years 2 30-39 grouped age NA
agegrp5 agegrp5_cat11_3 cat cat tester1 tester1::agegrp grouped age 11 3 35-39 35-39 years 3 30-39 grouped age NA
agegrp5 agegrp5_cat11_4 cat cat tester1 tester1::agegrp grouped age 11 4 40-44 40-44 years 4 40-49 grouped age NA
agegrp5 agegrp5_cat11_5 cat cat tester1 tester1::agegrp grouped age 11 5 45-49 45-49 years 5 40-49 grouped age NA
agegrp5 agegrp5_cat11_6 cat cat tester1 tester1::agegrp grouped age 11 6 50-54 50-54 years 6 50-59 grouped age NA
agegrp5 agegrp5_cat11_7 cat cat tester1 tester1::agegrp grouped age 11 7 55-59 55-59 years 7 50-59 grouped age NA
agegrp5 agegrp5_cat11_8 cat cat tester1 tester1::agegrp grouped age 11 8 60-64 60-64 years 8 60-69 grouped age NA
agegrp5 agegrp5_cat11_9 cat cat tester1 tester1::agegrp grouped age 11 9 65-69 65-69 years 9 60-69 grouped age NA
agegrp5 agegrp5_cat11_10 cat cat tester1 tester1::agegrp grouped age 11 10 70-74 70-74 years 10 70-79 grouped age NA
agegrp5 agegrp5_cat11_11 cat cat tester1 tester1::agegrp grouped age 11 11 75-79 75-79 years 11 70-79 grouped age NA
agegrp5 agegrp5_cat11_NA::b cat cat tester1 tester1::agegrp grouped age 11 Na::b missing missing years else missing grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 27 NA NA years 1 20-29 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 32 NA NA years 2 30-39 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 37 NA NA years 3 30-39 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 42 NA NA years 4 40-49 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 47 NA NA years 5 40-49 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 52 NA NA years 6 50-59 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 57 NA NA years 7 50-59 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 62 NA NA years 8 60-69 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 67 NA NA years 9 60-69 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 72 NA NA years 10 70-79 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 77 NA NA years 11 70-79 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA NA::b NA NA years else missing grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 25 NA NA years 1 20-29 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 35 NA NA years 2 30-39 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 45 NA NA years 3 40-49 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 55 NA NA years 4 50-59 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 65 NA NA years 5 60-69 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 75 NA NA years 6 70-79 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age 6 NA::b NA NA years else missing grouped age NA
agegrp10 agegrp10_cat6_1 cat cat tester1 tester1::agegrp grouped age 6 1 20-29 20-29 years 1 20-29 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester1 tester1::agegrp grouped age 6 2 30-39 30-39 years 2 30-39 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester1 tester1::agegrp grouped age 6 2 30-39 30-39 years 3 30-39 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester1 tester1::agegrp grouped age 6 3 40-49 40-49 years 4 40-49 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester1 tester1::agegrp grouped age 6 3 40-49 40-49 years 5 40-49 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester1 tester1::agegrp grouped age 6 4 50-59 50-59 years 6 50-59 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester1 tester1::agegrp grouped age 6 4 50-59 50-59 years 7 50-59 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester1 tester1::agegrp grouped age 6 5 60-69 60-69 years 8 60-69 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester1 tester1::agegrp grouped age 6 5 60-69 60-69 years 9 60-69 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester1 tester1::agegrp grouped age 6 6 70-79 70-79 years 10 70-79 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester1 tester1::agegrp grouped age 6 6 70-79 70-79 years 11 70-79 grouped age NA
agegrp10 agegrp10_cat6_NA::b cat cat tester1 tester1::agegrp grouped age 6 NA::b missing missing years else missing grouped age NA
  1. variableStart: indicates the original variable name(s) in the database(s). In our example, both datasets have the start variable stage. Therefore we can indicate a single variable name here. If the variable names were different, we would need to indicate ‘dataset_name::variable_name’ separated by commas for each of the datasets.

Write the variable name in squared brackets once per row, for all six rows.

variable dummyVariable typeEnd typeStart databaseStart variableStart variableStartLabel numValidCat recEnd catLabel catLabelLong units recStart catStartLabel variableStartShortLabel notes
age NA cont cont tester1; tester2 [age] age NA copy NA NA NA [20,80] NA age NA
age NA cont cont tester1; tester2 [age] age NA NA::b missing missing NA else NA age NA
age NA cont cont tester1; tester2 [age] age NA NA::a not applicable not applicable NA 999 NA age NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA copy NA NA NA [1,5] NA albumin NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA NA::b missing missing NA else NA albumin NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA NA::a not applicable not applicable NA 99 NA albumin NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA copy NA NA NA [200,15000] NA alk.phos NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA NA::b missing missing NA else NA alk.phos NA
ascites ascites_cat3_1 cat cat tester1; tester2 [ascites] ascites 2 0 ascites 0 ascites 0 NA 0 ascites 0 ascites NA
ascites ascites_cat3_2 cat cat tester1; tester2 [ascites] ascites 2 1 ascites 1 ascites 1 NA 1 ascites 1 ascites NA
ascites ascites_cat3_NA::b cat cat tester1; tester2 [ascites] ascites 2 NA::b missing missing NA else ascites 0 ascites NA
ascites ascites_cat3_NA::a cat cat tester1; tester2 [ascites] ascites 2 NA::a not applicable not applicable NA 9 not applicable NA NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA NA::a not applicable not applicable NA 99999 NA alk.phos NA
ast NA cont cont tester1; tester2 [ast] ast NA copy NA NA NA [20,500] NA ast NA
ast NA cont cont tester1; tester2 [ast] ast NA NA::b missing missing NA else NA ast NA
ast NA cont cont tester1; tester2 [ast] ast NA NA::a not applicable not applicable NA 9999 NA ast NA
bili NA cont cont tester1; tester2 [bili] bili NA copy NA NA NA [0,100] NA bili NA
bili NA cont cont tester1; tester2 [bili] bili NA NA::b missing missing NA else NA bili NA
chol NA cont cont tester1; tester2 [chol] chol NA copy NA NA NA [100,2000] NA chol NA
chol NA cont cont tester1; tester2 [chol] chol NA NA::b missing missing NA else NA chol NA
chol NA cont cont tester1; tester2 [chol] chol NA NA::a missing missing NA 9999 NA chol NA
copper NA cont cont tester1; tester2 [copper] copper NA copy NA NA NA [0,1000] NA copper NA
copper NA cont cont tester1; tester2 [copper] copper NA NA::b missing missing NA else NA copper NA
edema edema_cat3_1 cat cat tester1; tester2 [edema] edema 3 0 edema 0.0 edema 0.0 NA 0 edema 0.0 edema NA
edema edema_cat3_2 cat cat tester1; tester2 [edema] edema 3 0.5 edema 0.5 edema 0.5 NA 0.5 edema 0.5 edema NA
edema edema_cat3_3 cat cat tester1; tester2 [edema] edema 3 1 edema 1.0 edema 1.0 NA 1 edema 1.0 edema NA
edema edema_cat3_NA::b cat cat tester1; tester2 [edema] edema 3 NA::b missing missing NA else missing edema NA
edema edema_cat3_NA::a cat cat tester1; tester2 [edema] edema 3 NA::a not applicable not applicable NA 9 not applicable edema NA
hepato heapto_cat3_1 cat cat tester1; tester2 [hepato] hepato 2 0 hepato 0 hepato 0 NA 0 hepato 0 hepato NA
hepato heapto_cat3_1 cat cat tester1; tester2 [hepato] hepato 2 1 hepato 1 hepato 1 NA 1 hepato 1 hepato NA
hepato heapto_cat3_NA::a cat cat tester1; tester2 [hepato] hepato 2 NA::b missing missing NA else missing hepato NA
copper NA cont cont tester1; tester2 [copper] copper NA NA::a missing missing NA 9999 NA copper NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA copy NA NA NA [0,1000] NA platelet NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA NA::b missing missing NA else NA platelet NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA NA::a not applicable not applicable NA 9999 NA platelet NA
protime NA cont cont tester1; tester2 [protime] protime NA copy NA NA NA [5, 30] NA protime NA
protime NA cont cont tester1; tester2 [protime] protime NA NA::b missing missing NA else NA protime NA
hepato heapto_cat3_NA::b cat cat tester1; tester2 [hepato] hepato 2 NA::a not applicable not applicable NA 9 not applicable hepato NA
sex sex_cat2_1 cat cat tester1; tester2 [sex] sex 2 m sex m sex m NA m sex m sex NA
sex sex_cat2_2 cat cat tester1; tester2 [sex] sex 2 f sex f sex f NA f sex f sex NA
sex sex_cat2_NA::b cat cat tester1; tester2 [sex] sex 2 NA::b missing missing NA else sex m sex NA
sex sex_cat2_NA::a cat cat tester1; tester2 [sex] sex 2 NA::a not applicable not applicable NA 9 sex m sex NA
spiders spiders0 cat cat tester1; tester2 [spiders] spiders 2 0 spiders 0 spiders 0 NA 0 spiders 0 spiders NA
spiders spiders1 cat cat tester1; tester2 [spiders] spiders 2 1 spiders 1 spiders 1 NA 1 spiders 1 spiders NA
spiders spiders_NA::b cat cat tester1; tester2 [spiders] spiders 2 NA::b missing missing NA else spiders 0 spiders NA
spiders spiders_NA::a cat cat tester1; tester2 [spiders] spiders 2 NA::a not applicable not applicable NA 9 not applicable spiders NA
stage stage1 cat cat tester1; tester2 [stage] stage 4 1 stage 1 stage 1 NA 1 stage 1 stage NA
stage stage2 cat cat tester1; tester2 [stage] stage 4 2 stage 2 stage 2 NA 2 stage 2 stage NA
stage stage3 cat cat tester1; tester2 [stage] stage 4 3 stage 3 stage 3 NA 3 stage 3 stage NA
stage stage4 cat cat tester1; tester2 [stage] stage 4 4 stage 4 stage 4 NA 4 stage 4 stage NA
stage stage_NA::b cat cat tester1; tester2 [stage] stage 4 NA::b missing missing NA else missing stage NA
stage stage_NA::a cat cat tester1; tester2 [stage] stage 4 NA::a not applicable not applicable NA 9 not applicable stage NA
status status0 cat cat tester1; tester2 [status] status 3 0 status 0 status 0 NA 0 status 0 status NA
status status1 cat cat tester1; tester2 [status] status 3 1 status 1 status 1 NA 1 status 1 status NA
status status2 cat cat tester1; tester2 [status] status 3 2 status 2 status 2 NA 2 status 2 status NA
status status_NA::b cat cat tester1; tester2 [status] status 3 NA::b missing missing NA else status 0 status NA
protime NA cont cont tester1; tester2 [protime] protime NA NA::a not applicable not applicable NA 99 NA protime NA
time NA cont cont tester1; tester2 [time] time NA copy NA NA NA [0,5000] NA time NA
time NA cont cont tester1; tester2 [time] time NA NA::b missing missing NA else NA time NA
time NA cont cont tester1; tester2 [time] time NA NA::a not applicable not applicable NA 9999 NA time NA
trig NA cont cont tester1; tester2 [trig] trig NA copy NA NA NA [0,1000] NA trig NA
trig NA cont cont tester1; tester2 [trig] trig NA NA::b missing missing NA else NA trig NA
status status_NA::a cat cat tester1; tester2 [status] status 3 NA::a not applicable not applicable NA 9 not applicable status NA
trt trt1 cat cat tester1; tester2 [trt] trt 2 1 trt 1 trt 1 NA 1 trt 1 trt NA
trt trt2 cat cat tester1; tester2 [trt] trt 2 2 trt 2 trt 2 NA 2 trt 2 trt NA
trt trt_NA::b cat cat tester1; tester2 [trt] trt 2 NA::b missing missing NA else trt 1 trt NA
trt trt_NA::a cat cat tester1; tester2 [trt] trt 2 NA::a not applicable not applicable NA 9 not applicable trt NA
trig NA cont cont tester1; tester2 [trig] trig NA NA::a missing missing NA 9999 NA trig NA
example_der NA cont cont tester1; tester2 DerivedVar::[chol, bili] example_der NA Func::example_der_fun N/A N/A NA else N/A example_der A test derived variable
agegrp10 agegrp10_cat6_1 cat cat tester2 tester2::agegrp grouped age 6 1 20-29 20-29 years 1 20-29 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester2 tester2::agegrp grouped age 6 2 30-39 30-39 years 2 30-39 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester2 tester2::agegrp grouped age 6 3 40-49 40-49 years 3 40-49 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester2 tester2::agegrp grouped age 6 4 50-59 50-59 years 4 50-59 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester2 tester2::agegrp grouped age 6 5 60-69 60-69 years 5 60-69 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester2 tester2::agegrp grouped age 6 6 70-79 70-79 years 6 70-79 grouped age NA
agegrp10 agegrp10_cat6_NA::b cat cat tester2 tester2::agegrp grouped age 6 NA::b missing missing years else missing grouped age NA
agegrp5 agegrp5_cat11_1 cat cat tester1 tester1::agegrp grouped age 11 1 25-29 25-29 years 1 20-29 grouped age NA
agegrp5 agegrp5_cat11_2 cat cat tester1 tester1::agegrp grouped age 11 2 30-34 30-34 years 2 30-39 grouped age NA
agegrp5 agegrp5_cat11_3 cat cat tester1 tester1::agegrp grouped age 11 3 35-39 35-39 years 3 30-39 grouped age NA
agegrp5 agegrp5_cat11_4 cat cat tester1 tester1::agegrp grouped age 11 4 40-44 40-44 years 4 40-49 grouped age NA
agegrp5 agegrp5_cat11_5 cat cat tester1 tester1::agegrp grouped age 11 5 45-49 45-49 years 5 40-49 grouped age NA
agegrp5 agegrp5_cat11_6 cat cat tester1 tester1::agegrp grouped age 11 6 50-54 50-54 years 6 50-59 grouped age NA
agegrp5 agegrp5_cat11_7 cat cat tester1 tester1::agegrp grouped age 11 7 55-59 55-59 years 7 50-59 grouped age NA
agegrp5 agegrp5_cat11_8 cat cat tester1 tester1::agegrp grouped age 11 8 60-64 60-64 years 8 60-69 grouped age NA
agegrp5 agegrp5_cat11_9 cat cat tester1 tester1::agegrp grouped age 11 9 65-69 65-69 years 9 60-69 grouped age NA
agegrp5 agegrp5_cat11_10 cat cat tester1 tester1::agegrp grouped age 11 10 70-74 70-74 years 10 70-79 grouped age NA
agegrp5 agegrp5_cat11_11 cat cat tester1 tester1::agegrp grouped age 11 11 75-79 75-79 years 11 70-79 grouped age NA
agegrp5 agegrp5_cat11_NA::b cat cat tester1 tester1::agegrp grouped age 11 Na::b missing missing years else missing grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 27 NA NA years 1 20-29 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 32 NA NA years 2 30-39 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 37 NA NA years 3 30-39 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 42 NA NA years 4 40-49 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 47 NA NA years 5 40-49 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 52 NA NA years 6 50-59 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 57 NA NA years 7 50-59 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 62 NA NA years 8 60-69 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 67 NA NA years 9 60-69 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 72 NA NA years 10 70-79 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 77 NA NA years 11 70-79 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA NA::b NA NA years else missing grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 25 NA NA years 1 20-29 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 35 NA NA years 2 30-39 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 45 NA NA years 3 40-49 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 55 NA NA years 4 50-59 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 65 NA NA years 5 60-69 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 75 NA NA years 6 70-79 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age 6 NA::b NA NA years else missing grouped age NA
agegrp10 agegrp10_cat6_1 cat cat tester1 tester1::agegrp grouped age 6 1 20-29 20-29 years 1 20-29 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester1 tester1::agegrp grouped age 6 2 30-39 30-39 years 2 30-39 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester1 tester1::agegrp grouped age 6 2 30-39 30-39 years 3 30-39 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester1 tester1::agegrp grouped age 6 3 40-49 40-49 years 4 40-49 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester1 tester1::agegrp grouped age 6 3 40-49 40-49 years 5 40-49 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester1 tester1::agegrp grouped age 6 4 50-59 50-59 years 6 50-59 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester1 tester1::agegrp grouped age 6 4 50-59 50-59 years 7 50-59 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester1 tester1::agegrp grouped age 6 5 60-69 60-69 years 8 60-69 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester1 tester1::agegrp grouped age 6 5 60-69 60-69 years 9 60-69 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester1 tester1::agegrp grouped age 6 6 70-79 70-79 years 10 70-79 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester1 tester1::agegrp grouped age 6 6 70-79 70-79 years 11 70-79 grouped age NA
agegrp10 agegrp10_cat6_NA::b cat cat tester1 tester1::agegrp grouped age 6 NA::b missing missing years else missing grouped age NA
  1. variableStartLabel: indicates the original variable lable

Write “stage” in the 6 rows.

variable dummyVariable typeEnd typeStart databaseStart variableStart variableStartLabel numValidCat recEnd catLabel catLabelLong units recStart catStartLabel variableStartShortLabel notes
age NA cont cont tester1; tester2 [age] age NA copy NA NA NA [20,80] NA age NA
age NA cont cont tester1; tester2 [age] age NA NA::b missing missing NA else NA age NA
age NA cont cont tester1; tester2 [age] age NA NA::a not applicable not applicable NA 999 NA age NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA copy NA NA NA [1,5] NA albumin NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA NA::b missing missing NA else NA albumin NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA NA::a not applicable not applicable NA 99 NA albumin NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA copy NA NA NA [200,15000] NA alk.phos NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA NA::b missing missing NA else NA alk.phos NA
ascites ascites_cat3_1 cat cat tester1; tester2 [ascites] ascites 2 0 ascites 0 ascites 0 NA 0 ascites 0 ascites NA
ascites ascites_cat3_2 cat cat tester1; tester2 [ascites] ascites 2 1 ascites 1 ascites 1 NA 1 ascites 1 ascites NA
ascites ascites_cat3_NA::b cat cat tester1; tester2 [ascites] ascites 2 NA::b missing missing NA else ascites 0 ascites NA
ascites ascites_cat3_NA::a cat cat tester1; tester2 [ascites] ascites 2 NA::a not applicable not applicable NA 9 not applicable NA NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA NA::a not applicable not applicable NA 99999 NA alk.phos NA
ast NA cont cont tester1; tester2 [ast] ast NA copy NA NA NA [20,500] NA ast NA
ast NA cont cont tester1; tester2 [ast] ast NA NA::b missing missing NA else NA ast NA
ast NA cont cont tester1; tester2 [ast] ast NA NA::a not applicable not applicable NA 9999 NA ast NA
bili NA cont cont tester1; tester2 [bili] bili NA copy NA NA NA [0,100] NA bili NA
bili NA cont cont tester1; tester2 [bili] bili NA NA::b missing missing NA else NA bili NA
chol NA cont cont tester1; tester2 [chol] chol NA copy NA NA NA [100,2000] NA chol NA
chol NA cont cont tester1; tester2 [chol] chol NA NA::b missing missing NA else NA chol NA
chol NA cont cont tester1; tester2 [chol] chol NA NA::a missing missing NA 9999 NA chol NA
copper NA cont cont tester1; tester2 [copper] copper NA copy NA NA NA [0,1000] NA copper NA
copper NA cont cont tester1; tester2 [copper] copper NA NA::b missing missing NA else NA copper NA
edema edema_cat3_1 cat cat tester1; tester2 [edema] edema 3 0 edema 0.0 edema 0.0 NA 0 edema 0.0 edema NA
edema edema_cat3_2 cat cat tester1; tester2 [edema] edema 3 0.5 edema 0.5 edema 0.5 NA 0.5 edema 0.5 edema NA
edema edema_cat3_3 cat cat tester1; tester2 [edema] edema 3 1 edema 1.0 edema 1.0 NA 1 edema 1.0 edema NA
edema edema_cat3_NA::b cat cat tester1; tester2 [edema] edema 3 NA::b missing missing NA else missing edema NA
edema edema_cat3_NA::a cat cat tester1; tester2 [edema] edema 3 NA::a not applicable not applicable NA 9 not applicable edema NA
hepato heapto_cat3_1 cat cat tester1; tester2 [hepato] hepato 2 0 hepato 0 hepato 0 NA 0 hepato 0 hepato NA
hepato heapto_cat3_1 cat cat tester1; tester2 [hepato] hepato 2 1 hepato 1 hepato 1 NA 1 hepato 1 hepato NA
hepato heapto_cat3_NA::a cat cat tester1; tester2 [hepato] hepato 2 NA::b missing missing NA else missing hepato NA
copper NA cont cont tester1; tester2 [copper] copper NA NA::a missing missing NA 9999 NA copper NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA copy NA NA NA [0,1000] NA platelet NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA NA::b missing missing NA else NA platelet NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA NA::a not applicable not applicable NA 9999 NA platelet NA
protime NA cont cont tester1; tester2 [protime] protime NA copy NA NA NA [5, 30] NA protime NA
protime NA cont cont tester1; tester2 [protime] protime NA NA::b missing missing NA else NA protime NA
hepato heapto_cat3_NA::b cat cat tester1; tester2 [hepato] hepato 2 NA::a not applicable not applicable NA 9 not applicable hepato NA
sex sex_cat2_1 cat cat tester1; tester2 [sex] sex 2 m sex m sex m NA m sex m sex NA
sex sex_cat2_2 cat cat tester1; tester2 [sex] sex 2 f sex f sex f NA f sex f sex NA
sex sex_cat2_NA::b cat cat tester1; tester2 [sex] sex 2 NA::b missing missing NA else sex m sex NA
sex sex_cat2_NA::a cat cat tester1; tester2 [sex] sex 2 NA::a not applicable not applicable NA 9 sex m sex NA
spiders spiders0 cat cat tester1; tester2 [spiders] spiders 2 0 spiders 0 spiders 0 NA 0 spiders 0 spiders NA
spiders spiders1 cat cat tester1; tester2 [spiders] spiders 2 1 spiders 1 spiders 1 NA 1 spiders 1 spiders NA
spiders spiders_NA::b cat cat tester1; tester2 [spiders] spiders 2 NA::b missing missing NA else spiders 0 spiders NA
spiders spiders_NA::a cat cat tester1; tester2 [spiders] spiders 2 NA::a not applicable not applicable NA 9 not applicable spiders NA
stage stage1 cat cat tester1; tester2 [stage] stage 4 1 stage 1 stage 1 NA 1 stage 1 stage NA
stage stage2 cat cat tester1; tester2 [stage] stage 4 2 stage 2 stage 2 NA 2 stage 2 stage NA
stage stage3 cat cat tester1; tester2 [stage] stage 4 3 stage 3 stage 3 NA 3 stage 3 stage NA
stage stage4 cat cat tester1; tester2 [stage] stage 4 4 stage 4 stage 4 NA 4 stage 4 stage NA
stage stage_NA::b cat cat tester1; tester2 [stage] stage 4 NA::b missing missing NA else missing stage NA
stage stage_NA::a cat cat tester1; tester2 [stage] stage 4 NA::a not applicable not applicable NA 9 not applicable stage NA
status status0 cat cat tester1; tester2 [status] status 3 0 status 0 status 0 NA 0 status 0 status NA
status status1 cat cat tester1; tester2 [status] status 3 1 status 1 status 1 NA 1 status 1 status NA
status status2 cat cat tester1; tester2 [status] status 3 2 status 2 status 2 NA 2 status 2 status NA
status status_NA::b cat cat tester1; tester2 [status] status 3 NA::b missing missing NA else status 0 status NA
protime NA cont cont tester1; tester2 [protime] protime NA NA::a not applicable not applicable NA 99 NA protime NA
time NA cont cont tester1; tester2 [time] time NA copy NA NA NA [0,5000] NA time NA
time NA cont cont tester1; tester2 [time] time NA NA::b missing missing NA else NA time NA
time NA cont cont tester1; tester2 [time] time NA NA::a not applicable not applicable NA 9999 NA time NA
trig NA cont cont tester1; tester2 [trig] trig NA copy NA NA NA [0,1000] NA trig NA
trig NA cont cont tester1; tester2 [trig] trig NA NA::b missing missing NA else NA trig NA
status status_NA::a cat cat tester1; tester2 [status] status 3 NA::a not applicable not applicable NA 9 not applicable status NA
trt trt1 cat cat tester1; tester2 [trt] trt 2 1 trt 1 trt 1 NA 1 trt 1 trt NA
trt trt2 cat cat tester1; tester2 [trt] trt 2 2 trt 2 trt 2 NA 2 trt 2 trt NA
trt trt_NA::b cat cat tester1; tester2 [trt] trt 2 NA::b missing missing NA else trt 1 trt NA
trt trt_NA::a cat cat tester1; tester2 [trt] trt 2 NA::a not applicable not applicable NA 9 not applicable trt NA
trig NA cont cont tester1; tester2 [trig] trig NA NA::a missing missing NA 9999 NA trig NA
example_der NA cont cont tester1; tester2 DerivedVar::[chol, bili] example_der NA Func::example_der_fun N/A N/A NA else N/A example_der A test derived variable
agegrp10 agegrp10_cat6_1 cat cat tester2 tester2::agegrp grouped age 6 1 20-29 20-29 years 1 20-29 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester2 tester2::agegrp grouped age 6 2 30-39 30-39 years 2 30-39 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester2 tester2::agegrp grouped age 6 3 40-49 40-49 years 3 40-49 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester2 tester2::agegrp grouped age 6 4 50-59 50-59 years 4 50-59 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester2 tester2::agegrp grouped age 6 5 60-69 60-69 years 5 60-69 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester2 tester2::agegrp grouped age 6 6 70-79 70-79 years 6 70-79 grouped age NA
agegrp10 agegrp10_cat6_NA::b cat cat tester2 tester2::agegrp grouped age 6 NA::b missing missing years else missing grouped age NA
agegrp5 agegrp5_cat11_1 cat cat tester1 tester1::agegrp grouped age 11 1 25-29 25-29 years 1 20-29 grouped age NA
agegrp5 agegrp5_cat11_2 cat cat tester1 tester1::agegrp grouped age 11 2 30-34 30-34 years 2 30-39 grouped age NA
agegrp5 agegrp5_cat11_3 cat cat tester1 tester1::agegrp grouped age 11 3 35-39 35-39 years 3 30-39 grouped age NA
agegrp5 agegrp5_cat11_4 cat cat tester1 tester1::agegrp grouped age 11 4 40-44 40-44 years 4 40-49 grouped age NA
agegrp5 agegrp5_cat11_5 cat cat tester1 tester1::agegrp grouped age 11 5 45-49 45-49 years 5 40-49 grouped age NA
agegrp5 agegrp5_cat11_6 cat cat tester1 tester1::agegrp grouped age 11 6 50-54 50-54 years 6 50-59 grouped age NA
agegrp5 agegrp5_cat11_7 cat cat tester1 tester1::agegrp grouped age 11 7 55-59 55-59 years 7 50-59 grouped age NA
agegrp5 agegrp5_cat11_8 cat cat tester1 tester1::agegrp grouped age 11 8 60-64 60-64 years 8 60-69 grouped age NA
agegrp5 agegrp5_cat11_9 cat cat tester1 tester1::agegrp grouped age 11 9 65-69 65-69 years 9 60-69 grouped age NA
agegrp5 agegrp5_cat11_10 cat cat tester1 tester1::agegrp grouped age 11 10 70-74 70-74 years 10 70-79 grouped age NA
agegrp5 agegrp5_cat11_11 cat cat tester1 tester1::agegrp grouped age 11 11 75-79 75-79 years 11 70-79 grouped age NA
agegrp5 agegrp5_cat11_NA::b cat cat tester1 tester1::agegrp grouped age 11 Na::b missing missing years else missing grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 27 NA NA years 1 20-29 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 32 NA NA years 2 30-39 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 37 NA NA years 3 30-39 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 42 NA NA years 4 40-49 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 47 NA NA years 5 40-49 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 52 NA NA years 6 50-59 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 57 NA NA years 7 50-59 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 62 NA NA years 8 60-69 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 67 NA NA years 9 60-69 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 72 NA NA years 10 70-79 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 77 NA NA years 11 70-79 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA NA::b NA NA years else missing grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 25 NA NA years 1 20-29 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 35 NA NA years 2 30-39 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 45 NA NA years 3 40-49 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 55 NA NA years 4 50-59 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 65 NA NA years 5 60-69 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 75 NA NA years 6 70-79 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age 6 NA::b NA NA years else missing grouped age NA
agegrp10 agegrp10_cat6_1 cat cat tester1 tester1::agegrp grouped age 6 1 20-29 20-29 years 1 20-29 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester1 tester1::agegrp grouped age 6 2 30-39 30-39 years 2 30-39 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester1 tester1::agegrp grouped age 6 2 30-39 30-39 years 3 30-39 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester1 tester1::agegrp grouped age 6 3 40-49 40-49 years 4 40-49 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester1 tester1::agegrp grouped age 6 3 40-49 40-49 years 5 40-49 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester1 tester1::agegrp grouped age 6 4 50-59 50-59 years 6 50-59 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester1 tester1::agegrp grouped age 6 4 50-59 50-59 years 7 50-59 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester1 tester1::agegrp grouped age 6 5 60-69 60-69 years 8 60-69 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester1 tester1::agegrp grouped age 6 5 60-69 60-69 years 9 60-69 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester1 tester1::agegrp grouped age 6 6 70-79 70-79 years 10 70-79 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester1 tester1::agegrp grouped age 6 6 70-79 70-79 years 11 70-79 grouped age NA
agegrp10 agegrp10_cat6_NA::b cat cat tester1 tester1::agegrp grouped age 6 NA::b missing missing years else missing grouped age NA
  1. numValidCat: indicates the number of valid categories for the final derived variable. In our example, there are four categories for stage: 1, 2, 3, and 4. Note that the categories ‘not applicable’, ‘missing’, and ‘else’ are not included in the category count.

Write 4 in each of the six rows.

variable dummyVariable typeEnd typeStart databaseStart variableStart variableStartLabel numValidCat recEnd catLabel catLabelLong units recStart catStartLabel variableStartShortLabel notes
age NA cont cont tester1; tester2 [age] age NA copy NA NA NA [20,80] NA age NA
age NA cont cont tester1; tester2 [age] age NA NA::b missing missing NA else NA age NA
age NA cont cont tester1; tester2 [age] age NA NA::a not applicable not applicable NA 999 NA age NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA copy NA NA NA [1,5] NA albumin NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA NA::b missing missing NA else NA albumin NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA NA::a not applicable not applicable NA 99 NA albumin NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA copy NA NA NA [200,15000] NA alk.phos NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA NA::b missing missing NA else NA alk.phos NA
ascites ascites_cat3_1 cat cat tester1; tester2 [ascites] ascites 2 0 ascites 0 ascites 0 NA 0 ascites 0 ascites NA
ascites ascites_cat3_2 cat cat tester1; tester2 [ascites] ascites 2 1 ascites 1 ascites 1 NA 1 ascites 1 ascites NA
ascites ascites_cat3_NA::b cat cat tester1; tester2 [ascites] ascites 2 NA::b missing missing NA else ascites 0 ascites NA
ascites ascites_cat3_NA::a cat cat tester1; tester2 [ascites] ascites 2 NA::a not applicable not applicable NA 9 not applicable NA NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA NA::a not applicable not applicable NA 99999 NA alk.phos NA
ast NA cont cont tester1; tester2 [ast] ast NA copy NA NA NA [20,500] NA ast NA
ast NA cont cont tester1; tester2 [ast] ast NA NA::b missing missing NA else NA ast NA
ast NA cont cont tester1; tester2 [ast] ast NA NA::a not applicable not applicable NA 9999 NA ast NA
bili NA cont cont tester1; tester2 [bili] bili NA copy NA NA NA [0,100] NA bili NA
bili NA cont cont tester1; tester2 [bili] bili NA NA::b missing missing NA else NA bili NA
chol NA cont cont tester1; tester2 [chol] chol NA copy NA NA NA [100,2000] NA chol NA
chol NA cont cont tester1; tester2 [chol] chol NA NA::b missing missing NA else NA chol NA
chol NA cont cont tester1; tester2 [chol] chol NA NA::a missing missing NA 9999 NA chol NA
copper NA cont cont tester1; tester2 [copper] copper NA copy NA NA NA [0,1000] NA copper NA
copper NA cont cont tester1; tester2 [copper] copper NA NA::b missing missing NA else NA copper NA
edema edema_cat3_1 cat cat tester1; tester2 [edema] edema 3 0 edema 0.0 edema 0.0 NA 0 edema 0.0 edema NA
edema edema_cat3_2 cat cat tester1; tester2 [edema] edema 3 0.5 edema 0.5 edema 0.5 NA 0.5 edema 0.5 edema NA
edema edema_cat3_3 cat cat tester1; tester2 [edema] edema 3 1 edema 1.0 edema 1.0 NA 1 edema 1.0 edema NA
edema edema_cat3_NA::b cat cat tester1; tester2 [edema] edema 3 NA::b missing missing NA else missing edema NA
edema edema_cat3_NA::a cat cat tester1; tester2 [edema] edema 3 NA::a not applicable not applicable NA 9 not applicable edema NA
hepato heapto_cat3_1 cat cat tester1; tester2 [hepato] hepato 2 0 hepato 0 hepato 0 NA 0 hepato 0 hepato NA
hepato heapto_cat3_1 cat cat tester1; tester2 [hepato] hepato 2 1 hepato 1 hepato 1 NA 1 hepato 1 hepato NA
hepato heapto_cat3_NA::a cat cat tester1; tester2 [hepato] hepato 2 NA::b missing missing NA else missing hepato NA
copper NA cont cont tester1; tester2 [copper] copper NA NA::a missing missing NA 9999 NA copper NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA copy NA NA NA [0,1000] NA platelet NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA NA::b missing missing NA else NA platelet NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA NA::a not applicable not applicable NA 9999 NA platelet NA
protime NA cont cont tester1; tester2 [protime] protime NA copy NA NA NA [5, 30] NA protime NA
protime NA cont cont tester1; tester2 [protime] protime NA NA::b missing missing NA else NA protime NA
hepato heapto_cat3_NA::b cat cat tester1; tester2 [hepato] hepato 2 NA::a not applicable not applicable NA 9 not applicable hepato NA
sex sex_cat2_1 cat cat tester1; tester2 [sex] sex 2 m sex m sex m NA m sex m sex NA
sex sex_cat2_2 cat cat tester1; tester2 [sex] sex 2 f sex f sex f NA f sex f sex NA
sex sex_cat2_NA::b cat cat tester1; tester2 [sex] sex 2 NA::b missing missing NA else sex m sex NA
sex sex_cat2_NA::a cat cat tester1; tester2 [sex] sex 2 NA::a not applicable not applicable NA 9 sex m sex NA
spiders spiders0 cat cat tester1; tester2 [spiders] spiders 2 0 spiders 0 spiders 0 NA 0 spiders 0 spiders NA
spiders spiders1 cat cat tester1; tester2 [spiders] spiders 2 1 spiders 1 spiders 1 NA 1 spiders 1 spiders NA
spiders spiders_NA::b cat cat tester1; tester2 [spiders] spiders 2 NA::b missing missing NA else spiders 0 spiders NA
spiders spiders_NA::a cat cat tester1; tester2 [spiders] spiders 2 NA::a not applicable not applicable NA 9 not applicable spiders NA
stage stage1 cat cat tester1; tester2 [stage] stage 4 1 stage 1 stage 1 NA 1 stage 1 stage NA
stage stage2 cat cat tester1; tester2 [stage] stage 4 2 stage 2 stage 2 NA 2 stage 2 stage NA
stage stage3 cat cat tester1; tester2 [stage] stage 4 3 stage 3 stage 3 NA 3 stage 3 stage NA
stage stage4 cat cat tester1; tester2 [stage] stage 4 4 stage 4 stage 4 NA 4 stage 4 stage NA
stage stage_NA::b cat cat tester1; tester2 [stage] stage 4 NA::b missing missing NA else missing stage NA
stage stage_NA::a cat cat tester1; tester2 [stage] stage 4 NA::a not applicable not applicable NA 9 not applicable stage NA
status status0 cat cat tester1; tester2 [status] status 3 0 status 0 status 0 NA 0 status 0 status NA
status status1 cat cat tester1; tester2 [status] status 3 1 status 1 status 1 NA 1 status 1 status NA
status status2 cat cat tester1; tester2 [status] status 3 2 status 2 status 2 NA 2 status 2 status NA
status status_NA::b cat cat tester1; tester2 [status] status 3 NA::b missing missing NA else status 0 status NA
protime NA cont cont tester1; tester2 [protime] protime NA NA::a not applicable not applicable NA 99 NA protime NA
time NA cont cont tester1; tester2 [time] time NA copy NA NA NA [0,5000] NA time NA
time NA cont cont tester1; tester2 [time] time NA NA::b missing missing NA else NA time NA
time NA cont cont tester1; tester2 [time] time NA NA::a not applicable not applicable NA 9999 NA time NA
trig NA cont cont tester1; tester2 [trig] trig NA copy NA NA NA [0,1000] NA trig NA
trig NA cont cont tester1; tester2 [trig] trig NA NA::b missing missing NA else NA trig NA
status status_NA::a cat cat tester1; tester2 [status] status 3 NA::a not applicable not applicable NA 9 not applicable status NA
trt trt1 cat cat tester1; tester2 [trt] trt 2 1 trt 1 trt 1 NA 1 trt 1 trt NA
trt trt2 cat cat tester1; tester2 [trt] trt 2 2 trt 2 trt 2 NA 2 trt 2 trt NA
trt trt_NA::b cat cat tester1; tester2 [trt] trt 2 NA::b missing missing NA else trt 1 trt NA
trt trt_NA::a cat cat tester1; tester2 [trt] trt 2 NA::a not applicable not applicable NA 9 not applicable trt NA
trig NA cont cont tester1; tester2 [trig] trig NA NA::a missing missing NA 9999 NA trig NA
example_der NA cont cont tester1; tester2 DerivedVar::[chol, bili] example_der NA Func::example_der_fun N/A N/A NA else N/A example_der A test derived variable
agegrp10 agegrp10_cat6_1 cat cat tester2 tester2::agegrp grouped age 6 1 20-29 20-29 years 1 20-29 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester2 tester2::agegrp grouped age 6 2 30-39 30-39 years 2 30-39 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester2 tester2::agegrp grouped age 6 3 40-49 40-49 years 3 40-49 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester2 tester2::agegrp grouped age 6 4 50-59 50-59 years 4 50-59 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester2 tester2::agegrp grouped age 6 5 60-69 60-69 years 5 60-69 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester2 tester2::agegrp grouped age 6 6 70-79 70-79 years 6 70-79 grouped age NA
agegrp10 agegrp10_cat6_NA::b cat cat tester2 tester2::agegrp grouped age 6 NA::b missing missing years else missing grouped age NA
agegrp5 agegrp5_cat11_1 cat cat tester1 tester1::agegrp grouped age 11 1 25-29 25-29 years 1 20-29 grouped age NA
agegrp5 agegrp5_cat11_2 cat cat tester1 tester1::agegrp grouped age 11 2 30-34 30-34 years 2 30-39 grouped age NA
agegrp5 agegrp5_cat11_3 cat cat tester1 tester1::agegrp grouped age 11 3 35-39 35-39 years 3 30-39 grouped age NA
agegrp5 agegrp5_cat11_4 cat cat tester1 tester1::agegrp grouped age 11 4 40-44 40-44 years 4 40-49 grouped age NA
agegrp5 agegrp5_cat11_5 cat cat tester1 tester1::agegrp grouped age 11 5 45-49 45-49 years 5 40-49 grouped age NA
agegrp5 agegrp5_cat11_6 cat cat tester1 tester1::agegrp grouped age 11 6 50-54 50-54 years 6 50-59 grouped age NA
agegrp5 agegrp5_cat11_7 cat cat tester1 tester1::agegrp grouped age 11 7 55-59 55-59 years 7 50-59 grouped age NA
agegrp5 agegrp5_cat11_8 cat cat tester1 tester1::agegrp grouped age 11 8 60-64 60-64 years 8 60-69 grouped age NA
agegrp5 agegrp5_cat11_9 cat cat tester1 tester1::agegrp grouped age 11 9 65-69 65-69 years 9 60-69 grouped age NA
agegrp5 agegrp5_cat11_10 cat cat tester1 tester1::agegrp grouped age 11 10 70-74 70-74 years 10 70-79 grouped age NA
agegrp5 agegrp5_cat11_11 cat cat tester1 tester1::agegrp grouped age 11 11 75-79 75-79 years 11 70-79 grouped age NA
agegrp5 agegrp5_cat11_NA::b cat cat tester1 tester1::agegrp grouped age 11 Na::b missing missing years else missing grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 27 NA NA years 1 20-29 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 32 NA NA years 2 30-39 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 37 NA NA years 3 30-39 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 42 NA NA years 4 40-49 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 47 NA NA years 5 40-49 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 52 NA NA years 6 50-59 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 57 NA NA years 7 50-59 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 62 NA NA years 8 60-69 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 67 NA NA years 9 60-69 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 72 NA NA years 10 70-79 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 77 NA NA years 11 70-79 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA NA::b NA NA years else missing grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 25 NA NA years 1 20-29 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 35 NA NA years 2 30-39 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 45 NA NA years 3 40-49 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 55 NA NA years 4 50-59 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 65 NA NA years 5 60-69 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 75 NA NA years 6 70-79 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age 6 NA::b NA NA years else missing grouped age NA
agegrp10 agegrp10_cat6_1 cat cat tester1 tester1::agegrp grouped age 6 1 20-29 20-29 years 1 20-29 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester1 tester1::agegrp grouped age 6 2 30-39 30-39 years 2 30-39 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester1 tester1::agegrp grouped age 6 2 30-39 30-39 years 3 30-39 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester1 tester1::agegrp grouped age 6 3 40-49 40-49 years 4 40-49 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester1 tester1::agegrp grouped age 6 3 40-49 40-49 years 5 40-49 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester1 tester1::agegrp grouped age 6 4 50-59 50-59 years 6 50-59 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester1 tester1::agegrp grouped age 6 4 50-59 50-59 years 7 50-59 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester1 tester1::agegrp grouped age 6 5 60-69 60-69 years 8 60-69 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester1 tester1::agegrp grouped age 6 5 60-69 60-69 years 9 60-69 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester1 tester1::agegrp grouped age 6 6 70-79 70-79 years 10 70-79 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester1 tester1::agegrp grouped age 6 6 70-79 70-79 years 11 70-79 grouped age NA
agegrp10 agegrp10_cat6_NA::b cat cat tester1 tester1::agegrp grouped age 6 NA::b missing missing years else missing grouped age NA
  1. recEnd: indicates the category to which you are recoding each row. For the not applicable rows NA::a is written. For the missing and else rows NA::b is written. The haven package is used for tagging NA in numeric variables.

We are not changing the categories stage, therefore, the recEnd values for these rows will be the same as the the original data. For the not applicable rows write NA::a. For the missing and else rows write NA::b.

variable dummyVariable typeEnd typeStart databaseStart variableStart variableStartLabel numValidCat recEnd catLabel catLabelLong units recStart catStartLabel variableStartShortLabel notes
age NA cont cont tester1; tester2 [age] age NA copy NA NA NA [20,80] NA age NA
age NA cont cont tester1; tester2 [age] age NA NA::b missing missing NA else NA age NA
age NA cont cont tester1; tester2 [age] age NA NA::a not applicable not applicable NA 999 NA age NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA copy NA NA NA [1,5] NA albumin NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA NA::b missing missing NA else NA albumin NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA NA::a not applicable not applicable NA 99 NA albumin NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA copy NA NA NA [200,15000] NA alk.phos NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA NA::b missing missing NA else NA alk.phos NA
ascites ascites_cat3_1 cat cat tester1; tester2 [ascites] ascites 2 0 ascites 0 ascites 0 NA 0 ascites 0 ascites NA
ascites ascites_cat3_2 cat cat tester1; tester2 [ascites] ascites 2 1 ascites 1 ascites 1 NA 1 ascites 1 ascites NA
ascites ascites_cat3_NA::b cat cat tester1; tester2 [ascites] ascites 2 NA::b missing missing NA else ascites 0 ascites NA
ascites ascites_cat3_NA::a cat cat tester1; tester2 [ascites] ascites 2 NA::a not applicable not applicable NA 9 not applicable NA NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA NA::a not applicable not applicable NA 99999 NA alk.phos NA
ast NA cont cont tester1; tester2 [ast] ast NA copy NA NA NA [20,500] NA ast NA
ast NA cont cont tester1; tester2 [ast] ast NA NA::b missing missing NA else NA ast NA
ast NA cont cont tester1; tester2 [ast] ast NA NA::a not applicable not applicable NA 9999 NA ast NA
bili NA cont cont tester1; tester2 [bili] bili NA copy NA NA NA [0,100] NA bili NA
bili NA cont cont tester1; tester2 [bili] bili NA NA::b missing missing NA else NA bili NA
chol NA cont cont tester1; tester2 [chol] chol NA copy NA NA NA [100,2000] NA chol NA
chol NA cont cont tester1; tester2 [chol] chol NA NA::b missing missing NA else NA chol NA
chol NA cont cont tester1; tester2 [chol] chol NA NA::a missing missing NA 9999 NA chol NA
copper NA cont cont tester1; tester2 [copper] copper NA copy NA NA NA [0,1000] NA copper NA
copper NA cont cont tester1; tester2 [copper] copper NA NA::b missing missing NA else NA copper NA
edema edema_cat3_1 cat cat tester1; tester2 [edema] edema 3 0 edema 0.0 edema 0.0 NA 0 edema 0.0 edema NA
edema edema_cat3_2 cat cat tester1; tester2 [edema] edema 3 0.5 edema 0.5 edema 0.5 NA 0.5 edema 0.5 edema NA
edema edema_cat3_3 cat cat tester1; tester2 [edema] edema 3 1 edema 1.0 edema 1.0 NA 1 edema 1.0 edema NA
edema edema_cat3_NA::b cat cat tester1; tester2 [edema] edema 3 NA::b missing missing NA else missing edema NA
edema edema_cat3_NA::a cat cat tester1; tester2 [edema] edema 3 NA::a not applicable not applicable NA 9 not applicable edema NA
hepato heapto_cat3_1 cat cat tester1; tester2 [hepato] hepato 2 0 hepato 0 hepato 0 NA 0 hepato 0 hepato NA
hepato heapto_cat3_1 cat cat tester1; tester2 [hepato] hepato 2 1 hepato 1 hepato 1 NA 1 hepato 1 hepato NA
hepato heapto_cat3_NA::a cat cat tester1; tester2 [hepato] hepato 2 NA::b missing missing NA else missing hepato NA
copper NA cont cont tester1; tester2 [copper] copper NA NA::a missing missing NA 9999 NA copper NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA copy NA NA NA [0,1000] NA platelet NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA NA::b missing missing NA else NA platelet NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA NA::a not applicable not applicable NA 9999 NA platelet NA
protime NA cont cont tester1; tester2 [protime] protime NA copy NA NA NA [5, 30] NA protime NA
protime NA cont cont tester1; tester2 [protime] protime NA NA::b missing missing NA else NA protime NA
hepato heapto_cat3_NA::b cat cat tester1; tester2 [hepato] hepato 2 NA::a not applicable not applicable NA 9 not applicable hepato NA
sex sex_cat2_1 cat cat tester1; tester2 [sex] sex 2 m sex m sex m NA m sex m sex NA
sex sex_cat2_2 cat cat tester1; tester2 [sex] sex 2 f sex f sex f NA f sex f sex NA
sex sex_cat2_NA::b cat cat tester1; tester2 [sex] sex 2 NA::b missing missing NA else sex m sex NA
sex sex_cat2_NA::a cat cat tester1; tester2 [sex] sex 2 NA::a not applicable not applicable NA 9 sex m sex NA
spiders spiders0 cat cat tester1; tester2 [spiders] spiders 2 0 spiders 0 spiders 0 NA 0 spiders 0 spiders NA
spiders spiders1 cat cat tester1; tester2 [spiders] spiders 2 1 spiders 1 spiders 1 NA 1 spiders 1 spiders NA
spiders spiders_NA::b cat cat tester1; tester2 [spiders] spiders 2 NA::b missing missing NA else spiders 0 spiders NA
spiders spiders_NA::a cat cat tester1; tester2 [spiders] spiders 2 NA::a not applicable not applicable NA 9 not applicable spiders NA
stage stage1 cat cat tester1; tester2 [stage] stage 4 1 stage 1 stage 1 NA 1 stage 1 stage NA
stage stage2 cat cat tester1; tester2 [stage] stage 4 2 stage 2 stage 2 NA 2 stage 2 stage NA
stage stage3 cat cat tester1; tester2 [stage] stage 4 3 stage 3 stage 3 NA 3 stage 3 stage NA
stage stage4 cat cat tester1; tester2 [stage] stage 4 4 stage 4 stage 4 NA 4 stage 4 stage NA
stage stage_NA::b cat cat tester1; tester2 [stage] stage 4 NA::b missing missing NA else missing stage NA
stage stage_NA::a cat cat tester1; tester2 [stage] stage 4 NA::a not applicable not applicable NA 9 not applicable stage NA
status status0 cat cat tester1; tester2 [status] status 3 0 status 0 status 0 NA 0 status 0 status NA
status status1 cat cat tester1; tester2 [status] status 3 1 status 1 status 1 NA 1 status 1 status NA
status status2 cat cat tester1; tester2 [status] status 3 2 status 2 status 2 NA 2 status 2 status NA
status status_NA::b cat cat tester1; tester2 [status] status 3 NA::b missing missing NA else status 0 status NA
protime NA cont cont tester1; tester2 [protime] protime NA NA::a not applicable not applicable NA 99 NA protime NA
time NA cont cont tester1; tester2 [time] time NA copy NA NA NA [0,5000] NA time NA
time NA cont cont tester1; tester2 [time] time NA NA::b missing missing NA else NA time NA
time NA cont cont tester1; tester2 [time] time NA NA::a not applicable not applicable NA 9999 NA time NA
trig NA cont cont tester1; tester2 [trig] trig NA copy NA NA NA [0,1000] NA trig NA
trig NA cont cont tester1; tester2 [trig] trig NA NA::b missing missing NA else NA trig NA
status status_NA::a cat cat tester1; tester2 [status] status 3 NA::a not applicable not applicable NA 9 not applicable status NA
trt trt1 cat cat tester1; tester2 [trt] trt 2 1 trt 1 trt 1 NA 1 trt 1 trt NA
trt trt2 cat cat tester1; tester2 [trt] trt 2 2 trt 2 trt 2 NA 2 trt 2 trt NA
trt trt_NA::b cat cat tester1; tester2 [trt] trt 2 NA::b missing missing NA else trt 1 trt NA
trt trt_NA::a cat cat tester1; tester2 [trt] trt 2 NA::a not applicable not applicable NA 9 not applicable trt NA
trig NA cont cont tester1; tester2 [trig] trig NA NA::a missing missing NA 9999 NA trig NA
example_der NA cont cont tester1; tester2 DerivedVar::[chol, bili] example_der NA Func::example_der_fun N/A N/A NA else N/A example_der A test derived variable
agegrp10 agegrp10_cat6_1 cat cat tester2 tester2::agegrp grouped age 6 1 20-29 20-29 years 1 20-29 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester2 tester2::agegrp grouped age 6 2 30-39 30-39 years 2 30-39 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester2 tester2::agegrp grouped age 6 3 40-49 40-49 years 3 40-49 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester2 tester2::agegrp grouped age 6 4 50-59 50-59 years 4 50-59 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester2 tester2::agegrp grouped age 6 5 60-69 60-69 years 5 60-69 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester2 tester2::agegrp grouped age 6 6 70-79 70-79 years 6 70-79 grouped age NA
agegrp10 agegrp10_cat6_NA::b cat cat tester2 tester2::agegrp grouped age 6 NA::b missing missing years else missing grouped age NA
agegrp5 agegrp5_cat11_1 cat cat tester1 tester1::agegrp grouped age 11 1 25-29 25-29 years 1 20-29 grouped age NA
agegrp5 agegrp5_cat11_2 cat cat tester1 tester1::agegrp grouped age 11 2 30-34 30-34 years 2 30-39 grouped age NA
agegrp5 agegrp5_cat11_3 cat cat tester1 tester1::agegrp grouped age 11 3 35-39 35-39 years 3 30-39 grouped age NA
agegrp5 agegrp5_cat11_4 cat cat tester1 tester1::agegrp grouped age 11 4 40-44 40-44 years 4 40-49 grouped age NA
agegrp5 agegrp5_cat11_5 cat cat tester1 tester1::agegrp grouped age 11 5 45-49 45-49 years 5 40-49 grouped age NA
agegrp5 agegrp5_cat11_6 cat cat tester1 tester1::agegrp grouped age 11 6 50-54 50-54 years 6 50-59 grouped age NA
agegrp5 agegrp5_cat11_7 cat cat tester1 tester1::agegrp grouped age 11 7 55-59 55-59 years 7 50-59 grouped age NA
agegrp5 agegrp5_cat11_8 cat cat tester1 tester1::agegrp grouped age 11 8 60-64 60-64 years 8 60-69 grouped age NA
agegrp5 agegrp5_cat11_9 cat cat tester1 tester1::agegrp grouped age 11 9 65-69 65-69 years 9 60-69 grouped age NA
agegrp5 agegrp5_cat11_10 cat cat tester1 tester1::agegrp grouped age 11 10 70-74 70-74 years 10 70-79 grouped age NA
agegrp5 agegrp5_cat11_11 cat cat tester1 tester1::agegrp grouped age 11 11 75-79 75-79 years 11 70-79 grouped age NA
agegrp5 agegrp5_cat11_NA::b cat cat tester1 tester1::agegrp grouped age 11 Na::b missing missing years else missing grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 27 NA NA years 1 20-29 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 32 NA NA years 2 30-39 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 37 NA NA years 3 30-39 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 42 NA NA years 4 40-49 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 47 NA NA years 5 40-49 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 52 NA NA years 6 50-59 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 57 NA NA years 7 50-59 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 62 NA NA years 8 60-69 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 67 NA NA years 9 60-69 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 72 NA NA years 10 70-79 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 77 NA NA years 11 70-79 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA NA::b NA NA years else missing grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 25 NA NA years 1 20-29 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 35 NA NA years 2 30-39 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 45 NA NA years 3 40-49 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 55 NA NA years 4 50-59 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 65 NA NA years 5 60-69 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 75 NA NA years 6 70-79 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age 6 NA::b NA NA years else missing grouped age NA
agegrp10 agegrp10_cat6_1 cat cat tester1 tester1::agegrp grouped age 6 1 20-29 20-29 years 1 20-29 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester1 tester1::agegrp grouped age 6 2 30-39 30-39 years 2 30-39 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester1 tester1::agegrp grouped age 6 2 30-39 30-39 years 3 30-39 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester1 tester1::agegrp grouped age 6 3 40-49 40-49 years 4 40-49 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester1 tester1::agegrp grouped age 6 3 40-49 40-49 years 5 40-49 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester1 tester1::agegrp grouped age 6 4 50-59 50-59 years 6 50-59 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester1 tester1::agegrp grouped age 6 4 50-59 50-59 years 7 50-59 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester1 tester1::agegrp grouped age 6 5 60-69 60-69 years 8 60-69 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester1 tester1::agegrp grouped age 6 5 60-69 60-69 years 9 60-69 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester1 tester1::agegrp grouped age 6 6 70-79 70-79 years 10 70-79 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester1 tester1::agegrp grouped age 6 6 70-79 70-79 years 11 70-79 grouped age NA
agegrp10 agegrp10_cat6_NA::b cat cat tester1 tester1::agegrp grouped age 6 NA::b missing missing years else missing grouped age NA
  1. catLabel: indicates the lable for the recoded categorical level.

Write Stage 1, Stage 2, Stage 3, Stage 4, NA, and missing.

variable dummyVariable typeEnd typeStart databaseStart variableStart variableStartLabel numValidCat recEnd catLabel catLabelLong units recStart catStartLabel variableStartShortLabel notes
age NA cont cont tester1; tester2 [age] age NA copy NA NA NA [20,80] NA age NA
age NA cont cont tester1; tester2 [age] age NA NA::b missing missing NA else NA age NA
age NA cont cont tester1; tester2 [age] age NA NA::a not applicable not applicable NA 999 NA age NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA copy NA NA NA [1,5] NA albumin NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA NA::b missing missing NA else NA albumin NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA NA::a not applicable not applicable NA 99 NA albumin NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA copy NA NA NA [200,15000] NA alk.phos NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA NA::b missing missing NA else NA alk.phos NA
ascites ascites_cat3_1 cat cat tester1; tester2 [ascites] ascites 2 0 ascites 0 ascites 0 NA 0 ascites 0 ascites NA
ascites ascites_cat3_2 cat cat tester1; tester2 [ascites] ascites 2 1 ascites 1 ascites 1 NA 1 ascites 1 ascites NA
ascites ascites_cat3_NA::b cat cat tester1; tester2 [ascites] ascites 2 NA::b missing missing NA else ascites 0 ascites NA
ascites ascites_cat3_NA::a cat cat tester1; tester2 [ascites] ascites 2 NA::a not applicable not applicable NA 9 not applicable NA NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA NA::a not applicable not applicable NA 99999 NA alk.phos NA
ast NA cont cont tester1; tester2 [ast] ast NA copy NA NA NA [20,500] NA ast NA
ast NA cont cont tester1; tester2 [ast] ast NA NA::b missing missing NA else NA ast NA
ast NA cont cont tester1; tester2 [ast] ast NA NA::a not applicable not applicable NA 9999 NA ast NA
bili NA cont cont tester1; tester2 [bili] bili NA copy NA NA NA [0,100] NA bili NA
bili NA cont cont tester1; tester2 [bili] bili NA NA::b missing missing NA else NA bili NA
chol NA cont cont tester1; tester2 [chol] chol NA copy NA NA NA [100,2000] NA chol NA
chol NA cont cont tester1; tester2 [chol] chol NA NA::b missing missing NA else NA chol NA
chol NA cont cont tester1; tester2 [chol] chol NA NA::a missing missing NA 9999 NA chol NA
copper NA cont cont tester1; tester2 [copper] copper NA copy NA NA NA [0,1000] NA copper NA
copper NA cont cont tester1; tester2 [copper] copper NA NA::b missing missing NA else NA copper NA
edema edema_cat3_1 cat cat tester1; tester2 [edema] edema 3 0 edema 0.0 edema 0.0 NA 0 edema 0.0 edema NA
edema edema_cat3_2 cat cat tester1; tester2 [edema] edema 3 0.5 edema 0.5 edema 0.5 NA 0.5 edema 0.5 edema NA
edema edema_cat3_3 cat cat tester1; tester2 [edema] edema 3 1 edema 1.0 edema 1.0 NA 1 edema 1.0 edema NA
edema edema_cat3_NA::b cat cat tester1; tester2 [edema] edema 3 NA::b missing missing NA else missing edema NA
edema edema_cat3_NA::a cat cat tester1; tester2 [edema] edema 3 NA::a not applicable not applicable NA 9 not applicable edema NA
hepato heapto_cat3_1 cat cat tester1; tester2 [hepato] hepato 2 0 hepato 0 hepato 0 NA 0 hepato 0 hepato NA
hepato heapto_cat3_1 cat cat tester1; tester2 [hepato] hepato 2 1 hepato 1 hepato 1 NA 1 hepato 1 hepato NA
hepato heapto_cat3_NA::a cat cat tester1; tester2 [hepato] hepato 2 NA::b missing missing NA else missing hepato NA
copper NA cont cont tester1; tester2 [copper] copper NA NA::a missing missing NA 9999 NA copper NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA copy NA NA NA [0,1000] NA platelet NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA NA::b missing missing NA else NA platelet NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA NA::a not applicable not applicable NA 9999 NA platelet NA
protime NA cont cont tester1; tester2 [protime] protime NA copy NA NA NA [5, 30] NA protime NA
protime NA cont cont tester1; tester2 [protime] protime NA NA::b missing missing NA else NA protime NA
hepato heapto_cat3_NA::b cat cat tester1; tester2 [hepato] hepato 2 NA::a not applicable not applicable NA 9 not applicable hepato NA
sex sex_cat2_1 cat cat tester1; tester2 [sex] sex 2 m sex m sex m NA m sex m sex NA
sex sex_cat2_2 cat cat tester1; tester2 [sex] sex 2 f sex f sex f NA f sex f sex NA
sex sex_cat2_NA::b cat cat tester1; tester2 [sex] sex 2 NA::b missing missing NA else sex m sex NA
sex sex_cat2_NA::a cat cat tester1; tester2 [sex] sex 2 NA::a not applicable not applicable NA 9 sex m sex NA
spiders spiders0 cat cat tester1; tester2 [spiders] spiders 2 0 spiders 0 spiders 0 NA 0 spiders 0 spiders NA
spiders spiders1 cat cat tester1; tester2 [spiders] spiders 2 1 spiders 1 spiders 1 NA 1 spiders 1 spiders NA
spiders spiders_NA::b cat cat tester1; tester2 [spiders] spiders 2 NA::b missing missing NA else spiders 0 spiders NA
spiders spiders_NA::a cat cat tester1; tester2 [spiders] spiders 2 NA::a not applicable not applicable NA 9 not applicable spiders NA
stage stage1 cat cat tester1; tester2 [stage] stage 4 1 stage 1 stage 1 NA 1 stage 1 stage NA
stage stage2 cat cat tester1; tester2 [stage] stage 4 2 stage 2 stage 2 NA 2 stage 2 stage NA
stage stage3 cat cat tester1; tester2 [stage] stage 4 3 stage 3 stage 3 NA 3 stage 3 stage NA
stage stage4 cat cat tester1; tester2 [stage] stage 4 4 stage 4 stage 4 NA 4 stage 4 stage NA
stage stage_NA::b cat cat tester1; tester2 [stage] stage 4 NA::b missing missing NA else missing stage NA
stage stage_NA::a cat cat tester1; tester2 [stage] stage 4 NA::a not applicable not applicable NA 9 not applicable stage NA
status status0 cat cat tester1; tester2 [status] status 3 0 status 0 status 0 NA 0 status 0 status NA
status status1 cat cat tester1; tester2 [status] status 3 1 status 1 status 1 NA 1 status 1 status NA
status status2 cat cat tester1; tester2 [status] status 3 2 status 2 status 2 NA 2 status 2 status NA
status status_NA::b cat cat tester1; tester2 [status] status 3 NA::b missing missing NA else status 0 status NA
protime NA cont cont tester1; tester2 [protime] protime NA NA::a not applicable not applicable NA 99 NA protime NA
time NA cont cont tester1; tester2 [time] time NA copy NA NA NA [0,5000] NA time NA
time NA cont cont tester1; tester2 [time] time NA NA::b missing missing NA else NA time NA
time NA cont cont tester1; tester2 [time] time NA NA::a not applicable not applicable NA 9999 NA time NA
trig NA cont cont tester1; tester2 [trig] trig NA copy NA NA NA [0,1000] NA trig NA
trig NA cont cont tester1; tester2 [trig] trig NA NA::b missing missing NA else NA trig NA
status status_NA::a cat cat tester1; tester2 [status] status 3 NA::a not applicable not applicable NA 9 not applicable status NA
trt trt1 cat cat tester1; tester2 [trt] trt 2 1 trt 1 trt 1 NA 1 trt 1 trt NA
trt trt2 cat cat tester1; tester2 [trt] trt 2 2 trt 2 trt 2 NA 2 trt 2 trt NA
trt trt_NA::b cat cat tester1; tester2 [trt] trt 2 NA::b missing missing NA else trt 1 trt NA
trt trt_NA::a cat cat tester1; tester2 [trt] trt 2 NA::a not applicable not applicable NA 9 not applicable trt NA
trig NA cont cont tester1; tester2 [trig] trig NA NA::a missing missing NA 9999 NA trig NA
example_der NA cont cont tester1; tester2 DerivedVar::[chol, bili] example_der NA Func::example_der_fun N/A N/A NA else N/A example_der A test derived variable
agegrp10 agegrp10_cat6_1 cat cat tester2 tester2::agegrp grouped age 6 1 20-29 20-29 years 1 20-29 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester2 tester2::agegrp grouped age 6 2 30-39 30-39 years 2 30-39 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester2 tester2::agegrp grouped age 6 3 40-49 40-49 years 3 40-49 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester2 tester2::agegrp grouped age 6 4 50-59 50-59 years 4 50-59 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester2 tester2::agegrp grouped age 6 5 60-69 60-69 years 5 60-69 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester2 tester2::agegrp grouped age 6 6 70-79 70-79 years 6 70-79 grouped age NA
agegrp10 agegrp10_cat6_NA::b cat cat tester2 tester2::agegrp grouped age 6 NA::b missing missing years else missing grouped age NA
agegrp5 agegrp5_cat11_1 cat cat tester1 tester1::agegrp grouped age 11 1 25-29 25-29 years 1 20-29 grouped age NA
agegrp5 agegrp5_cat11_2 cat cat tester1 tester1::agegrp grouped age 11 2 30-34 30-34 years 2 30-39 grouped age NA
agegrp5 agegrp5_cat11_3 cat cat tester1 tester1::agegrp grouped age 11 3 35-39 35-39 years 3 30-39 grouped age NA
agegrp5 agegrp5_cat11_4 cat cat tester1 tester1::agegrp grouped age 11 4 40-44 40-44 years 4 40-49 grouped age NA
agegrp5 agegrp5_cat11_5 cat cat tester1 tester1::agegrp grouped age 11 5 45-49 45-49 years 5 40-49 grouped age NA
agegrp5 agegrp5_cat11_6 cat cat tester1 tester1::agegrp grouped age 11 6 50-54 50-54 years 6 50-59 grouped age NA
agegrp5 agegrp5_cat11_7 cat cat tester1 tester1::agegrp grouped age 11 7 55-59 55-59 years 7 50-59 grouped age NA
agegrp5 agegrp5_cat11_8 cat cat tester1 tester1::agegrp grouped age 11 8 60-64 60-64 years 8 60-69 grouped age NA
agegrp5 agegrp5_cat11_9 cat cat tester1 tester1::agegrp grouped age 11 9 65-69 65-69 years 9 60-69 grouped age NA
agegrp5 agegrp5_cat11_10 cat cat tester1 tester1::agegrp grouped age 11 10 70-74 70-74 years 10 70-79 grouped age NA
agegrp5 agegrp5_cat11_11 cat cat tester1 tester1::agegrp grouped age 11 11 75-79 75-79 years 11 70-79 grouped age NA
agegrp5 agegrp5_cat11_NA::b cat cat tester1 tester1::agegrp grouped age 11 Na::b missing missing years else missing grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 27 NA NA years 1 20-29 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 32 NA NA years 2 30-39 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 37 NA NA years 3 30-39 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 42 NA NA years 4 40-49 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 47 NA NA years 5 40-49 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 52 NA NA years 6 50-59 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 57 NA NA years 7 50-59 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 62 NA NA years 8 60-69 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 67 NA NA years 9 60-69 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 72 NA NA years 10 70-79 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 77 NA NA years 11 70-79 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA NA::b NA NA years else missing grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 25 NA NA years 1 20-29 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 35 NA NA years 2 30-39 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 45 NA NA years 3 40-49 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 55 NA NA years 4 50-59 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 65 NA NA years 5 60-69 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 75 NA NA years 6 70-79 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age 6 NA::b NA NA years else missing grouped age NA
agegrp10 agegrp10_cat6_1 cat cat tester1 tester1::agegrp grouped age 6 1 20-29 20-29 years 1 20-29 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester1 tester1::agegrp grouped age 6 2 30-39 30-39 years 2 30-39 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester1 tester1::agegrp grouped age 6 2 30-39 30-39 years 3 30-39 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester1 tester1::agegrp grouped age 6 3 40-49 40-49 years 4 40-49 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester1 tester1::agegrp grouped age 6 3 40-49 40-49 years 5 40-49 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester1 tester1::agegrp grouped age 6 4 50-59 50-59 years 6 50-59 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester1 tester1::agegrp grouped age 6 4 50-59 50-59 years 7 50-59 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester1 tester1::agegrp grouped age 6 5 60-69 60-69 years 8 60-69 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester1 tester1::agegrp grouped age 6 5 60-69 60-69 years 9 60-69 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester1 tester1::agegrp grouped age 6 6 70-79 70-79 years 10 70-79 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester1 tester1::agegrp grouped age 6 6 70-79 70-79 years 11 70-79 grouped age NA
agegrp10 agegrp10_cat6_NA::b cat cat tester1 tester1::agegrp grouped age 6 NA::b missing missing years else missing grouped age NA
  1. catLabelLong: provides a more elaborate lable for the recoded categorical level. If not required, repeat the shorter catLabel.

Copy values from catLabel

variable dummyVariable typeEnd typeStart databaseStart variableStart variableStartLabel numValidCat recEnd catLabel catLabelLong units recStart catStartLabel variableStartShortLabel notes
age NA cont cont tester1; tester2 [age] age NA copy NA NA NA [20,80] NA age NA
age NA cont cont tester1; tester2 [age] age NA NA::b missing missing NA else NA age NA
age NA cont cont tester1; tester2 [age] age NA NA::a not applicable not applicable NA 999 NA age NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA copy NA NA NA [1,5] NA albumin NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA NA::b missing missing NA else NA albumin NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA NA::a not applicable not applicable NA 99 NA albumin NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA copy NA NA NA [200,15000] NA alk.phos NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA NA::b missing missing NA else NA alk.phos NA
ascites ascites_cat3_1 cat cat tester1; tester2 [ascites] ascites 2 0 ascites 0 ascites 0 NA 0 ascites 0 ascites NA
ascites ascites_cat3_2 cat cat tester1; tester2 [ascites] ascites 2 1 ascites 1 ascites 1 NA 1 ascites 1 ascites NA
ascites ascites_cat3_NA::b cat cat tester1; tester2 [ascites] ascites 2 NA::b missing missing NA else ascites 0 ascites NA
ascites ascites_cat3_NA::a cat cat tester1; tester2 [ascites] ascites 2 NA::a not applicable not applicable NA 9 not applicable NA NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA NA::a not applicable not applicable NA 99999 NA alk.phos NA
ast NA cont cont tester1; tester2 [ast] ast NA copy NA NA NA [20,500] NA ast NA
ast NA cont cont tester1; tester2 [ast] ast NA NA::b missing missing NA else NA ast NA
ast NA cont cont tester1; tester2 [ast] ast NA NA::a not applicable not applicable NA 9999 NA ast NA
bili NA cont cont tester1; tester2 [bili] bili NA copy NA NA NA [0,100] NA bili NA
bili NA cont cont tester1; tester2 [bili] bili NA NA::b missing missing NA else NA bili NA
chol NA cont cont tester1; tester2 [chol] chol NA copy NA NA NA [100,2000] NA chol NA
chol NA cont cont tester1; tester2 [chol] chol NA NA::b missing missing NA else NA chol NA
chol NA cont cont tester1; tester2 [chol] chol NA NA::a missing missing NA 9999 NA chol NA
copper NA cont cont tester1; tester2 [copper] copper NA copy NA NA NA [0,1000] NA copper NA
copper NA cont cont tester1; tester2 [copper] copper NA NA::b missing missing NA else NA copper NA
edema edema_cat3_1 cat cat tester1; tester2 [edema] edema 3 0 edema 0.0 edema 0.0 NA 0 edema 0.0 edema NA
edema edema_cat3_2 cat cat tester1; tester2 [edema] edema 3 0.5 edema 0.5 edema 0.5 NA 0.5 edema 0.5 edema NA
edema edema_cat3_3 cat cat tester1; tester2 [edema] edema 3 1 edema 1.0 edema 1.0 NA 1 edema 1.0 edema NA
edema edema_cat3_NA::b cat cat tester1; tester2 [edema] edema 3 NA::b missing missing NA else missing edema NA
edema edema_cat3_NA::a cat cat tester1; tester2 [edema] edema 3 NA::a not applicable not applicable NA 9 not applicable edema NA
hepato heapto_cat3_1 cat cat tester1; tester2 [hepato] hepato 2 0 hepato 0 hepato 0 NA 0 hepato 0 hepato NA
hepato heapto_cat3_1 cat cat tester1; tester2 [hepato] hepato 2 1 hepato 1 hepato 1 NA 1 hepato 1 hepato NA
hepato heapto_cat3_NA::a cat cat tester1; tester2 [hepato] hepato 2 NA::b missing missing NA else missing hepato NA
copper NA cont cont tester1; tester2 [copper] copper NA NA::a missing missing NA 9999 NA copper NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA copy NA NA NA [0,1000] NA platelet NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA NA::b missing missing NA else NA platelet NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA NA::a not applicable not applicable NA 9999 NA platelet NA
protime NA cont cont tester1; tester2 [protime] protime NA copy NA NA NA [5, 30] NA protime NA
protime NA cont cont tester1; tester2 [protime] protime NA NA::b missing missing NA else NA protime NA
hepato heapto_cat3_NA::b cat cat tester1; tester2 [hepato] hepato 2 NA::a not applicable not applicable NA 9 not applicable hepato NA
sex sex_cat2_1 cat cat tester1; tester2 [sex] sex 2 m sex m sex m NA m sex m sex NA
sex sex_cat2_2 cat cat tester1; tester2 [sex] sex 2 f sex f sex f NA f sex f sex NA
sex sex_cat2_NA::b cat cat tester1; tester2 [sex] sex 2 NA::b missing missing NA else sex m sex NA
sex sex_cat2_NA::a cat cat tester1; tester2 [sex] sex 2 NA::a not applicable not applicable NA 9 sex m sex NA
spiders spiders0 cat cat tester1; tester2 [spiders] spiders 2 0 spiders 0 spiders 0 NA 0 spiders 0 spiders NA
spiders spiders1 cat cat tester1; tester2 [spiders] spiders 2 1 spiders 1 spiders 1 NA 1 spiders 1 spiders NA
spiders spiders_NA::b cat cat tester1; tester2 [spiders] spiders 2 NA::b missing missing NA else spiders 0 spiders NA
spiders spiders_NA::a cat cat tester1; tester2 [spiders] spiders 2 NA::a not applicable not applicable NA 9 not applicable spiders NA
stage stage1 cat cat tester1; tester2 [stage] stage 4 1 stage 1 stage 1 NA 1 stage 1 stage NA
stage stage2 cat cat tester1; tester2 [stage] stage 4 2 stage 2 stage 2 NA 2 stage 2 stage NA
stage stage3 cat cat tester1; tester2 [stage] stage 4 3 stage 3 stage 3 NA 3 stage 3 stage NA
stage stage4 cat cat tester1; tester2 [stage] stage 4 4 stage 4 stage 4 NA 4 stage 4 stage NA
stage stage_NA::b cat cat tester1; tester2 [stage] stage 4 NA::b missing missing NA else missing stage NA
stage stage_NA::a cat cat tester1; tester2 [stage] stage 4 NA::a not applicable not applicable NA 9 not applicable stage NA
status status0 cat cat tester1; tester2 [status] status 3 0 status 0 status 0 NA 0 status 0 status NA
status status1 cat cat tester1; tester2 [status] status 3 1 status 1 status 1 NA 1 status 1 status NA
status status2 cat cat tester1; tester2 [status] status 3 2 status 2 status 2 NA 2 status 2 status NA
status status_NA::b cat cat tester1; tester2 [status] status 3 NA::b missing missing NA else status 0 status NA
protime NA cont cont tester1; tester2 [protime] protime NA NA::a not applicable not applicable NA 99 NA protime NA
time NA cont cont tester1; tester2 [time] time NA copy NA NA NA [0,5000] NA time NA
time NA cont cont tester1; tester2 [time] time NA NA::b missing missing NA else NA time NA
time NA cont cont tester1; tester2 [time] time NA NA::a not applicable not applicable NA 9999 NA time NA
trig NA cont cont tester1; tester2 [trig] trig NA copy NA NA NA [0,1000] NA trig NA
trig NA cont cont tester1; tester2 [trig] trig NA NA::b missing missing NA else NA trig NA
status status_NA::a cat cat tester1; tester2 [status] status 3 NA::a not applicable not applicable NA 9 not applicable status NA
trt trt1 cat cat tester1; tester2 [trt] trt 2 1 trt 1 trt 1 NA 1 trt 1 trt NA
trt trt2 cat cat tester1; tester2 [trt] trt 2 2 trt 2 trt 2 NA 2 trt 2 trt NA
trt trt_NA::b cat cat tester1; tester2 [trt] trt 2 NA::b missing missing NA else trt 1 trt NA
trt trt_NA::a cat cat tester1; tester2 [trt] trt 2 NA::a not applicable not applicable NA 9 not applicable trt NA
trig NA cont cont tester1; tester2 [trig] trig NA NA::a missing missing NA 9999 NA trig NA
example_der NA cont cont tester1; tester2 DerivedVar::[chol, bili] example_der NA Func::example_der_fun N/A N/A NA else N/A example_der A test derived variable
agegrp10 agegrp10_cat6_1 cat cat tester2 tester2::agegrp grouped age 6 1 20-29 20-29 years 1 20-29 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester2 tester2::agegrp grouped age 6 2 30-39 30-39 years 2 30-39 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester2 tester2::agegrp grouped age 6 3 40-49 40-49 years 3 40-49 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester2 tester2::agegrp grouped age 6 4 50-59 50-59 years 4 50-59 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester2 tester2::agegrp grouped age 6 5 60-69 60-69 years 5 60-69 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester2 tester2::agegrp grouped age 6 6 70-79 70-79 years 6 70-79 grouped age NA
agegrp10 agegrp10_cat6_NA::b cat cat tester2 tester2::agegrp grouped age 6 NA::b missing missing years else missing grouped age NA
agegrp5 agegrp5_cat11_1 cat cat tester1 tester1::agegrp grouped age 11 1 25-29 25-29 years 1 20-29 grouped age NA
agegrp5 agegrp5_cat11_2 cat cat tester1 tester1::agegrp grouped age 11 2 30-34 30-34 years 2 30-39 grouped age NA
agegrp5 agegrp5_cat11_3 cat cat tester1 tester1::agegrp grouped age 11 3 35-39 35-39 years 3 30-39 grouped age NA
agegrp5 agegrp5_cat11_4 cat cat tester1 tester1::agegrp grouped age 11 4 40-44 40-44 years 4 40-49 grouped age NA
agegrp5 agegrp5_cat11_5 cat cat tester1 tester1::agegrp grouped age 11 5 45-49 45-49 years 5 40-49 grouped age NA
agegrp5 agegrp5_cat11_6 cat cat tester1 tester1::agegrp grouped age 11 6 50-54 50-54 years 6 50-59 grouped age NA
agegrp5 agegrp5_cat11_7 cat cat tester1 tester1::agegrp grouped age 11 7 55-59 55-59 years 7 50-59 grouped age NA
agegrp5 agegrp5_cat11_8 cat cat tester1 tester1::agegrp grouped age 11 8 60-64 60-64 years 8 60-69 grouped age NA
agegrp5 agegrp5_cat11_9 cat cat tester1 tester1::agegrp grouped age 11 9 65-69 65-69 years 9 60-69 grouped age NA
agegrp5 agegrp5_cat11_10 cat cat tester1 tester1::agegrp grouped age 11 10 70-74 70-74 years 10 70-79 grouped age NA
agegrp5 agegrp5_cat11_11 cat cat tester1 tester1::agegrp grouped age 11 11 75-79 75-79 years 11 70-79 grouped age NA
agegrp5 agegrp5_cat11_NA::b cat cat tester1 tester1::agegrp grouped age 11 Na::b missing missing years else missing grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 27 NA NA years 1 20-29 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 32 NA NA years 2 30-39 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 37 NA NA years 3 30-39 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 42 NA NA years 4 40-49 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 47 NA NA years 5 40-49 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 52 NA NA years 6 50-59 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 57 NA NA years 7 50-59 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 62 NA NA years 8 60-69 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 67 NA NA years 9 60-69 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 72 NA NA years 10 70-79 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 77 NA NA years 11 70-79 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA NA::b NA NA years else missing grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 25 NA NA years 1 20-29 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 35 NA NA years 2 30-39 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 45 NA NA years 3 40-49 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 55 NA NA years 4 50-59 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 65 NA NA years 5 60-69 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 75 NA NA years 6 70-79 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age 6 NA::b NA NA years else missing grouped age NA
agegrp10 agegrp10_cat6_1 cat cat tester1 tester1::agegrp grouped age 6 1 20-29 20-29 years 1 20-29 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester1 tester1::agegrp grouped age 6 2 30-39 30-39 years 2 30-39 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester1 tester1::agegrp grouped age 6 2 30-39 30-39 years 3 30-39 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester1 tester1::agegrp grouped age 6 3 40-49 40-49 years 4 40-49 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester1 tester1::agegrp grouped age 6 3 40-49 40-49 years 5 40-49 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester1 tester1::agegrp grouped age 6 4 50-59 50-59 years 6 50-59 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester1 tester1::agegrp grouped age 6 4 50-59 50-59 years 7 50-59 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester1 tester1::agegrp grouped age 6 5 60-69 60-69 years 8 60-69 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester1 tester1::agegrp grouped age 6 5 60-69 60-69 years 9 60-69 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester1 tester1::agegrp grouped age 6 6 70-79 70-79 years 10 70-79 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester1 tester1::agegrp grouped age 6 6 70-79 70-79 years 11 70-79 grouped age NA
agegrp10 agegrp10_cat6_NA::b cat cat tester1 tester1::agegrp grouped age 6 NA::b missing missing years else missing grouped age NA
  1. units: indicates the unit of measure for the variable. The histologic stage of disease does not have a units of measurement.

Write “N/A” in all six rows.

variable dummyVariable typeEnd typeStart databaseStart variableStart variableStartLabel numValidCat recEnd catLabel catLabelLong units recStart catStartLabel variableStartShortLabel notes
age NA cont cont tester1; tester2 [age] age NA copy NA NA NA [20,80] NA age NA
age NA cont cont tester1; tester2 [age] age NA NA::b missing missing NA else NA age NA
age NA cont cont tester1; tester2 [age] age NA NA::a not applicable not applicable NA 999 NA age NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA copy NA NA NA [1,5] NA albumin NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA NA::b missing missing NA else NA albumin NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA NA::a not applicable not applicable NA 99 NA albumin NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA copy NA NA NA [200,15000] NA alk.phos NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA NA::b missing missing NA else NA alk.phos NA
ascites ascites_cat3_1 cat cat tester1; tester2 [ascites] ascites 2 0 ascites 0 ascites 0 NA 0 ascites 0 ascites NA
ascites ascites_cat3_2 cat cat tester1; tester2 [ascites] ascites 2 1 ascites 1 ascites 1 NA 1 ascites 1 ascites NA
ascites ascites_cat3_NA::b cat cat tester1; tester2 [ascites] ascites 2 NA::b missing missing NA else ascites 0 ascites NA
ascites ascites_cat3_NA::a cat cat tester1; tester2 [ascites] ascites 2 NA::a not applicable not applicable NA 9 not applicable NA NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA NA::a not applicable not applicable NA 99999 NA alk.phos NA
ast NA cont cont tester1; tester2 [ast] ast NA copy NA NA NA [20,500] NA ast NA
ast NA cont cont tester1; tester2 [ast] ast NA NA::b missing missing NA else NA ast NA
ast NA cont cont tester1; tester2 [ast] ast NA NA::a not applicable not applicable NA 9999 NA ast NA
bili NA cont cont tester1; tester2 [bili] bili NA copy NA NA NA [0,100] NA bili NA
bili NA cont cont tester1; tester2 [bili] bili NA NA::b missing missing NA else NA bili NA
chol NA cont cont tester1; tester2 [chol] chol NA copy NA NA NA [100,2000] NA chol NA
chol NA cont cont tester1; tester2 [chol] chol NA NA::b missing missing NA else NA chol NA
chol NA cont cont tester1; tester2 [chol] chol NA NA::a missing missing NA 9999 NA chol NA
copper NA cont cont tester1; tester2 [copper] copper NA copy NA NA NA [0,1000] NA copper NA
copper NA cont cont tester1; tester2 [copper] copper NA NA::b missing missing NA else NA copper NA
edema edema_cat3_1 cat cat tester1; tester2 [edema] edema 3 0 edema 0.0 edema 0.0 NA 0 edema 0.0 edema NA
edema edema_cat3_2 cat cat tester1; tester2 [edema] edema 3 0.5 edema 0.5 edema 0.5 NA 0.5 edema 0.5 edema NA
edema edema_cat3_3 cat cat tester1; tester2 [edema] edema 3 1 edema 1.0 edema 1.0 NA 1 edema 1.0 edema NA
edema edema_cat3_NA::b cat cat tester1; tester2 [edema] edema 3 NA::b missing missing NA else missing edema NA
edema edema_cat3_NA::a cat cat tester1; tester2 [edema] edema 3 NA::a not applicable not applicable NA 9 not applicable edema NA
hepato heapto_cat3_1 cat cat tester1; tester2 [hepato] hepato 2 0 hepato 0 hepato 0 NA 0 hepato 0 hepato NA
hepato heapto_cat3_1 cat cat tester1; tester2 [hepato] hepato 2 1 hepato 1 hepato 1 NA 1 hepato 1 hepato NA
hepato heapto_cat3_NA::a cat cat tester1; tester2 [hepato] hepato 2 NA::b missing missing NA else missing hepato NA
copper NA cont cont tester1; tester2 [copper] copper NA NA::a missing missing NA 9999 NA copper NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA copy NA NA NA [0,1000] NA platelet NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA NA::b missing missing NA else NA platelet NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA NA::a not applicable not applicable NA 9999 NA platelet NA
protime NA cont cont tester1; tester2 [protime] protime NA copy NA NA NA [5, 30] NA protime NA
protime NA cont cont tester1; tester2 [protime] protime NA NA::b missing missing NA else NA protime NA
hepato heapto_cat3_NA::b cat cat tester1; tester2 [hepato] hepato 2 NA::a not applicable not applicable NA 9 not applicable hepato NA
sex sex_cat2_1 cat cat tester1; tester2 [sex] sex 2 m sex m sex m NA m sex m sex NA
sex sex_cat2_2 cat cat tester1; tester2 [sex] sex 2 f sex f sex f NA f sex f sex NA
sex sex_cat2_NA::b cat cat tester1; tester2 [sex] sex 2 NA::b missing missing NA else sex m sex NA
sex sex_cat2_NA::a cat cat tester1; tester2 [sex] sex 2 NA::a not applicable not applicable NA 9 sex m sex NA
spiders spiders0 cat cat tester1; tester2 [spiders] spiders 2 0 spiders 0 spiders 0 NA 0 spiders 0 spiders NA
spiders spiders1 cat cat tester1; tester2 [spiders] spiders 2 1 spiders 1 spiders 1 NA 1 spiders 1 spiders NA
spiders spiders_NA::b cat cat tester1; tester2 [spiders] spiders 2 NA::b missing missing NA else spiders 0 spiders NA
spiders spiders_NA::a cat cat tester1; tester2 [spiders] spiders 2 NA::a not applicable not applicable NA 9 not applicable spiders NA
stage stage1 cat cat tester1; tester2 [stage] stage 4 1 stage 1 stage 1 NA 1 stage 1 stage NA
stage stage2 cat cat tester1; tester2 [stage] stage 4 2 stage 2 stage 2 NA 2 stage 2 stage NA
stage stage3 cat cat tester1; tester2 [stage] stage 4 3 stage 3 stage 3 NA 3 stage 3 stage NA
stage stage4 cat cat tester1; tester2 [stage] stage 4 4 stage 4 stage 4 NA 4 stage 4 stage NA
stage stage_NA::b cat cat tester1; tester2 [stage] stage 4 NA::b missing missing NA else missing stage NA
stage stage_NA::a cat cat tester1; tester2 [stage] stage 4 NA::a not applicable not applicable NA 9 not applicable stage NA
status status0 cat cat tester1; tester2 [status] status 3 0 status 0 status 0 NA 0 status 0 status NA
status status1 cat cat tester1; tester2 [status] status 3 1 status 1 status 1 NA 1 status 1 status NA
status status2 cat cat tester1; tester2 [status] status 3 2 status 2 status 2 NA 2 status 2 status NA
status status_NA::b cat cat tester1; tester2 [status] status 3 NA::b missing missing NA else status 0 status NA
protime NA cont cont tester1; tester2 [protime] protime NA NA::a not applicable not applicable NA 99 NA protime NA
time NA cont cont tester1; tester2 [time] time NA copy NA NA NA [0,5000] NA time NA
time NA cont cont tester1; tester2 [time] time NA NA::b missing missing NA else NA time NA
time NA cont cont tester1; tester2 [time] time NA NA::a not applicable not applicable NA 9999 NA time NA
trig NA cont cont tester1; tester2 [trig] trig NA copy NA NA NA [0,1000] NA trig NA
trig NA cont cont tester1; tester2 [trig] trig NA NA::b missing missing NA else NA trig NA
status status_NA::a cat cat tester1; tester2 [status] status 3 NA::a not applicable not applicable NA 9 not applicable status NA
trt trt1 cat cat tester1; tester2 [trt] trt 2 1 trt 1 trt 1 NA 1 trt 1 trt NA
trt trt2 cat cat tester1; tester2 [trt] trt 2 2 trt 2 trt 2 NA 2 trt 2 trt NA
trt trt_NA::b cat cat tester1; tester2 [trt] trt 2 NA::b missing missing NA else trt 1 trt NA
trt trt_NA::a cat cat tester1; tester2 [trt] trt 2 NA::a not applicable not applicable NA 9 not applicable trt NA
trig NA cont cont tester1; tester2 [trig] trig NA NA::a missing missing NA 9999 NA trig NA
example_der NA cont cont tester1; tester2 DerivedVar::[chol, bili] example_der NA Func::example_der_fun N/A N/A NA else N/A example_der A test derived variable
agegrp10 agegrp10_cat6_1 cat cat tester2 tester2::agegrp grouped age 6 1 20-29 20-29 years 1 20-29 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester2 tester2::agegrp grouped age 6 2 30-39 30-39 years 2 30-39 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester2 tester2::agegrp grouped age 6 3 40-49 40-49 years 3 40-49 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester2 tester2::agegrp grouped age 6 4 50-59 50-59 years 4 50-59 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester2 tester2::agegrp grouped age 6 5 60-69 60-69 years 5 60-69 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester2 tester2::agegrp grouped age 6 6 70-79 70-79 years 6 70-79 grouped age NA
agegrp10 agegrp10_cat6_NA::b cat cat tester2 tester2::agegrp grouped age 6 NA::b missing missing years else missing grouped age NA
agegrp5 agegrp5_cat11_1 cat cat tester1 tester1::agegrp grouped age 11 1 25-29 25-29 years 1 20-29 grouped age NA
agegrp5 agegrp5_cat11_2 cat cat tester1 tester1::agegrp grouped age 11 2 30-34 30-34 years 2 30-39 grouped age NA
agegrp5 agegrp5_cat11_3 cat cat tester1 tester1::agegrp grouped age 11 3 35-39 35-39 years 3 30-39 grouped age NA
agegrp5 agegrp5_cat11_4 cat cat tester1 tester1::agegrp grouped age 11 4 40-44 40-44 years 4 40-49 grouped age NA
agegrp5 agegrp5_cat11_5 cat cat tester1 tester1::agegrp grouped age 11 5 45-49 45-49 years 5 40-49 grouped age NA
agegrp5 agegrp5_cat11_6 cat cat tester1 tester1::agegrp grouped age 11 6 50-54 50-54 years 6 50-59 grouped age NA
agegrp5 agegrp5_cat11_7 cat cat tester1 tester1::agegrp grouped age 11 7 55-59 55-59 years 7 50-59 grouped age NA
agegrp5 agegrp5_cat11_8 cat cat tester1 tester1::agegrp grouped age 11 8 60-64 60-64 years 8 60-69 grouped age NA
agegrp5 agegrp5_cat11_9 cat cat tester1 tester1::agegrp grouped age 11 9 65-69 65-69 years 9 60-69 grouped age NA
agegrp5 agegrp5_cat11_10 cat cat tester1 tester1::agegrp grouped age 11 10 70-74 70-74 years 10 70-79 grouped age NA
agegrp5 agegrp5_cat11_11 cat cat tester1 tester1::agegrp grouped age 11 11 75-79 75-79 years 11 70-79 grouped age NA
agegrp5 agegrp5_cat11_NA::b cat cat tester1 tester1::agegrp grouped age 11 Na::b missing missing years else missing grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 27 NA NA years 1 20-29 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 32 NA NA years 2 30-39 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 37 NA NA years 3 30-39 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 42 NA NA years 4 40-49 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 47 NA NA years 5 40-49 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 52 NA NA years 6 50-59 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 57 NA NA years 7 50-59 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 62 NA NA years 8 60-69 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 67 NA NA years 9 60-69 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 72 NA NA years 10 70-79 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 77 NA NA years 11 70-79 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA NA::b NA NA years else missing grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 25 NA NA years 1 20-29 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 35 NA NA years 2 30-39 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 45 NA NA years 3 40-49 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 55 NA NA years 4 50-59 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 65 NA NA years 5 60-69 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 75 NA NA years 6 70-79 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age 6 NA::b NA NA years else missing grouped age NA
agegrp10 agegrp10_cat6_1 cat cat tester1 tester1::agegrp grouped age 6 1 20-29 20-29 years 1 20-29 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester1 tester1::agegrp grouped age 6 2 30-39 30-39 years 2 30-39 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester1 tester1::agegrp grouped age 6 2 30-39 30-39 years 3 30-39 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester1 tester1::agegrp grouped age 6 3 40-49 40-49 years 4 40-49 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester1 tester1::agegrp grouped age 6 3 40-49 40-49 years 5 40-49 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester1 tester1::agegrp grouped age 6 4 50-59 50-59 years 6 50-59 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester1 tester1::agegrp grouped age 6 4 50-59 50-59 years 7 50-59 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester1 tester1::agegrp grouped age 6 5 60-69 60-69 years 8 60-69 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester1 tester1::agegrp grouped age 6 5 60-69 60-69 years 9 60-69 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester1 tester1::agegrp grouped age 6 6 70-79 70-79 years 10 70-79 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester1 tester1::agegrp grouped age 6 6 70-79 70-79 years 11 70-79 grouped age NA
agegrp10 agegrp10_cat6_NA::b cat cat tester1 tester1::agegrp grouped age 6 NA::b missing missing years else missing grouped age NA
  1. recStart: indicates the category(ies) from which you are recoding each row. Since we are not combining levels of categories and we are keeping the category levels the same, the recStart column will be identical to recEnd. If multiple categories were being combined into a single category, the original categories would be indicated in square brackets, separated by commas.

Write the category level you are recoding each row too. For the not applicable rows NA::a is written. For the missing and else rows NA::b is written.

variable dummyVariable typeEnd typeStart databaseStart variableStart variableStartLabel numValidCat recEnd catLabel catLabelLong units recStart catStartLabel variableStartShortLabel notes
age NA cont cont tester1; tester2 [age] age NA copy NA NA NA [20,80] NA age NA
age NA cont cont tester1; tester2 [age] age NA NA::b missing missing NA else NA age NA
age NA cont cont tester1; tester2 [age] age NA NA::a not applicable not applicable NA 999 NA age NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA copy NA NA NA [1,5] NA albumin NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA NA::b missing missing NA else NA albumin NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA NA::a not applicable not applicable NA 99 NA albumin NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA copy NA NA NA [200,15000] NA alk.phos NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA NA::b missing missing NA else NA alk.phos NA
ascites ascites_cat3_1 cat cat tester1; tester2 [ascites] ascites 2 0 ascites 0 ascites 0 NA 0 ascites 0 ascites NA
ascites ascites_cat3_2 cat cat tester1; tester2 [ascites] ascites 2 1 ascites 1 ascites 1 NA 1 ascites 1 ascites NA
ascites ascites_cat3_NA::b cat cat tester1; tester2 [ascites] ascites 2 NA::b missing missing NA else ascites 0 ascites NA
ascites ascites_cat3_NA::a cat cat tester1; tester2 [ascites] ascites 2 NA::a not applicable not applicable NA 9 not applicable NA NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA NA::a not applicable not applicable NA 99999 NA alk.phos NA
ast NA cont cont tester1; tester2 [ast] ast NA copy NA NA NA [20,500] NA ast NA
ast NA cont cont tester1; tester2 [ast] ast NA NA::b missing missing NA else NA ast NA
ast NA cont cont tester1; tester2 [ast] ast NA NA::a not applicable not applicable NA 9999 NA ast NA
bili NA cont cont tester1; tester2 [bili] bili NA copy NA NA NA [0,100] NA bili NA
bili NA cont cont tester1; tester2 [bili] bili NA NA::b missing missing NA else NA bili NA
chol NA cont cont tester1; tester2 [chol] chol NA copy NA NA NA [100,2000] NA chol NA
chol NA cont cont tester1; tester2 [chol] chol NA NA::b missing missing NA else NA chol NA
chol NA cont cont tester1; tester2 [chol] chol NA NA::a missing missing NA 9999 NA chol NA
copper NA cont cont tester1; tester2 [copper] copper NA copy NA NA NA [0,1000] NA copper NA
copper NA cont cont tester1; tester2 [copper] copper NA NA::b missing missing NA else NA copper NA
edema edema_cat3_1 cat cat tester1; tester2 [edema] edema 3 0 edema 0.0 edema 0.0 NA 0 edema 0.0 edema NA
edema edema_cat3_2 cat cat tester1; tester2 [edema] edema 3 0.5 edema 0.5 edema 0.5 NA 0.5 edema 0.5 edema NA
edema edema_cat3_3 cat cat tester1; tester2 [edema] edema 3 1 edema 1.0 edema 1.0 NA 1 edema 1.0 edema NA
edema edema_cat3_NA::b cat cat tester1; tester2 [edema] edema 3 NA::b missing missing NA else missing edema NA
edema edema_cat3_NA::a cat cat tester1; tester2 [edema] edema 3 NA::a not applicable not applicable NA 9 not applicable edema NA
hepato heapto_cat3_1 cat cat tester1; tester2 [hepato] hepato 2 0 hepato 0 hepato 0 NA 0 hepato 0 hepato NA
hepato heapto_cat3_1 cat cat tester1; tester2 [hepato] hepato 2 1 hepato 1 hepato 1 NA 1 hepato 1 hepato NA
hepato heapto_cat3_NA::a cat cat tester1; tester2 [hepato] hepato 2 NA::b missing missing NA else missing hepato NA
copper NA cont cont tester1; tester2 [copper] copper NA NA::a missing missing NA 9999 NA copper NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA copy NA NA NA [0,1000] NA platelet NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA NA::b missing missing NA else NA platelet NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA NA::a not applicable not applicable NA 9999 NA platelet NA
protime NA cont cont tester1; tester2 [protime] protime NA copy NA NA NA [5, 30] NA protime NA
protime NA cont cont tester1; tester2 [protime] protime NA NA::b missing missing NA else NA protime NA
hepato heapto_cat3_NA::b cat cat tester1; tester2 [hepato] hepato 2 NA::a not applicable not applicable NA 9 not applicable hepato NA
sex sex_cat2_1 cat cat tester1; tester2 [sex] sex 2 m sex m sex m NA m sex m sex NA
sex sex_cat2_2 cat cat tester1; tester2 [sex] sex 2 f sex f sex f NA f sex f sex NA
sex sex_cat2_NA::b cat cat tester1; tester2 [sex] sex 2 NA::b missing missing NA else sex m sex NA
sex sex_cat2_NA::a cat cat tester1; tester2 [sex] sex 2 NA::a not applicable not applicable NA 9 sex m sex NA
spiders spiders0 cat cat tester1; tester2 [spiders] spiders 2 0 spiders 0 spiders 0 NA 0 spiders 0 spiders NA
spiders spiders1 cat cat tester1; tester2 [spiders] spiders 2 1 spiders 1 spiders 1 NA 1 spiders 1 spiders NA
spiders spiders_NA::b cat cat tester1; tester2 [spiders] spiders 2 NA::b missing missing NA else spiders 0 spiders NA
spiders spiders_NA::a cat cat tester1; tester2 [spiders] spiders 2 NA::a not applicable not applicable NA 9 not applicable spiders NA
stage stage1 cat cat tester1; tester2 [stage] stage 4 1 stage 1 stage 1 NA 1 stage 1 stage NA
stage stage2 cat cat tester1; tester2 [stage] stage 4 2 stage 2 stage 2 NA 2 stage 2 stage NA
stage stage3 cat cat tester1; tester2 [stage] stage 4 3 stage 3 stage 3 NA 3 stage 3 stage NA
stage stage4 cat cat tester1; tester2 [stage] stage 4 4 stage 4 stage 4 NA 4 stage 4 stage NA
stage stage_NA::b cat cat tester1; tester2 [stage] stage 4 NA::b missing missing NA else missing stage NA
stage stage_NA::a cat cat tester1; tester2 [stage] stage 4 NA::a not applicable not applicable NA 9 not applicable stage NA
status status0 cat cat tester1; tester2 [status] status 3 0 status 0 status 0 NA 0 status 0 status NA
status status1 cat cat tester1; tester2 [status] status 3 1 status 1 status 1 NA 1 status 1 status NA
status status2 cat cat tester1; tester2 [status] status 3 2 status 2 status 2 NA 2 status 2 status NA
status status_NA::b cat cat tester1; tester2 [status] status 3 NA::b missing missing NA else status 0 status NA
protime NA cont cont tester1; tester2 [protime] protime NA NA::a not applicable not applicable NA 99 NA protime NA
time NA cont cont tester1; tester2 [time] time NA copy NA NA NA [0,5000] NA time NA
time NA cont cont tester1; tester2 [time] time NA NA::b missing missing NA else NA time NA
time NA cont cont tester1; tester2 [time] time NA NA::a not applicable not applicable NA 9999 NA time NA
trig NA cont cont tester1; tester2 [trig] trig NA copy NA NA NA [0,1000] NA trig NA
trig NA cont cont tester1; tester2 [trig] trig NA NA::b missing missing NA else NA trig NA
status status_NA::a cat cat tester1; tester2 [status] status 3 NA::a not applicable not applicable NA 9 not applicable status NA
trt trt1 cat cat tester1; tester2 [trt] trt 2 1 trt 1 trt 1 NA 1 trt 1 trt NA
trt trt2 cat cat tester1; tester2 [trt] trt 2 2 trt 2 trt 2 NA 2 trt 2 trt NA
trt trt_NA::b cat cat tester1; tester2 [trt] trt 2 NA::b missing missing NA else trt 1 trt NA
trt trt_NA::a cat cat tester1; tester2 [trt] trt 2 NA::a not applicable not applicable NA 9 not applicable trt NA
trig NA cont cont tester1; tester2 [trig] trig NA NA::a missing missing NA 9999 NA trig NA
example_der NA cont cont tester1; tester2 DerivedVar::[chol, bili] example_der NA Func::example_der_fun N/A N/A NA else N/A example_der A test derived variable
agegrp10 agegrp10_cat6_1 cat cat tester2 tester2::agegrp grouped age 6 1 20-29 20-29 years 1 20-29 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester2 tester2::agegrp grouped age 6 2 30-39 30-39 years 2 30-39 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester2 tester2::agegrp grouped age 6 3 40-49 40-49 years 3 40-49 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester2 tester2::agegrp grouped age 6 4 50-59 50-59 years 4 50-59 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester2 tester2::agegrp grouped age 6 5 60-69 60-69 years 5 60-69 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester2 tester2::agegrp grouped age 6 6 70-79 70-79 years 6 70-79 grouped age NA
agegrp10 agegrp10_cat6_NA::b cat cat tester2 tester2::agegrp grouped age 6 NA::b missing missing years else missing grouped age NA
agegrp5 agegrp5_cat11_1 cat cat tester1 tester1::agegrp grouped age 11 1 25-29 25-29 years 1 20-29 grouped age NA
agegrp5 agegrp5_cat11_2 cat cat tester1 tester1::agegrp grouped age 11 2 30-34 30-34 years 2 30-39 grouped age NA
agegrp5 agegrp5_cat11_3 cat cat tester1 tester1::agegrp grouped age 11 3 35-39 35-39 years 3 30-39 grouped age NA
agegrp5 agegrp5_cat11_4 cat cat tester1 tester1::agegrp grouped age 11 4 40-44 40-44 years 4 40-49 grouped age NA
agegrp5 agegrp5_cat11_5 cat cat tester1 tester1::agegrp grouped age 11 5 45-49 45-49 years 5 40-49 grouped age NA
agegrp5 agegrp5_cat11_6 cat cat tester1 tester1::agegrp grouped age 11 6 50-54 50-54 years 6 50-59 grouped age NA
agegrp5 agegrp5_cat11_7 cat cat tester1 tester1::agegrp grouped age 11 7 55-59 55-59 years 7 50-59 grouped age NA
agegrp5 agegrp5_cat11_8 cat cat tester1 tester1::agegrp grouped age 11 8 60-64 60-64 years 8 60-69 grouped age NA
agegrp5 agegrp5_cat11_9 cat cat tester1 tester1::agegrp grouped age 11 9 65-69 65-69 years 9 60-69 grouped age NA
agegrp5 agegrp5_cat11_10 cat cat tester1 tester1::agegrp grouped age 11 10 70-74 70-74 years 10 70-79 grouped age NA
agegrp5 agegrp5_cat11_11 cat cat tester1 tester1::agegrp grouped age 11 11 75-79 75-79 years 11 70-79 grouped age NA
agegrp5 agegrp5_cat11_NA::b cat cat tester1 tester1::agegrp grouped age 11 Na::b missing missing years else missing grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 27 NA NA years 1 20-29 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 32 NA NA years 2 30-39 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 37 NA NA years 3 30-39 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 42 NA NA years 4 40-49 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 47 NA NA years 5 40-49 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 52 NA NA years 6 50-59 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 57 NA NA years 7 50-59 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 62 NA NA years 8 60-69 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 67 NA NA years 9 60-69 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 72 NA NA years 10 70-79 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 77 NA NA years 11 70-79 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA NA::b NA NA years else missing grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 25 NA NA years 1 20-29 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 35 NA NA years 2 30-39 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 45 NA NA years 3 40-49 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 55 NA NA years 4 50-59 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 65 NA NA years 5 60-69 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 75 NA NA years 6 70-79 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age 6 NA::b NA NA years else missing grouped age NA
agegrp10 agegrp10_cat6_1 cat cat tester1 tester1::agegrp grouped age 6 1 20-29 20-29 years 1 20-29 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester1 tester1::agegrp grouped age 6 2 30-39 30-39 years 2 30-39 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester1 tester1::agegrp grouped age 6 2 30-39 30-39 years 3 30-39 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester1 tester1::agegrp grouped age 6 3 40-49 40-49 years 4 40-49 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester1 tester1::agegrp grouped age 6 3 40-49 40-49 years 5 40-49 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester1 tester1::agegrp grouped age 6 4 50-59 50-59 years 6 50-59 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester1 tester1::agegrp grouped age 6 4 50-59 50-59 years 7 50-59 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester1 tester1::agegrp grouped age 6 5 60-69 60-69 years 8 60-69 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester1 tester1::agegrp grouped age 6 5 60-69 60-69 years 9 60-69 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester1 tester1::agegrp grouped age 6 6 70-79 70-79 years 10 70-79 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester1 tester1::agegrp grouped age 6 6 70-79 70-79 years 11 70-79 grouped age NA
agegrp10 agegrp10_cat6_NA::b cat cat tester1 tester1::agegrp grouped age 6 NA::b missing missing years else missing grouped age NA
  1. catStartLabel: indicates the original variable category label. The stage label should be identical to what is shown in the original data documentation. For the missing rows, each missing category is described along with their coded values.

Write Stage 1, Stage 2, Stage 3, Stage 4, NA, and missing.

variable dummyVariable typeEnd typeStart databaseStart variableStart variableStartLabel numValidCat recEnd catLabel catLabelLong units recStart catStartLabel variableStartShortLabel notes
age NA cont cont tester1; tester2 [age] age NA copy NA NA NA [20,80] NA age NA
age NA cont cont tester1; tester2 [age] age NA NA::b missing missing NA else NA age NA
age NA cont cont tester1; tester2 [age] age NA NA::a not applicable not applicable NA 999 NA age NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA copy NA NA NA [1,5] NA albumin NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA NA::b missing missing NA else NA albumin NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA NA::a not applicable not applicable NA 99 NA albumin NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA copy NA NA NA [200,15000] NA alk.phos NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA NA::b missing missing NA else NA alk.phos NA
ascites ascites_cat3_1 cat cat tester1; tester2 [ascites] ascites 2 0 ascites 0 ascites 0 NA 0 ascites 0 ascites NA
ascites ascites_cat3_2 cat cat tester1; tester2 [ascites] ascites 2 1 ascites 1 ascites 1 NA 1 ascites 1 ascites NA
ascites ascites_cat3_NA::b cat cat tester1; tester2 [ascites] ascites 2 NA::b missing missing NA else ascites 0 ascites NA
ascites ascites_cat3_NA::a cat cat tester1; tester2 [ascites] ascites 2 NA::a not applicable not applicable NA 9 not applicable NA NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA NA::a not applicable not applicable NA 99999 NA alk.phos NA
ast NA cont cont tester1; tester2 [ast] ast NA copy NA NA NA [20,500] NA ast NA
ast NA cont cont tester1; tester2 [ast] ast NA NA::b missing missing NA else NA ast NA
ast NA cont cont tester1; tester2 [ast] ast NA NA::a not applicable not applicable NA 9999 NA ast NA
bili NA cont cont tester1; tester2 [bili] bili NA copy NA NA NA [0,100] NA bili NA
bili NA cont cont tester1; tester2 [bili] bili NA NA::b missing missing NA else NA bili NA
chol NA cont cont tester1; tester2 [chol] chol NA copy NA NA NA [100,2000] NA chol NA
chol NA cont cont tester1; tester2 [chol] chol NA NA::b missing missing NA else NA chol NA
chol NA cont cont tester1; tester2 [chol] chol NA NA::a missing missing NA 9999 NA chol NA
copper NA cont cont tester1; tester2 [copper] copper NA copy NA NA NA [0,1000] NA copper NA
copper NA cont cont tester1; tester2 [copper] copper NA NA::b missing missing NA else NA copper NA
edema edema_cat3_1 cat cat tester1; tester2 [edema] edema 3 0 edema 0.0 edema 0.0 NA 0 edema 0.0 edema NA
edema edema_cat3_2 cat cat tester1; tester2 [edema] edema 3 0.5 edema 0.5 edema 0.5 NA 0.5 edema 0.5 edema NA
edema edema_cat3_3 cat cat tester1; tester2 [edema] edema 3 1 edema 1.0 edema 1.0 NA 1 edema 1.0 edema NA
edema edema_cat3_NA::b cat cat tester1; tester2 [edema] edema 3 NA::b missing missing NA else missing edema NA
edema edema_cat3_NA::a cat cat tester1; tester2 [edema] edema 3 NA::a not applicable not applicable NA 9 not applicable edema NA
hepato heapto_cat3_1 cat cat tester1; tester2 [hepato] hepato 2 0 hepato 0 hepato 0 NA 0 hepato 0 hepato NA
hepato heapto_cat3_1 cat cat tester1; tester2 [hepato] hepato 2 1 hepato 1 hepato 1 NA 1 hepato 1 hepato NA
hepato heapto_cat3_NA::a cat cat tester1; tester2 [hepato] hepato 2 NA::b missing missing NA else missing hepato NA
copper NA cont cont tester1; tester2 [copper] copper NA NA::a missing missing NA 9999 NA copper NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA copy NA NA NA [0,1000] NA platelet NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA NA::b missing missing NA else NA platelet NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA NA::a not applicable not applicable NA 9999 NA platelet NA
protime NA cont cont tester1; tester2 [protime] protime NA copy NA NA NA [5, 30] NA protime NA
protime NA cont cont tester1; tester2 [protime] protime NA NA::b missing missing NA else NA protime NA
hepato heapto_cat3_NA::b cat cat tester1; tester2 [hepato] hepato 2 NA::a not applicable not applicable NA 9 not applicable hepato NA
sex sex_cat2_1 cat cat tester1; tester2 [sex] sex 2 m sex m sex m NA m sex m sex NA
sex sex_cat2_2 cat cat tester1; tester2 [sex] sex 2 f sex f sex f NA f sex f sex NA
sex sex_cat2_NA::b cat cat tester1; tester2 [sex] sex 2 NA::b missing missing NA else sex m sex NA
sex sex_cat2_NA::a cat cat tester1; tester2 [sex] sex 2 NA::a not applicable not applicable NA 9 sex m sex NA
spiders spiders0 cat cat tester1; tester2 [spiders] spiders 2 0 spiders 0 spiders 0 NA 0 spiders 0 spiders NA
spiders spiders1 cat cat tester1; tester2 [spiders] spiders 2 1 spiders 1 spiders 1 NA 1 spiders 1 spiders NA
spiders spiders_NA::b cat cat tester1; tester2 [spiders] spiders 2 NA::b missing missing NA else spiders 0 spiders NA
spiders spiders_NA::a cat cat tester1; tester2 [spiders] spiders 2 NA::a not applicable not applicable NA 9 not applicable spiders NA
stage stage1 cat cat tester1; tester2 [stage] stage 4 1 stage 1 stage 1 NA 1 stage 1 stage NA
stage stage2 cat cat tester1; tester2 [stage] stage 4 2 stage 2 stage 2 NA 2 stage 2 stage NA
stage stage3 cat cat tester1; tester2 [stage] stage 4 3 stage 3 stage 3 NA 3 stage 3 stage NA
stage stage4 cat cat tester1; tester2 [stage] stage 4 4 stage 4 stage 4 NA 4 stage 4 stage NA
stage stage_NA::b cat cat tester1; tester2 [stage] stage 4 NA::b missing missing NA else missing stage NA
stage stage_NA::a cat cat tester1; tester2 [stage] stage 4 NA::a not applicable not applicable NA 9 not applicable stage NA
status status0 cat cat tester1; tester2 [status] status 3 0 status 0 status 0 NA 0 status 0 status NA
status status1 cat cat tester1; tester2 [status] status 3 1 status 1 status 1 NA 1 status 1 status NA
status status2 cat cat tester1; tester2 [status] status 3 2 status 2 status 2 NA 2 status 2 status NA
status status_NA::b cat cat tester1; tester2 [status] status 3 NA::b missing missing NA else status 0 status NA
protime NA cont cont tester1; tester2 [protime] protime NA NA::a not applicable not applicable NA 99 NA protime NA
time NA cont cont tester1; tester2 [time] time NA copy NA NA NA [0,5000] NA time NA
time NA cont cont tester1; tester2 [time] time NA NA::b missing missing NA else NA time NA
time NA cont cont tester1; tester2 [time] time NA NA::a not applicable not applicable NA 9999 NA time NA
trig NA cont cont tester1; tester2 [trig] trig NA copy NA NA NA [0,1000] NA trig NA
trig NA cont cont tester1; tester2 [trig] trig NA NA::b missing missing NA else NA trig NA
status status_NA::a cat cat tester1; tester2 [status] status 3 NA::a not applicable not applicable NA 9 not applicable status NA
trt trt1 cat cat tester1; tester2 [trt] trt 2 1 trt 1 trt 1 NA 1 trt 1 trt NA
trt trt2 cat cat tester1; tester2 [trt] trt 2 2 trt 2 trt 2 NA 2 trt 2 trt NA
trt trt_NA::b cat cat tester1; tester2 [trt] trt 2 NA::b missing missing NA else trt 1 trt NA
trt trt_NA::a cat cat tester1; tester2 [trt] trt 2 NA::a not applicable not applicable NA 9 not applicable trt NA
trig NA cont cont tester1; tester2 [trig] trig NA NA::a missing missing NA 9999 NA trig NA
example_der NA cont cont tester1; tester2 DerivedVar::[chol, bili] example_der NA Func::example_der_fun N/A N/A NA else N/A example_der A test derived variable
agegrp10 agegrp10_cat6_1 cat cat tester2 tester2::agegrp grouped age 6 1 20-29 20-29 years 1 20-29 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester2 tester2::agegrp grouped age 6 2 30-39 30-39 years 2 30-39 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester2 tester2::agegrp grouped age 6 3 40-49 40-49 years 3 40-49 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester2 tester2::agegrp grouped age 6 4 50-59 50-59 years 4 50-59 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester2 tester2::agegrp grouped age 6 5 60-69 60-69 years 5 60-69 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester2 tester2::agegrp grouped age 6 6 70-79 70-79 years 6 70-79 grouped age NA
agegrp10 agegrp10_cat6_NA::b cat cat tester2 tester2::agegrp grouped age 6 NA::b missing missing years else missing grouped age NA
agegrp5 agegrp5_cat11_1 cat cat tester1 tester1::agegrp grouped age 11 1 25-29 25-29 years 1 20-29 grouped age NA
agegrp5 agegrp5_cat11_2 cat cat tester1 tester1::agegrp grouped age 11 2 30-34 30-34 years 2 30-39 grouped age NA
agegrp5 agegrp5_cat11_3 cat cat tester1 tester1::agegrp grouped age 11 3 35-39 35-39 years 3 30-39 grouped age NA
agegrp5 agegrp5_cat11_4 cat cat tester1 tester1::agegrp grouped age 11 4 40-44 40-44 years 4 40-49 grouped age NA
agegrp5 agegrp5_cat11_5 cat cat tester1 tester1::agegrp grouped age 11 5 45-49 45-49 years 5 40-49 grouped age NA
agegrp5 agegrp5_cat11_6 cat cat tester1 tester1::agegrp grouped age 11 6 50-54 50-54 years 6 50-59 grouped age NA
agegrp5 agegrp5_cat11_7 cat cat tester1 tester1::agegrp grouped age 11 7 55-59 55-59 years 7 50-59 grouped age NA
agegrp5 agegrp5_cat11_8 cat cat tester1 tester1::agegrp grouped age 11 8 60-64 60-64 years 8 60-69 grouped age NA
agegrp5 agegrp5_cat11_9 cat cat tester1 tester1::agegrp grouped age 11 9 65-69 65-69 years 9 60-69 grouped age NA
agegrp5 agegrp5_cat11_10 cat cat tester1 tester1::agegrp grouped age 11 10 70-74 70-74 years 10 70-79 grouped age NA
agegrp5 agegrp5_cat11_11 cat cat tester1 tester1::agegrp grouped age 11 11 75-79 75-79 years 11 70-79 grouped age NA
agegrp5 agegrp5_cat11_NA::b cat cat tester1 tester1::agegrp grouped age 11 Na::b missing missing years else missing grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 27 NA NA years 1 20-29 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 32 NA NA years 2 30-39 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 37 NA NA years 3 30-39 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 42 NA NA years 4 40-49 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 47 NA NA years 5 40-49 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 52 NA NA years 6 50-59 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 57 NA NA years 7 50-59 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 62 NA NA years 8 60-69 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 67 NA NA years 9 60-69 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 72 NA NA years 10 70-79 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 77 NA NA years 11 70-79 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA NA::b NA NA years else missing grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 25 NA NA years 1 20-29 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 35 NA NA years 2 30-39 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 45 NA NA years 3 40-49 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 55 NA NA years 4 50-59 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 65 NA NA years 5 60-69 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 75 NA NA years 6 70-79 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age 6 NA::b NA NA years else missing grouped age NA
agegrp10 agegrp10_cat6_1 cat cat tester1 tester1::agegrp grouped age 6 1 20-29 20-29 years 1 20-29 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester1 tester1::agegrp grouped age 6 2 30-39 30-39 years 2 30-39 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester1 tester1::agegrp grouped age 6 2 30-39 30-39 years 3 30-39 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester1 tester1::agegrp grouped age 6 3 40-49 40-49 years 4 40-49 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester1 tester1::agegrp grouped age 6 3 40-49 40-49 years 5 40-49 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester1 tester1::agegrp grouped age 6 4 50-59 50-59 years 6 50-59 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester1 tester1::agegrp grouped age 6 4 50-59 50-59 years 7 50-59 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester1 tester1::agegrp grouped age 6 5 60-69 60-69 years 8 60-69 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester1 tester1::agegrp grouped age 6 5 60-69 60-69 years 9 60-69 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester1 tester1::agegrp grouped age 6 6 70-79 70-79 years 10 70-79 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester1 tester1::agegrp grouped age 6 6 70-79 70-79 years 11 70-79 grouped age NA
agegrp10 agegrp10_cat6_NA::b cat cat tester1 tester1::agegrp grouped age 6 NA::b missing missing years else missing grouped age NA
  1. notes: Capture any important differences in a variable across datasets. For our example, there are no differences across datasets.

Write “This is sample survival pbc data” in all six rows.

variable dummyVariable typeEnd typeStart databaseStart variableStart variableStartLabel numValidCat recEnd catLabel catLabelLong units recStart catStartLabel variableStartShortLabel notes
age NA cont cont tester1; tester2 [age] age NA copy NA NA NA [20,80] NA age NA
age NA cont cont tester1; tester2 [age] age NA NA::b missing missing NA else NA age NA
age NA cont cont tester1; tester2 [age] age NA NA::a not applicable not applicable NA 999 NA age NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA copy NA NA NA [1,5] NA albumin NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA NA::b missing missing NA else NA albumin NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA NA::a not applicable not applicable NA 99 NA albumin NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA copy NA NA NA [200,15000] NA alk.phos NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA NA::b missing missing NA else NA alk.phos NA
ascites ascites_cat3_1 cat cat tester1; tester2 [ascites] ascites 2 0 ascites 0 ascites 0 NA 0 ascites 0 ascites NA
ascites ascites_cat3_2 cat cat tester1; tester2 [ascites] ascites 2 1 ascites 1 ascites 1 NA 1 ascites 1 ascites NA
ascites ascites_cat3_NA::b cat cat tester1; tester2 [ascites] ascites 2 NA::b missing missing NA else ascites 0 ascites NA
ascites ascites_cat3_NA::a cat cat tester1; tester2 [ascites] ascites 2 NA::a not applicable not applicable NA 9 not applicable NA NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA NA::a not applicable not applicable NA 99999 NA alk.phos NA
ast NA cont cont tester1; tester2 [ast] ast NA copy NA NA NA [20,500] NA ast NA
ast NA cont cont tester1; tester2 [ast] ast NA NA::b missing missing NA else NA ast NA
ast NA cont cont tester1; tester2 [ast] ast NA NA::a not applicable not applicable NA 9999 NA ast NA
bili NA cont cont tester1; tester2 [bili] bili NA copy NA NA NA [0,100] NA bili NA
bili NA cont cont tester1; tester2 [bili] bili NA NA::b missing missing NA else NA bili NA
chol NA cont cont tester1; tester2 [chol] chol NA copy NA NA NA [100,2000] NA chol NA
chol NA cont cont tester1; tester2 [chol] chol NA NA::b missing missing NA else NA chol NA
chol NA cont cont tester1; tester2 [chol] chol NA NA::a missing missing NA 9999 NA chol NA
copper NA cont cont tester1; tester2 [copper] copper NA copy NA NA NA [0,1000] NA copper NA
copper NA cont cont tester1; tester2 [copper] copper NA NA::b missing missing NA else NA copper NA
edema edema_cat3_1 cat cat tester1; tester2 [edema] edema 3 0 edema 0.0 edema 0.0 NA 0 edema 0.0 edema NA
edema edema_cat3_2 cat cat tester1; tester2 [edema] edema 3 0.5 edema 0.5 edema 0.5 NA 0.5 edema 0.5 edema NA
edema edema_cat3_3 cat cat tester1; tester2 [edema] edema 3 1 edema 1.0 edema 1.0 NA 1 edema 1.0 edema NA
edema edema_cat3_NA::b cat cat tester1; tester2 [edema] edema 3 NA::b missing missing NA else missing edema NA
edema edema_cat3_NA::a cat cat tester1; tester2 [edema] edema 3 NA::a not applicable not applicable NA 9 not applicable edema NA
hepato heapto_cat3_1 cat cat tester1; tester2 [hepato] hepato 2 0 hepato 0 hepato 0 NA 0 hepato 0 hepato NA
hepato heapto_cat3_1 cat cat tester1; tester2 [hepato] hepato 2 1 hepato 1 hepato 1 NA 1 hepato 1 hepato NA
hepato heapto_cat3_NA::a cat cat tester1; tester2 [hepato] hepato 2 NA::b missing missing NA else missing hepato NA
copper NA cont cont tester1; tester2 [copper] copper NA NA::a missing missing NA 9999 NA copper NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA copy NA NA NA [0,1000] NA platelet NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA NA::b missing missing NA else NA platelet NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA NA::a not applicable not applicable NA 9999 NA platelet NA
protime NA cont cont tester1; tester2 [protime] protime NA copy NA NA NA [5, 30] NA protime NA
protime NA cont cont tester1; tester2 [protime] protime NA NA::b missing missing NA else NA protime NA
hepato heapto_cat3_NA::b cat cat tester1; tester2 [hepato] hepato 2 NA::a not applicable not applicable NA 9 not applicable hepato NA
sex sex_cat2_1 cat cat tester1; tester2 [sex] sex 2 m sex m sex m NA m sex m sex NA
sex sex_cat2_2 cat cat tester1; tester2 [sex] sex 2 f sex f sex f NA f sex f sex NA
sex sex_cat2_NA::b cat cat tester1; tester2 [sex] sex 2 NA::b missing missing NA else sex m sex NA
sex sex_cat2_NA::a cat cat tester1; tester2 [sex] sex 2 NA::a not applicable not applicable NA 9 sex m sex NA
spiders spiders0 cat cat tester1; tester2 [spiders] spiders 2 0 spiders 0 spiders 0 NA 0 spiders 0 spiders NA
spiders spiders1 cat cat tester1; tester2 [spiders] spiders 2 1 spiders 1 spiders 1 NA 1 spiders 1 spiders NA
spiders spiders_NA::b cat cat tester1; tester2 [spiders] spiders 2 NA::b missing missing NA else spiders 0 spiders NA
spiders spiders_NA::a cat cat tester1; tester2 [spiders] spiders 2 NA::a not applicable not applicable NA 9 not applicable spiders NA
stage stage1 cat cat tester1; tester2 [stage] stage 4 1 stage 1 stage 1 NA 1 stage 1 stage NA
stage stage2 cat cat tester1; tester2 [stage] stage 4 2 stage 2 stage 2 NA 2 stage 2 stage NA
stage stage3 cat cat tester1; tester2 [stage] stage 4 3 stage 3 stage 3 NA 3 stage 3 stage NA
stage stage4 cat cat tester1; tester2 [stage] stage 4 4 stage 4 stage 4 NA 4 stage 4 stage NA
stage stage_NA::b cat cat tester1; tester2 [stage] stage 4 NA::b missing missing NA else missing stage NA
stage stage_NA::a cat cat tester1; tester2 [stage] stage 4 NA::a not applicable not applicable NA 9 not applicable stage NA
status status0 cat cat tester1; tester2 [status] status 3 0 status 0 status 0 NA 0 status 0 status NA
status status1 cat cat tester1; tester2 [status] status 3 1 status 1 status 1 NA 1 status 1 status NA
status status2 cat cat tester1; tester2 [status] status 3 2 status 2 status 2 NA 2 status 2 status NA
status status_NA::b cat cat tester1; tester2 [status] status 3 NA::b missing missing NA else status 0 status NA
protime NA cont cont tester1; tester2 [protime] protime NA NA::a not applicable not applicable NA 99 NA protime NA
time NA cont cont tester1; tester2 [time] time NA copy NA NA NA [0,5000] NA time NA
time NA cont cont tester1; tester2 [time] time NA NA::b missing missing NA else NA time NA
time NA cont cont tester1; tester2 [time] time NA NA::a not applicable not applicable NA 9999 NA time NA
trig NA cont cont tester1; tester2 [trig] trig NA copy NA NA NA [0,1000] NA trig NA
trig NA cont cont tester1; tester2 [trig] trig NA NA::b missing missing NA else NA trig NA
status status_NA::a cat cat tester1; tester2 [status] status 3 NA::a not applicable not applicable NA 9 not applicable status NA
trt trt1 cat cat tester1; tester2 [trt] trt 2 1 trt 1 trt 1 NA 1 trt 1 trt NA
trt trt2 cat cat tester1; tester2 [trt] trt 2 2 trt 2 trt 2 NA 2 trt 2 trt NA
trt trt_NA::b cat cat tester1; tester2 [trt] trt 2 NA::b missing missing NA else trt 1 trt NA
trt trt_NA::a cat cat tester1; tester2 [trt] trt 2 NA::a not applicable not applicable NA 9 not applicable trt NA
trig NA cont cont tester1; tester2 [trig] trig NA NA::a missing missing NA 9999 NA trig NA
example_der NA cont cont tester1; tester2 DerivedVar::[chol, bili] example_der NA Func::example_der_fun N/A N/A NA else N/A example_der A test derived variable
agegrp10 agegrp10_cat6_1 cat cat tester2 tester2::agegrp grouped age 6 1 20-29 20-29 years 1 20-29 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester2 tester2::agegrp grouped age 6 2 30-39 30-39 years 2 30-39 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester2 tester2::agegrp grouped age 6 3 40-49 40-49 years 3 40-49 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester2 tester2::agegrp grouped age 6 4 50-59 50-59 years 4 50-59 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester2 tester2::agegrp grouped age 6 5 60-69 60-69 years 5 60-69 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester2 tester2::agegrp grouped age 6 6 70-79 70-79 years 6 70-79 grouped age NA
agegrp10 agegrp10_cat6_NA::b cat cat tester2 tester2::agegrp grouped age 6 NA::b missing missing years else missing grouped age NA
agegrp5 agegrp5_cat11_1 cat cat tester1 tester1::agegrp grouped age 11 1 25-29 25-29 years 1 20-29 grouped age NA
agegrp5 agegrp5_cat11_2 cat cat tester1 tester1::agegrp grouped age 11 2 30-34 30-34 years 2 30-39 grouped age NA
agegrp5 agegrp5_cat11_3 cat cat tester1 tester1::agegrp grouped age 11 3 35-39 35-39 years 3 30-39 grouped age NA
agegrp5 agegrp5_cat11_4 cat cat tester1 tester1::agegrp grouped age 11 4 40-44 40-44 years 4 40-49 grouped age NA
agegrp5 agegrp5_cat11_5 cat cat tester1 tester1::agegrp grouped age 11 5 45-49 45-49 years 5 40-49 grouped age NA
agegrp5 agegrp5_cat11_6 cat cat tester1 tester1::agegrp grouped age 11 6 50-54 50-54 years 6 50-59 grouped age NA
agegrp5 agegrp5_cat11_7 cat cat tester1 tester1::agegrp grouped age 11 7 55-59 55-59 years 7 50-59 grouped age NA
agegrp5 agegrp5_cat11_8 cat cat tester1 tester1::agegrp grouped age 11 8 60-64 60-64 years 8 60-69 grouped age NA
agegrp5 agegrp5_cat11_9 cat cat tester1 tester1::agegrp grouped age 11 9 65-69 65-69 years 9 60-69 grouped age NA
agegrp5 agegrp5_cat11_10 cat cat tester1 tester1::agegrp grouped age 11 10 70-74 70-74 years 10 70-79 grouped age NA
agegrp5 agegrp5_cat11_11 cat cat tester1 tester1::agegrp grouped age 11 11 75-79 75-79 years 11 70-79 grouped age NA
agegrp5 agegrp5_cat11_NA::b cat cat tester1 tester1::agegrp grouped age 11 Na::b missing missing years else missing grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 27 NA NA years 1 20-29 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 32 NA NA years 2 30-39 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 37 NA NA years 3 30-39 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 42 NA NA years 4 40-49 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 47 NA NA years 5 40-49 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 52 NA NA years 6 50-59 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 57 NA NA years 7 50-59 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 62 NA NA years 8 60-69 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 67 NA NA years 9 60-69 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 72 NA NA years 10 70-79 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 77 NA NA years 11 70-79 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA NA::b NA NA years else missing grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 25 NA NA years 1 20-29 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 35 NA NA years 2 30-39 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 45 NA NA years 3 40-49 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 55 NA NA years 4 50-59 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 65 NA NA years 5 60-69 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 75 NA NA years 6 70-79 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age 6 NA::b NA NA years else missing grouped age NA
agegrp10 agegrp10_cat6_1 cat cat tester1 tester1::agegrp grouped age 6 1 20-29 20-29 years 1 20-29 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester1 tester1::agegrp grouped age 6 2 30-39 30-39 years 2 30-39 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester1 tester1::agegrp grouped age 6 2 30-39 30-39 years 3 30-39 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester1 tester1::agegrp grouped age 6 3 40-49 40-49 years 4 40-49 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester1 tester1::agegrp grouped age 6 3 40-49 40-49 years 5 40-49 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester1 tester1::agegrp grouped age 6 4 50-59 50-59 years 6 50-59 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester1 tester1::agegrp grouped age 6 4 50-59 50-59 years 7 50-59 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester1 tester1::agegrp grouped age 6 5 60-69 60-69 years 8 60-69 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester1 tester1::agegrp grouped age 6 5 60-69 60-69 years 9 60-69 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester1 tester1::agegrp grouped age 6 6 70-79 70-79 years 10 70-79 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester1 tester1::agegrp grouped age 6 6 70-79 70-79 years 11 70-79 grouped age NA
agegrp10 agegrp10_cat6_NA::b cat cat tester1 tester1::agegrp grouped age 6 NA::b missing missing years else missing grouped age NA

variable_details for dervived variables

The same naming convention applies to derived variables with the exception of two columns:

  1. In variableStart, instead of database names being listed, DerivedVar:: is written followed with the list of original variables used inside square brackets.
  • DerivedVar::[var1, var2, var3]
  1. In recEnd, write Func:: followed with the exact name of the custom function used to create the derived variable.
  • Func::derivedFunction

A derived variable looks like this in variable_details.csv

variable dummyVariable typeEnd typeStart databaseStart variableStart variableStartLabel numValidCat recEnd catLabel catLabelLong units recStart catStartLabel variableStartShortLabel notes
age NA cont cont tester1; tester2 [age] age NA copy NA NA NA [20,80] NA age NA
age NA cont cont tester1; tester2 [age] age NA NA::b missing missing NA else NA age NA
age NA cont cont tester1; tester2 [age] age NA NA::a not applicable not applicable NA 999 NA age NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA copy NA NA NA [1,5] NA albumin NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA NA::b missing missing NA else NA albumin NA
albumin NA cont cont tester1; tester2 [albumin] albumin NA NA::a not applicable not applicable NA 99 NA albumin NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA copy NA NA NA [200,15000] NA alk.phos NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA NA::b missing missing NA else NA alk.phos NA
ascites ascites_cat3_1 cat cat tester1; tester2 [ascites] ascites 2 0 ascites 0 ascites 0 NA 0 ascites 0 ascites NA
ascites ascites_cat3_2 cat cat tester1; tester2 [ascites] ascites 2 1 ascites 1 ascites 1 NA 1 ascites 1 ascites NA
ascites ascites_cat3_NA::b cat cat tester1; tester2 [ascites] ascites 2 NA::b missing missing NA else ascites 0 ascites NA
ascites ascites_cat3_NA::a cat cat tester1; tester2 [ascites] ascites 2 NA::a not applicable not applicable NA 9 not applicable NA NA
alk.phos NA cont cont tester1; tester2 [alk.phos] alk.phos NA NA::a not applicable not applicable NA 99999 NA alk.phos NA
ast NA cont cont tester1; tester2 [ast] ast NA copy NA NA NA [20,500] NA ast NA
ast NA cont cont tester1; tester2 [ast] ast NA NA::b missing missing NA else NA ast NA
ast NA cont cont tester1; tester2 [ast] ast NA NA::a not applicable not applicable NA 9999 NA ast NA
bili NA cont cont tester1; tester2 [bili] bili NA copy NA NA NA [0,100] NA bili NA
bili NA cont cont tester1; tester2 [bili] bili NA NA::b missing missing NA else NA bili NA
chol NA cont cont tester1; tester2 [chol] chol NA copy NA NA NA [100,2000] NA chol NA
chol NA cont cont tester1; tester2 [chol] chol NA NA::b missing missing NA else NA chol NA
chol NA cont cont tester1; tester2 [chol] chol NA NA::a missing missing NA 9999 NA chol NA
copper NA cont cont tester1; tester2 [copper] copper NA copy NA NA NA [0,1000] NA copper NA
copper NA cont cont tester1; tester2 [copper] copper NA NA::b missing missing NA else NA copper NA
edema edema_cat3_1 cat cat tester1; tester2 [edema] edema 3 0 edema 0.0 edema 0.0 NA 0 edema 0.0 edema NA
edema edema_cat3_2 cat cat tester1; tester2 [edema] edema 3 0.5 edema 0.5 edema 0.5 NA 0.5 edema 0.5 edema NA
edema edema_cat3_3 cat cat tester1; tester2 [edema] edema 3 1 edema 1.0 edema 1.0 NA 1 edema 1.0 edema NA
edema edema_cat3_NA::b cat cat tester1; tester2 [edema] edema 3 NA::b missing missing NA else missing edema NA
edema edema_cat3_NA::a cat cat tester1; tester2 [edema] edema 3 NA::a not applicable not applicable NA 9 not applicable edema NA
hepato heapto_cat3_1 cat cat tester1; tester2 [hepato] hepato 2 0 hepato 0 hepato 0 NA 0 hepato 0 hepato NA
hepato heapto_cat3_1 cat cat tester1; tester2 [hepato] hepato 2 1 hepato 1 hepato 1 NA 1 hepato 1 hepato NA
hepato heapto_cat3_NA::a cat cat tester1; tester2 [hepato] hepato 2 NA::b missing missing NA else missing hepato NA
copper NA cont cont tester1; tester2 [copper] copper NA NA::a missing missing NA 9999 NA copper NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA copy NA NA NA [0,1000] NA platelet NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA NA::b missing missing NA else NA platelet NA
platelet NA cont cont tester1; tester2 [platelet] platelet NA NA::a not applicable not applicable NA 9999 NA platelet NA
protime NA cont cont tester1; tester2 [protime] protime NA copy NA NA NA [5, 30] NA protime NA
protime NA cont cont tester1; tester2 [protime] protime NA NA::b missing missing NA else NA protime NA
hepato heapto_cat3_NA::b cat cat tester1; tester2 [hepato] hepato 2 NA::a not applicable not applicable NA 9 not applicable hepato NA
sex sex_cat2_1 cat cat tester1; tester2 [sex] sex 2 m sex m sex m NA m sex m sex NA
sex sex_cat2_2 cat cat tester1; tester2 [sex] sex 2 f sex f sex f NA f sex f sex NA
sex sex_cat2_NA::b cat cat tester1; tester2 [sex] sex 2 NA::b missing missing NA else sex m sex NA
sex sex_cat2_NA::a cat cat tester1; tester2 [sex] sex 2 NA::a not applicable not applicable NA 9 sex m sex NA
spiders spiders0 cat cat tester1; tester2 [spiders] spiders 2 0 spiders 0 spiders 0 NA 0 spiders 0 spiders NA
spiders spiders1 cat cat tester1; tester2 [spiders] spiders 2 1 spiders 1 spiders 1 NA 1 spiders 1 spiders NA
spiders spiders_NA::b cat cat tester1; tester2 [spiders] spiders 2 NA::b missing missing NA else spiders 0 spiders NA
spiders spiders_NA::a cat cat tester1; tester2 [spiders] spiders 2 NA::a not applicable not applicable NA 9 not applicable spiders NA
stage stage1 cat cat tester1; tester2 [stage] stage 4 1 stage 1 stage 1 NA 1 stage 1 stage NA
stage stage2 cat cat tester1; tester2 [stage] stage 4 2 stage 2 stage 2 NA 2 stage 2 stage NA
stage stage3 cat cat tester1; tester2 [stage] stage 4 3 stage 3 stage 3 NA 3 stage 3 stage NA
stage stage4 cat cat tester1; tester2 [stage] stage 4 4 stage 4 stage 4 NA 4 stage 4 stage NA
stage stage_NA::b cat cat tester1; tester2 [stage] stage 4 NA::b missing missing NA else missing stage NA
stage stage_NA::a cat cat tester1; tester2 [stage] stage 4 NA::a not applicable not applicable NA 9 not applicable stage NA
status status0 cat cat tester1; tester2 [status] status 3 0 status 0 status 0 NA 0 status 0 status NA
status status1 cat cat tester1; tester2 [status] status 3 1 status 1 status 1 NA 1 status 1 status NA
status status2 cat cat tester1; tester2 [status] status 3 2 status 2 status 2 NA 2 status 2 status NA
status status_NA::b cat cat tester1; tester2 [status] status 3 NA::b missing missing NA else status 0 status NA
protime NA cont cont tester1; tester2 [protime] protime NA NA::a not applicable not applicable NA 99 NA protime NA
time NA cont cont tester1; tester2 [time] time NA copy NA NA NA [0,5000] NA time NA
time NA cont cont tester1; tester2 [time] time NA NA::b missing missing NA else NA time NA
time NA cont cont tester1; tester2 [time] time NA NA::a not applicable not applicable NA 9999 NA time NA
trig NA cont cont tester1; tester2 [trig] trig NA copy NA NA NA [0,1000] NA trig NA
trig NA cont cont tester1; tester2 [trig] trig NA NA::b missing missing NA else NA trig NA
status status_NA::a cat cat tester1; tester2 [status] status 3 NA::a not applicable not applicable NA 9 not applicable status NA
trt trt1 cat cat tester1; tester2 [trt] trt 2 1 trt 1 trt 1 NA 1 trt 1 trt NA
trt trt2 cat cat tester1; tester2 [trt] trt 2 2 trt 2 trt 2 NA 2 trt 2 trt NA
trt trt_NA::b cat cat tester1; tester2 [trt] trt 2 NA::b missing missing NA else trt 1 trt NA
trt trt_NA::a cat cat tester1; tester2 [trt] trt 2 NA::a not applicable not applicable NA 9 not applicable trt NA
trig NA cont cont tester1; tester2 [trig] trig NA NA::a missing missing NA 9999 NA trig NA
example_der NA cont cont tester1; tester2 DerivedVar::[chol, bili] example_der NA Func::example_der_fun N/A N/A NA else N/A example_der A test derived variable
agegrp10 agegrp10_cat6_1 cat cat tester2 tester2::agegrp grouped age 6 1 20-29 20-29 years 1 20-29 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester2 tester2::agegrp grouped age 6 2 30-39 30-39 years 2 30-39 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester2 tester2::agegrp grouped age 6 3 40-49 40-49 years 3 40-49 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester2 tester2::agegrp grouped age 6 4 50-59 50-59 years 4 50-59 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester2 tester2::agegrp grouped age 6 5 60-69 60-69 years 5 60-69 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester2 tester2::agegrp grouped age 6 6 70-79 70-79 years 6 70-79 grouped age NA
agegrp10 agegrp10_cat6_NA::b cat cat tester2 tester2::agegrp grouped age 6 NA::b missing missing years else missing grouped age NA
agegrp5 agegrp5_cat11_1 cat cat tester1 tester1::agegrp grouped age 11 1 25-29 25-29 years 1 20-29 grouped age NA
agegrp5 agegrp5_cat11_2 cat cat tester1 tester1::agegrp grouped age 11 2 30-34 30-34 years 2 30-39 grouped age NA
agegrp5 agegrp5_cat11_3 cat cat tester1 tester1::agegrp grouped age 11 3 35-39 35-39 years 3 30-39 grouped age NA
agegrp5 agegrp5_cat11_4 cat cat tester1 tester1::agegrp grouped age 11 4 40-44 40-44 years 4 40-49 grouped age NA
agegrp5 agegrp5_cat11_5 cat cat tester1 tester1::agegrp grouped age 11 5 45-49 45-49 years 5 40-49 grouped age NA
agegrp5 agegrp5_cat11_6 cat cat tester1 tester1::agegrp grouped age 11 6 50-54 50-54 years 6 50-59 grouped age NA
agegrp5 agegrp5_cat11_7 cat cat tester1 tester1::agegrp grouped age 11 7 55-59 55-59 years 7 50-59 grouped age NA
agegrp5 agegrp5_cat11_8 cat cat tester1 tester1::agegrp grouped age 11 8 60-64 60-64 years 8 60-69 grouped age NA
agegrp5 agegrp5_cat11_9 cat cat tester1 tester1::agegrp grouped age 11 9 65-69 65-69 years 9 60-69 grouped age NA
agegrp5 agegrp5_cat11_10 cat cat tester1 tester1::agegrp grouped age 11 10 70-74 70-74 years 10 70-79 grouped age NA
agegrp5 agegrp5_cat11_11 cat cat tester1 tester1::agegrp grouped age 11 11 75-79 75-79 years 11 70-79 grouped age NA
agegrp5 agegrp5_cat11_NA::b cat cat tester1 tester1::agegrp grouped age 11 Na::b missing missing years else missing grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 27 NA NA years 1 20-29 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 32 NA NA years 2 30-39 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 37 NA NA years 3 30-39 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 42 NA NA years 4 40-49 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 47 NA NA years 5 40-49 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 52 NA NA years 6 50-59 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 57 NA NA years 7 50-59 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 62 NA NA years 8 60-69 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 67 NA NA years 9 60-69 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 72 NA NA years 10 70-79 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA 77 NA NA years 11 70-79 grouped age NA
age_cont NA cont cat tester1 tester1::agegrp grouped age NA NA::b NA NA years else missing grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 25 NA NA years 1 20-29 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 35 NA NA years 2 30-39 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 45 NA NA years 3 40-49 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 55 NA NA years 4 50-59 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 65 NA NA years 5 60-69 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age NA 75 NA NA years 6 70-79 grouped age NA
age_cont NA cont cat tester2 tester2::agegrp grouped age 6 NA::b NA NA years else missing grouped age NA
agegrp10 agegrp10_cat6_1 cat cat tester1 tester1::agegrp grouped age 6 1 20-29 20-29 years 1 20-29 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester1 tester1::agegrp grouped age 6 2 30-39 30-39 years 2 30-39 grouped age NA
agegrp10 agegrp10_cat6_2 cat cat tester1 tester1::agegrp grouped age 6 2 30-39 30-39 years 3 30-39 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester1 tester1::agegrp grouped age 6 3 40-49 40-49 years 4 40-49 grouped age NA
agegrp10 agegrp10_cat6_3 cat cat tester1 tester1::agegrp grouped age 6 3 40-49 40-49 years 5 40-49 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester1 tester1::agegrp grouped age 6 4 50-59 50-59 years 6 50-59 grouped age NA
agegrp10 agegrp10_cat6_4 cat cat tester1 tester1::agegrp grouped age 6 4 50-59 50-59 years 7 50-59 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester1 tester1::agegrp grouped age 6 5 60-69 60-69 years 8 60-69 grouped age NA
agegrp10 agegrp10_cat6_5 cat cat tester1 tester1::agegrp grouped age 6 5 60-69 60-69 years 9 60-69 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester1 tester1::agegrp grouped age 6 6 70-79 70-79 years 10 70-79 grouped age NA
agegrp10 agegrp10_cat6_6 cat cat tester1 tester1::agegrp grouped age 6 6 70-79 70-79 years 11 70-79 grouped age NA
agegrp10 agegrp10_cat6_NA::b cat cat tester1 tester1::agegrp grouped age 6 NA::b missing missing years else missing grouped age NA

How to create the variables worksheet variables

Once mapped and specified on variable_details, the stage variable can be specified on the variables worksheet: variables. Ensure that the names you used in the variable_details worksheet are identical to those listed in variables.

  1. variable: the name of the recoded variable (variable_details worksheet column: ‘variable’)

  2. label: the shorthand label for the variable (variable_details worksheet column: ‘variableStartShortLabel’)

  3. labelLong: a more detailed label for the variable (new column, it is not in the variable_details worksheet)

  4. section: group of data to which the variable belongs (new column, it is not in the variable_details worksheet)

  5. subject: sub-group of data to which the variable belongs (new column, it is not in the variable_details worksheet)

  6. variableType: whether the recoded variable is categorical or continuous (variable_detail worksheet column: ‘typeEnd’)

  7. units: unit of measurement for the variable (variable_detail worksheet column ‘units’)

  8. databaseStart: the list of databases that contain the variable of interest (variable_detail worksheet column: ‘databaseStart’)

  9. variableStart the original variable name (variable_detail worksheet column: ‘variableStart’)

variable label labelLong subject section variableType databaseStart units variableStart notes description
age age in years demographic age cont tester1;tester2 years [age] NA NA
age_cont age_cont continous age created from age groups demographics age cont tester1;tester2 years [agegrp] NA NA
agegrp10 agegrp10 ten year age groups demographics age cat tester2 years [agegrp] NA NA
agegrp5 agegrp5 five year age groups demographics age cat tester1 years tester1::agegrp NA NA
albumin albumin serum albumin lab test albumin cont tester1;tester2 g/dl [albumin] NA NA
alk.phos alk.phos alkaline phosphotase lab test alk.phos cont tester1;tester2 U/L [alk.phos] NA NA
ascites ascites prescence of ascites physical symptom ascites cat tester1;tester2 N/A [ascites] NA NA
ast ast aspartate aminotransferase, once called SGOT lab test ast cont tester1;tester2 U/L [ast] NA NA
bili bili serum bilirunbin lab test bili cont tester1;tester2 mg/dl [bili] NA NA
chol chol serum cholesterol lab test chol cont tester1;tester2 mg/dl [chol] NA NA
copper copper urine copper lab test copper cont tester1;tester2 ug/dl [copper] NA NA
edema edema edema physical symptom edema cat tester1;tester2 N/A [edema] NA NA
example_der example_der example of dervived function: concentration of cholestral * concentration of bilirunbin derived example cont tester1;tester2 mg/dl [example_der] NA NA
hepato hepato prescence of hepatomegaly or enlarged liver physical symptom hepato cat tester1;tester2 N/A [hepato] NA NA
platelet platelet platelet count lab test platelet cont tester1;tester2 N/A [platelet] NA NA
protime protime standarized blood clotting time lab test protime cont tester1;tester2 N/A [protime] NA NA
sex sex sex demographic sex cat tester1;tester2 N/A [sex] NA NA
spiders spiders blood vessel malformations in the skin physical symptom spiders cat tester1;tester2 N/A [spiders] NA NA
stage stage histologic stage of disease (needs biopsy) lab test stage cat tester1;tester2 N/A [stage] NA NA
status status status at endpoint study status cat tester1;tester2 N/A [status] NA NA
time time number of days between registration and the earlier of death,
transplantion, or study analysis in July, 1986 study time cont tester1;tester2 days [time] NA NA
trig trig triglycerides lab test trig cont tester1;tester2 mg/dl [trig] NA NA
trt treatment treatment exposure trt cat tester1;tester2 N/A [trt] NA NA
id case number case number study identifiction ID cont tester1;tester2 N/A [id] NA NA