testset: Testset: Gold Standard Interpreted Drug Dosages for Testing

Description Usage Format References See Also Examples

Description

A table of dosage texts with gold standard interpretation, used for testing the algorithm.

Usage

1

Format

A data frame with the following 12 variables.

textid

numeric; text identifier

order

numeric; order of dose line (a single dosage text can generate more than one dose line)

text

character; the dosage text

qty

numeric; quantity per dose

units

character; dose units

freq

numeric; dose frequency

tot

numeric; total dose per time period

max

factor with 3 levels: max, average, exact

time

numeric; time interval in number of days

change

factor with 4 levels: first, second, nochange, combined

choice

factor with 3 levels: choice, asneeded, nochoice

duration

numeric; duration of prescription

daily_dose

numeric; dose units per day

References

Shah AD, Martinez C. An algorithm to derive a numerical daily dose from unstructured text dosage instructions. Pharmacoepidemiol Drug Saf 2006; 15(3): 161-166. doi: 10.1002/pds.1151 http://onlinelibrary.wiley.com/doi/10.1002/pds.1151/

See Also

testdoseconvert, lookups

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Import the testset table
data("testset")

# Analyse the testset
results <- testdoseconvert(goldstandard = testset)

# Check there are no incorrect results
if (any(results$outcome == 'actual')){
    print(results[outcome == 'actual' | outcome == 'intended'])
    stop('\nError in analysis of test set.\n')
}

CALIBERdrugdose documentation built on May 2, 2019, 6:49 p.m.