Help:Templates

From QMRAwiki
Jump to: navigation, search

There are several templates[1] on this wiki that are used to format content, particularly relating to dose response. We have code (written in R) for fitting dose response models; that code outputs appropriate template calls that can be pasted directly into QMRAwiki pages. If a template is changed, the R code must also be changed to avoid errors. All of these templates use named fields (rather than numbered fields). Text that is capitalized must be modified by a human when the template call is pasted into QMRAwiki; it represents necessary information that the R code cannot automatically add.

If you are editing templates, some templates have embedded Semantic Internal Objects, which occur at the end of the template. All text within {{#set_internal|...}} can (and should) be ignored when modifying the template.

When adding a new dose response model page please also add a category tag for the Agent. Use a preexisting one from the subcategory tree if possible. If the agent you wish to add does not exist you may create a new category. Please also tag the page associated with the new category you just created with one of the higher level tags found here.

Presenting data from feeding experiments

Template:DRExperimentDataTable3 formats data from dose response experiments with 3 dose levels. It is actually a family of templates: there are similar templates for each possible number of dose levels (Template:DRExperimentDataTable4, Template:DRExperimentDataTable5, etc.). For example, this code:

{{DRExperimentDataTable3|title=''Ornythorchis sumiomis'' fed to gerbils|refer=Eco 1990|reference=Eco U, 1990. Death in gerbils, mediated by ''O. sumiomis''. ''Journal of Irreproducible Results'' '''24'''(3):123.|pos=death|neg=undeath|d1=10|p1=3|n1=0|t1=3|d2=5|p2=2|n2=1|t2=3|d3=1|p3=1|n3=2|t3=3}} <references/>

yields this formatted output (the detailed formatting info is contained within Template:DRExperimentDataTable3):


Ornythorchis sumiomis fed to gerbils [1]
Dose death undeath Total
10 3 0 3
5 2 1 3
1 1 2 3
  1. Eco U, 1990. Death in gerbils, mediated by O. sumiomis. Journal of Irreproducible Results 24(3):123.

Note that italics (for proper display of scientific names, etc.) must be added manually, like this: ''Italicized text''

This family of templates incorporates citations. It can correctly handle repeated citations, i.e., when two different tables cite the same reference. To do this, the 'refer' field is the short reference name (e.g., Smith 2003), and the 'reference' field is the full reference that you want in the bibliography (e.g., Smith J, 2003. Bacilli I have known, JAMA, 1023(4):2023.). See the Mediawiki Cite extension [2].

Presenting results from fitting dose response models to data from feeding experiments

Template:DRFit presents results from fitting feeding experiment data to the exponential and beta-Poisson dose response models, including an assessment of which model is preferred for those data.

Goodness of fit and model selection
Model Deviance Δ Degrees
of freedom
χ20.95,1
p-value
χ20.95,m-k
p-value
Exponential 2.99 2.98 2 3.84
0.0845
5.99
0.224
Beta Poisson 0.0156 1 3.84
0.901
Exponential is preferred to beta-Poisson; cannot reject good fit for exponential.

Presenting detailed results for a particular model

Template:DRConfidenceExponential presents bootstrapped parameter estimates for the exponential dose response model.

Optimized k parameter for the exponential model, from 500 bootstrap iterations
Parameter MLE estimate Percentiles
0.5% 2.5% 5% 95% 97.5% 99.5%
k 1.22E-08 4.44E-14 2.19E-09 4.40E-09 1.17E-07 1.17E-07 4.03E-07
ID50/LD50/ETC* 5.7E+07 1.72E+06 5.92E+06 5.92E+06 1.58E+08 3.17E+08 2.82E+17
*Not a parameter of the exponential model; however, it facilitates comparison with other models.

Template:DRConfidenceBetaPoisson is very similar; it presents bootstrapped parameter estimates for the beta-Poisson dose response model.

Optimized parameters for the beta-Poisson model, from 500 bootstrap iterations
Parameter MLE estimate Percentiles
0.5% 2.5% 5% 95% 97.5% 99.5%
α 2.13E-01 1.26E-03 3.22E-02 3.82E-02 3.62E+02 1.25E+03 1.25E+03
N50 3.41E+07 2.78E+06 3.47E+06 5.92E+06 1.17E+12 1.01E+14 9.22E+140

Briefly presenting results for several models together in one table

There are a set of templates which are combined to format summary tables of dose response models. Template:DRSummaryTableStart provides the table headings. Template:DRSummaryTablePreferredModel should be called immediately afterwards, and provides the preferred model for a particular agent. It is followed by any number of calls to Template:DRSummaryTableNonpreferredModel, describing other available dose response models for that agent. The table is completed by a call to Template:DRSummaryTableEnd, which has no arguments and adds the final footnote row.

{{DRSummaryTableStart|agent=''Bacillus necromancicum''}}

{{DRSummaryTablePreferredModel|expID=99|refer=Torgerson 2011|reference=Torgerson JL, Hobart IV, (2011) Journal of Postmortem Studies, 34 (13) 1365-1367.|host=zombies, Lugubrious strain|agentStrain=Voldemort Q|route=injected|nDoses=4|doseUnits=CFU|response=reanimation|bestFitModel=exponential|parameters=k = 0.02|N50=37}} {{DRSummaryTableNonpreferredModel|expID=101|refer=Umberto 2012|reference=Umberto UU, Oxnard QT, Rehoboth ILB (2012) Journal of Non-Mundane Behavior, 34 (13), 1365-1563.|host=zombies, strain I56/8|agentStrain=Voldemort A|route=injected|nDoses=6|doseUnits=CFU|response=reanimation|bestFitModel=beta-Poisson|parameters=α = 0.1, N<sub>50</sub> = 100|N50=100}} {{DRSummaryTableEnd}} <references/>


Experiment serial number Reference Host type Agent strain Route # of doses Dose units Response Best fit model Optimized parameter(s) LD50/ID50
99* [1] zombies, Lugubrious strain Voldemort Q injected 4 CFU reanimation exponential k = 0.02 37
101 [2] zombies, strain I56/8 Voldemort A injected 6 CFU reanimation beta-Poisson α = 0.1, N50 = 100 100
*This model is preferred in most circumstances. However, consider all available models to decide which one is most appropriate for your analysis.
  1. Torgerson JL, Hobart IV, (2011) Journal of Postmortem Studies, 34 (13) 1365-1367.
  2. Umberto UU, Oxnard QT, Rehoboth ILB (2012) Journal of Non-Mundane Behavior, 34 (13), 1365-1563.