Learn R Programming

umx (version 1.9.1)

umxEval: umxEval

Description

Takes an expression as a string, and evaluates it as an expression in model, optionally computing the result. # TODO umxEval Currently broken... delete submit as update to OpenMx?

Usage

umxEval(expstring, model, compute = FALSE, show = FALSE)

Arguments

expstring

an expression string, i.e, "a + b"

model

an mxModel to evaluate in

compute

Whether to compute the result or not (default = FALSE)

show

Whether to show??? (default = FALSE)

Value

- an openmx algebra (formula)

References

- http://www.github.com/tbates/umx

See Also

Other Misc: umx_APA_model_CI, umx_add_variances, umx_apply, umx_default_option, umx_get_bracket_addresses, umx_object_as_str, umx_string_to_algebra, umx

Examples

Run this code
# NOT RUN {
m1 = mxModel("fit",
	mxMatrix("Full", nrow = 1, ncol = 1, free = TRUE, values = 1, name = "a"), 
	mxMatrix("Full", nrow = 1, ncol = 1, free = TRUE, values = 2, name = "b"), 
	mxAlgebra(a %*% b, name = "ab"), 
	mxConstraint(ab == 35, name = "maxHours"), 
	mxAlgebraObjective(algebra = "ab", numObs= NA, numStats = NA)
)
m1 = mxRun(m1)
mxEval(list(ab = ab), m1)
# }

Run the code above in your browser using DataLab