| testset | R Documentation |
A table of dosage texts with gold standard interpretation, used for testing the algorithm.
data(testset)
A data frame with the following 12 variables.
textidnumeric; text identifier
ordernumeric; order of dose line (a single dosage text can generate more than one dose line)
textcharacter; the dosage text
qtynumeric; quantity per dose
unitscharacter; dose units
freqnumeric; dose frequency
totnumeric; total dose per time period
maxfactor with 3 levels: max, average, exact
timenumeric; time interval in number of days
changefactor with 4 levels: first, second, nochange, combined
choicefactor with 3 levels: choice, asneeded, nochoice
durationnumeric; duration of prescription
daily_dosenumeric; dose units per day
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/
testdoseconvert, lookups
# 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')
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.