Description Usage Arguments Value Syntax Operations par.label par.start Line breaks Comments Author(s) See Also Examples
Parse equations and return a parameter table (par.table).
The argument eq is a character string
that specifies the associations between the variables.
See Syntax, Operations, par.label,
par.start, Line breaks, and Comments below.
1 | EqParse(eq)
|
eq |
Character string. Equations. See Details. |
Returns a data.frame with the following columns
is the variable on the left-hand side,
is the variable on the right-hand side,
is the operation between lhs and rhs,
is the column of parameter label,
is the column of starting values for estimation
if eq has a fifth colulmn, and
is the column of parameter label
with NAs on fixed parameters.
Each line should follow the syntax below
lhs <space> op <space> rhs <space> par.label <\n> or <;>
is the variable on the left-hand side,
is the variable on the right-hand side,
is the operation between lhs and rhs,
is the column of parameter label,
is the column of starting values for estimation (only for functions that require it), and
are line breaks. Each line should end with a line break.
The associations are defined by the following operations
left-hand side measured by right-hand side,
left-hand side regressed on right-hand side,
left-hand side covarying with right-hand side,
left-hand side regressed on 1 for mean structure.
Each parameter should be labeled.
The par.label should be a number for fixed parameters
and a character string for free parameters.
Equality contraints can be imposed by using the same par.label.
Numerical values as starting values for estimation.
Starting values for fixed parameters should be NA.
Starting values should be identical
for parameters constrained to be equal,
that is, parameters with the same par.label.
The characters \n and ; can be used as line breaks.
Each line should end with a line break.
Comments can be written after a hash (#) sign.
Ivan Jacob Agaloos Pesigan
Other eq functions:
Eq2Expectations(),
Eq2RAM()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | eq <- "
# lhs op rhs par.label
e by y 1
y on x beta
e with e sigmae2
x with x sigmax2
y on 1 alpha
x on 1 mux
"
EqParse(eq)
eq <- "
# lhs op rhs value
e by y 1
y on x 1
e with e 1
x with x 0.25
y on 1 0
x on 1 0.50
"
EqParse(eq)
eq <- "
# lhs op rhs par.label par.start
e by y 1 NA
y on x beta 0.00
e with e sigmae2 1.25
x with x sigmax2 0.25
y on 1 alpha 0.00
x on 1 mux 0.50
"
EqParse(eq)
# \n as line breaks------------------------------------------------
eq <- "
e by y 1 NA \n y on x beta 0.00
e with e sigmae2 1.25 \n x with x sigmax2 0.25
y on 1 alpha 0.00 \n x on 1 mux 0.50
"
EqParse(eq)
# ; as line breaks------------------------------------------------
eq <- "
e by y 1 NA; y on x beta 0.00
e with e sigmae2 1.25; x with x sigmax2 0.25
y on 1 alpha 0.00; x on 1 mux 0.50
"
EqParse(eq)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.