albatros  R Documentation 
Produces the albatros plot of Harrison et al\loadmathjax
albatros(p, n, axes = list(xlimit = NULL, ylimit = NULL, lefttext = NULL, righttext = NULL), contours = list(type = NULL, contvals = NULL, ltys = NULL, contlabs = NULL), plotpars = list(yscale = NULL, pchs = NULL, cols = NULL), ...) docontours(conttype, xvals, contvals, xtrans, ytrans, xlims, ylims, ltys, contlabs)
p 
A vector of \mjseqnp values 
n 
A vector of sample sizes 
axes 
A list containing

contours 
A list containing

plotpars 
A list containing

... 
Arguments to be passed through to 
conttype 
Character: one of "smd", "or", "corr" 
xvals 
A vector of values to evaluate the contour 
contvals 
The values at which contours are drawn 
xtrans 
A function for transforming the xaxis 
ytrans 
A function for transforming the yaxis 
xlims 
The limits for the xaxis in plotting units 
ylims 
The limits for the yaxis in plottng units 
ltys 
A vector of line types for the contours 
contlabs 
Logical, draw the labels of the contours? 
Plots \mjseqnn against \mjseqnp and draws contours of constant effect size. \insertNoCiteharrison17metap
The \mjseqnp value scale on the xaxis is a logarithmic one
but folded at the null value so that the extreme values represent
small probabilities in each direction.
The scale for the yaxis is user selectable.
The original scale in the Stata version is
\mjeqn(\log_10n)^2log(n, base = 10) ^ 2 which is obtained by
setting yscale
to "classic"
but it is
also possible to use \mjeqn\sqrtnsqrt(n)
which is the default or \mjseqnn by setting
yscale
to "n".
If the dataset contains extreme values the
plot may be uninformative and the xlimit
and ylimit
parameters my be helpful to clip
the plot.
If they are not specified the function tries
to choose suitable values.
For the contours if the type
parameter in contours
is NULL (the default) no contours will be plotted.
The options available are
“smr” (Standardised mean difference)
“corr” (Correlation)
“or” (Odds ratio).
The contours are labelled unless contlabs is set to FALSE
.
The function tries to position these so they are not obscured
by the contour lines but if that is unsatisfactory then
it is best to suppress them and position them manually
or use a legend to identify line types.
The pch
parameter may either be a single value
or a vector of the same length as p
.
It may contain anything which is legal as input to
the parameter of the same name in the graphics
library and will be used for the plotted points.
The cols
parameter works similarly.
The values of lefttext
and righttext
are
used to produce labels under the \mjseqnxaxis and
are placed level with the label.
By default they are not produced.
The return values from the function may be useful if further annotations are required as they give the axis limits in plotting units.
Returns A list containing
xlims 
The limits for the xaxis in plotting units 
ylims 
The limits for the yaxis in plotting units 
The docontours function is for internal use only
Michael Dewey
For plotting parameters
see par
data(dat.metap) validity < dat.metap$validity fit.v < albatros(validity$p, validity$n, contours = list(type = "corr", contvals = c(0.25, 0.5, 0.8), ltys = 1:3), axes = list(ylimit = c(1,200), lefttext = "Negative correlation", righttext = "Positive correlation"), main = "Validity") # fit.z < albatros(dat.metap$zhang$p, dat.metap$zhang$n, contours = list(type = "smd", contvals = c(0.25, 0.5, 1), ltys = 1:3), plotpars = list(pchs = letters[unclass(dat.metap$zhang$phase)]), axes = list(lefttext = "Favours control", righttext = "Favours exercise"), main = "Zhang" )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.