[ ] Automate?: Instead of supporting product = "xy", support productVars = c("x", "y") and auto create the xy & x,y -> xy paths with appropriate fixin's so user are not distracted by implementation.
[ ] Add 'product' parameter to the created mxModel.
[ ] include 'product' objects in addition to list of manifests and latents
[ ] Figure out and implement requirements for fixing paths from manifest to operator result objects. (Seems to involve inputs to operators being forced to have mean = 0??)
[ ] Check mean = 0 in vars used to created products?
plot
[ ] Find operator means (currently in M)
[ ] Decide on a graphic representation of the operator node (circle with name= operator?)
[ ] Add to plot vertex and edge list
Example (plane-jane regression with interaction)
p1 = lm(mpg~wt*disp, data = mtcars); umxAPA(p1)
(Intercept) B = 44.08 [37.68, 50.48], t = 14.11, p < 0.001
wt B = -6.5 [-9.19, -3.81], t = -4.95, p < 0.001
disp B = -0.06 [-0.08, -0.03], t = -4.26, p < 0.001
wt:disp B = 0.01 [0.01, 0.02], t = 3.6, p = 0.001
productInputs = c("x", "y")
manifests = c(productInputs, "z")
m1 = umxRAM("testPoV", data = povData, productVars = productInputs,
umxPath(c("x", "y", "xy"), to = "z"),
umxPath(cov= c("x", "y")),
umxPath(v.m. = manifests),
# automatic for the user
# 1. remove auto-named products from the latents list
# 2. (add?) fixed@1 paths from productInputs to product
umxPath(c("x", "y"), to = "xy", fixedAt = 1),
# 2 go back into model and fix means productInputs to zero (having checked they are that)
# model@matrices$means$free, productInputs], FALSE)
)
umxRAM
andplot
xy
& x,y -> xy paths with appropriate fixin's so user are not distracted by implementation.plot
M
)Example (plane-jane regression with interaction)