Learn R Programming

pathdiagram (version 0.1.9.1)

latent: Set specifications of a latent variable

Description

Use this function to specify the graphic characteristics of a latent variable. The specifications will be used by the function draw to plot latent variables (in a path diagram).

Usage

latent(label = "latent", x = 0.5, y = 0.5, rx = 0.05,
    ry = 0.05, border = "white", lwd = 2, fill = "#5f8bd7",
    col = "white", cex = 1, vfont = NULL, font = 2,
    family = "sans")

Arguments

label

A character string with the label to be displayed.

x

x-axis coordinate for center of ellipse.

y

y-axis coordinate for center of ellipse.

rx

long radius of ellipse.

ry

short radius of ellipse.

border

color of the border.

lwd

width of border line.

fill

color to fill the ellipse

col

color of the label.

cex

numeric character expansion of the label.

vfont

font family of the label.

font

An integer specifying which font to use for the label. See par

family

The name of a font family for drawing text. Standard values are "serif", "sans" and "mono".

Value

An object of class "latent", which is a list with the specified parameters to draw latent variables.

Details

Latent variables are drawn as ellipses using the function plotellipse

See Also

manifest, draw

Examples

Run this code
# 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)

 # opwn wall
 wall()
 title("Drawing three latent variables", col.main="gray20")

 # draw variables
 draw(attack)
 draw(defense)
 draw(success)
 
# }

Run the code above in your browser using DataLab