# NOT RUN {
# latent variables
attack = latent("ATTACK", x=0.35, y=0.7, rx=0.08, ry=0.06)
defense = latent("DEFENSE", x=0.35, y=0.3, rx=0.08, ry=0.06)
success = latent("SUCCESS", x=0.65, y=0.5, rx=0.08, ry=0.06)
# open diagram
wall()
# draw latent variables
draw(attack)
draw(defense)
draw(success)
# add arrows
arrow(from=attack, to=success, start="east", end="west")
arrow(from=defense, to=success, start="east", end="west")
# }
Run the code above in your browser using DataLab