Description Usage Arguments Examples
Generic interface to set a value to a link in a lvm.
1 2 3 4 |
x |
a lvm model |
var1 |
the first variable (character) or a formula describing the link |
var2 |
the second variable (character). Only used if var1 is a character. |
value |
the value to which the link should be set |
warnings |
should a warning be displayed when the link is not found in the lvm. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
setLink <- lavaPenalty:::setLink
m <- lvm()
regression(m) <- c(y1,y2,y3)~u
regression(m) <- u~x1+x2
latent(m) <- ~u
covariance(m) <- y1 ~ y2
m1 <- setLink(m, y3 ~ u, value = 1)
estimate(m1, sim(m,1e2))
# m1 <- setLink(m, u ~ y3, value = 1)
m2 <- setLink(m, y1 ~ y2, value = 0.5)
estimate(m2, sim(m,1e2))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.