Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

dag.letter

Write a DAG node symbol.


Description

Writes the node symbols, 'X' and 'Y' for exposure and outcome, 'C' and 'U' (with consecutive subscripts) for known and unknown covariables. Since v1.1.2, alt.symb allows the use of custom node symbols. Unknownness is identified by either node name 'unknown' or covariable type '2' in the DAG object. Note that adjusted nodes are marked by bar and underline; this currently does not apply to those marked as unknown.

Usage

dag.letter(dag, letter, x, y, alt.symb = TRUE)

Arguments

dag

The DAG for which a node is to be written.

letter

The node that is of interest.

x

X position.

y

Y position.

alt.symb

Boolean indicating if custom symbols (dag$symbols) should be used if available.

Author(s)

Lutz P Breitling <l.breitling@posteo.de>

See Also

Examples

dag2a<-dag.adjust(demo.dag2(), 3);
dag.draw(dag2a, paths=FALSE);
dag.letter(dag2a,  1,  0.2, 1);
dag.letter(dag2a,  2, 0.25, 1);
dag.letter(dag2a,  3,  0.3, 1);
dag.letter(dag2a,  4, 0.35, 1);
dag.letter(dag2a, 13,  0.4, 1);

dagR

R Functions for Directed Acyclic Graphs

v1.2.0
GPL-2
Authors
Lutz P Breitling
Initial release
2021-04-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.