People usually specify models in Amos Graphics by drawing path diagrams. However, Amos Graphics also provides a non-graphical method for model specification. You can specify a model by entering text in the form of a Visual Basic or C# program. In such a program, each object in a path diagram (i.e., each rectangle, ellipse, single-headed arrow, double-headed arrow, and figure caption) corresponds to a single program statement. Usually, a program statement is one line of text.
Here are some reasons that you might choose to specify a model by entering text, rather than by drawing a path diagram.
▪Your model is so big that drawing its path diagram would be difficult.
▪You prefer using a keyboard to using a mouse, or prefer working with text to working with graphics.
▪You need to generate a lot of similar models that differ only in some details such as the number of variables or the variable names. If you need to generate such models frequently, it can be efficient to automate the chore by creating a "super program" whose text output is a tailor-made Visual Basic or C# program that specifies the particular model that you want Amos to fit.
You can write Visual Basic or C# programs for model specification using the following methods of the pd class.
▪Observed, for adding an observed variable to the model
▪Unobserved, for adding an unobserved variable to the model
▪Path, for adding a regression weight to the model
▪Cov, for adding a covariance to the model
▪Caption, for adding a figure caption
▪Reposition, for rearranging the objects in the path diagram to improve its appearance
Example 37 of the User's Guide shows how to use these methods to specify a model.