specify.model {sem} | R Documentation |
Create the RAM specification of a structural equation model.
specify.model(file = "") ## S3 method for class 'mod': print(x, ...)
file |
The (quoted) file from which to read the model specification,
including the path to the file if it is not in the current directory. If
"" (the default), then the specification is read from the standard
input stream, and is terminated by a blank line. |
x |
An object of class mod to print, as produced by
specify.model . |
... |
Ignored. |
Each line of the RAM specification consists of three (unquoted) entries, separated by commas:
A -> B
or, equivalently, B <- A
for a regression
coefficient (i.e., a single-headed or directional arrow);
A <-> A
for a variance or A <-> B
for a covariance
(i.e., a double-headed or bidirectional arrow). Here, A
and
B
are variable names in the model. If a name does not correspond
to an observed variable, then it is assumed to be a latent variable.
Spaces can appear freely in an arrow specification, and
there can be any number of hyphens in the arrows, including zero: Thus,
e.g., A->B
, A --> B
, and A>B
are all legitimate
and equivalent.NA
produces a fixed parameter.NA
, sem
will compute the start value.
Lines may end in a comment following \#
.
See sem
for further details on model specification.
An object of class mod
, suitable as input for sem
.
John Fox jfox@mcmaster.ca
## Not run: model.dhp <- specify.model() RParAsp -> RGenAsp, gam11, NA RIQ -> RGenAsp, gam12, NA RSES -> RGenAsp, gam13, NA FSES -> RGenAsp, gam14, NA RSES -> FGenAsp, gam23, NA FSES -> FGenAsp, gam24, NA FIQ -> FGenAsp, gam25, NA FParAsp -> FGenAsp, gam26, NA FGenAsp -> RGenAsp, beta12, NA RGenAsp -> FGenAsp, beta21, NA RGenAsp -> ROccAsp, NA, 1 RGenAsp -> REdAsp, lam21, NA FGenAsp -> FOccAsp, NA, 1 FGenAsp -> FEdAsp, lam42, NA RGenAsp <-> RGenAsp, ps11, NA FGenAsp <-> FGenAsp, ps22, NA RGenAsp <-> FGenAsp, ps12, NA ROccAsp <-> ROccAsp, theta1, NA REdAsp <-> REdAsp, theta2, NA FOccAsp <-> FOccAsp, theta3, NA FEdAsp <-> FEdAsp, theta4, NA model.dhp ## End(Not run)