Title

drmeta_graph -- Plot the estimated dose-response meta-analysis model

Syntax

drmeta_graph [ , dose(numlist) ref(#)
equation(string) matknots(matname) knots(numlist) blup gls level(#) eform
scatter list addplot(string) plotopts(string) twoway_options ]

Description

The drmeta_graph command greatly facilitates the visualization of the estimated dose-response model.
It is a postestimation of the drmeta command.
drmeta_graph plots the average dose-response relationship together with confidence intervals upon
indication of a list of dose/exposure values, a referent, and the types of transformations used
to model the quantitative predictor. It is particularly convenient when modelling the dose
with splines.

Options

matknots(matname) specifies the matrix of knots used to create restricted cubic splines.
This can be easily obtained from the saved results of the mkspline command.

knots(numlist) specifies a list knots used to create the restricted cubic splines.
It is an alternative to the option matknots(matname).

dose(numlist) specifies the values of the dose at which estimate differences in predicted responses.

ref(#) specifies the reference value of the dose (not necessarily included in dose(numlist)).

equation(string) specifies the mathematical transformations of the dose d used in the previously fitted
dose-response model. It is relevant only if the options matknots(matname) or knots(numlist) has not been specified.
Example 1: equation(d) means that the dose was modelled assuming
a linear function. Example 2: equation(d d^2) means that the dose was modelled with a quadratic function.
Example 3: eq(d ln(d)) means that the dose was modelled with d and the natural logarithm of d.

addplot(string) specifies the equation of the model to be plotted in terms of the dose d.
It can be useful to overlay a line/curve on the graph of the previously fitted model.
Example 1: previously fit a spline model and wanted to add a line addplot(b1*(d-10)),
representing the change in predicted outcome relative to the dose value of 10 according to
a linear function.
Example 2: previously fit a linear-response model and wanted to add a curve addplot(b1*(d-10)+b2*(d^2-100)),
representing the change in predicted outcome relative to the dose value of 10 according
to a quadratic function.

plotopts(string) controls the line options affecting the added plot with the option addplot(string).

blup shows conditional study-specific lines arising from the
estimated random-effects model (Best Linear Unbiased Prediction).

gls shows study-specific lines estimated separately using Generalized Least Squares.

eform exponentiate the estimated differences in predicted responses.

list list the estimated differences in predicted responses.

scatter shows a scatter plot rather than a line plot (default).

format(%fmt) specifies the display format for presenting numbers.
format(%3.2f) is the default; see help format.

level(#) specifies a confidence level to use for confidence
intervals. The default is 95%. See help on level.

Examples

* Read data about alcohol consumption and colorectal cancer risk (Orsini et al. AJE 1992)

use http://www.stats4life.se/data/ex_alcohol_crc.dta, clear

* Model 1. One-stage random-effects dose-response model assuming a linear trend

drmeta logrr dose , data(peryears cases) id(study) type(type) se(se) reml

/* Graph the colorectal cancer relative risk as linear function of alcohol consumption
ranging from 0 to 60 (step by 1) grams/day using 10 grams/day as referent. */

drmeta_graph , dose(0(1)60) ref(10) equation(d) list eform

* Model 2. One-stage random-effects dose-response model assuming a quadratic trend

gen dosesq = dose^2
drmeta logrr dose dosesq, data(peryears cases)id(study) type(type) se(se) reml

/* Graph the colorectal cancer relative risk as quadratic function of alcohol consumption
ranging from 0 to 60 (step by 1) grams/day using 10 grams/day as referent. */

drmeta_graph , dose(0(1)60) ref(10) equation(d d^2) eform

* Overlay the linear trend with the previously fit quadratic trend

drmeta_graph , dose(0(1)60) ref(10) equation(d d^2) addplot(.0064376*(d-10)) plotopts(lc(red) lw(thick)) eform

* Model 3. One-stage random-effects dose-response model using restricted cubic splines

mkspline doses = dose, nk(3) cubic
mat knots = r(knots)
drmeta logrr doses1 doses2 , data(peryears cases) id(study) type(type) se(se) reml

/* Graph the colorectal cancer relative risk as function of alcohol consumption
ranging from 0 to 60 (step by 1) grams/day using 10 grams/day as referent.
Passing the matrix of knots allows the command to reconstruct the restricted cubic splines
at the specified values.*/

drmeta_graph , dose(0(1)60) ref(10) matk(knots) eform

* Improve the graph specifying common -twoway- options

`"drmeta_graph , dose(0(1)60) ref(10) matk(knots) eform ytitle("Relative Risk") xtitle("Alcohol consumption, grams/day")"'

* Add conditional study-specific lines (BLUP)

`"drmeta_graph , dose(0(1)60) ref(10) matk(knots) blup eform ytitle("Relative Risk") xtitle("Alcohol consumption, grams/day")"'

* Add study-specific lines estimated separately within each study using GLS

`"drmeta_graph , dose(0(1)60) ref(10) matk(knots) gls eform ytitle("Relative Risk") xtitle("Alcohol consumption, grams/day")"'

* Overlay the quadratic trend with the previously fit spline model

`"drmeta_graph , dose(0(1)60) ref(10) matk(knots) ytitle("Relative Risk") xtitle("Alcohol consumption, grams/day") addplot(-.0015682*(d-10)+.0001636*(d^2-100)) plotopts(lc(red) lw(thick)) eform"'

* Shows a scatter plot rather than a line plot

`"drmeta_graph , dose(0(5)60) ref(10) matk(knots) xlabel(0(5)60, grid) yline(1, lp(-)) ytitle("Relative Risk") xtitle("Alcohol consumption, grams/day") scatter eform"'

Author

Nicola Orsini, Biostatistics Team,
Department of Public Health Sciences, Karolinska Institutet, Sweden

Support

http://www.stats4life.se

nicola.orsini@ki.se

Help: drmeta