AMOS-18 Programming Reference
AMOS-18 Programming Reference
AMOS-18 Programming Reference
Contents
New in Amos 18 1
Improvements in the drawing of path diagrams....................................................................................... 1 Improvements to the Program Editor ...................................................................................................... 1 Changes in the drawing of path diagrams................................................................................................ 2 Changes to the object model (for programmers)...................................................................................... 2
New in Amos 17
Copy and paste path diagrams ................................................................................................................ 1 Convert a path diagram to a Visual Basic program.................................................................................. 1 Enhanced growth curve plugin ............................................................................................................... 2 Specify a default value for the 'All groups' check box ............................................................................. 2 New PathDiagrammer method, EditPaste ............................................................................................... 3 New PathDiagrammer method, ToolsWriteAProgram............................................................................. 3 Changes to the Program ......................................................................................................................... 3
New in Amos 16
Mixture Modeling.................................................................................................................................. 5 Mixture Modeling, Clustering, and Discriminant Analysis ...................................................................... 5 Changes to the Program ......................................................................................................................... 6
Getting Started....................................................................................................................................... 2 Programming Tools ............................................................................................................................... 2 Writing a Main Program that Uses Amos................................................................................................ 3 Writing a Main Program with Amos's Built-in Editor................................................................... 3 Writing a Main Program with Visual Studio 2003........................................................................ 4 Writing Classes that are Used by Amos .................................................................................................11 Writing a Plugin for Amos Graphics...........................................................................................11 Calculating Custom Estimands ...................................................................................................30 Class Reference ....................................................................................................................................30 Amos Graphics Class Reference .................................................................................................31 AmosEngine Class Reference...................................................................................................279 AmosMatrix Class Reference ...................................................................................................650 AmosDebug Class Reference ...................................................................................................666 AmosRanGen Class Reference .................................................................................................687 CAmosSeedManager Class Reference ......................................................................................731 Additional Programming Examples.....................................................................................................737 Examples using the Amos Graphics classes ..............................................................................737
Index
757
CHAPT
ER
New in Amos 18
In This Chapter
Improvements in the drawing of path diagrams................ 1 Improvements to the Program Editor ............................... 1 Changes in the drawing of path diagrams ........................ 2 Changes to the object model (for programmers) .............. 2
New in Amos 17
Copy and paste path diagrams
You can copy and paste a path diagram, or part of a path diagram, from one Amos Graphics window to another. To copy a path diagram to the clipboard, click EditCopy (to clipboard). To paste a path diagram from the clipboard to the Amos Graphics window, click EditPaste.
You can modify the parameter constraints after Amos draws the path diagram for the growth curve model. For example, you will want to change the regression weights for the "slope" latent variable if your time points are not equally spaced. If you want to remove the equality constraints on the error variances you can do so by deleting the parameter name, Var, which is automatically assigned to all of the error variances. To use the growth curve plugin, click PluginsGrowth Curve Model.
6 7
New in Amos 17
New in Amos 16
Mixture Modeling
Amos performs mixture modeling. Mixture modeling is appropriate when you have a model that is incorrect for an entire population, but where the population can be divided into subgroups in such a way that the model is correct in each subgroup. Mixture modeling is discussed in the context of structural equation modeling by Arminger, Stein & Wittenberg (1999), Hoshino (2001), Lee (2007, Chapter 11), Loken (2004), Vermunt & Magidson (2005), and Zhu & Lee (2001), among others. Any model can be used in mixture modeling. Example 34 and Example 35 use a saturated model. These examples also demonstrate the fitting of latent structure analysis models, which require the observed variables to be independent (uncorrelated for multivariate normal variables). Example 36 employs a regression model. Factor analysis models have also been used in mixture modeling (Lubke & Muthn, 2005). Mixture modeling is often known as latent class analysis. In the terminology of Lazarsfeld (Lazarsfeld & Henry, 1968), the term latent class analysis is reserved for the variant of latent structure analysis in which all variables are categorical. Amos does not perform that type of latent class analysis.
Getting Started
Before you start writing programs that use Amos (or are used by Amos), it is a good idea to get some experience doing structural equation modeling with Amos. One way to do this is by working through the tutorial and some of the examples in the User's Guide. The User's Guide contains many examples of programs that use Amos. The present document contains many more. Although almost all of the examples in the Amos documentation use Visual Basic, C# is just as easy to use for Amos programming. The Amos programming examples in this Programming Reference Guide and in the online help are installed with Amos. By default they are installed in the folder C:\Program Files\SPSSInc\Amos18\Programming Most of the examples in the Amos documentation are small, intended to demonstrate the use of one or two methods or properties at a time. Some larger examples, such as the following, perform nontrivial tasks. Use the Amos Graphics classes to change the appearance of latent variables (on page 739) Use the Amos Graphics classes to resize all rectangles (see "Use the Amos Graphics classes to resize all rectangles in Amos Graphics" on page 748) Use the Amos Graphics classes to draw a path diagram (on page 742) Use the Amos Graphics classes to calculate a new fit measure (on page 737) Use the Amos Graphics classes to draw double-headed arrows (on page 745) Use the Amos Graphics classes to name unobserved variables (on page 746)
For even larger examples of Amos programming, see the folder C:\Program Files\SPSSInc\Amos18\Programming\Plugins which contains the source code for the plugins on the Plugins menu of Amos Graphics.
Programming Tools
Amos comes with a built-in program editor that can be used for writing and executing Amos programs. To write a main program, start the built-in program editor from the Windows Start menu by clicking Start All Programs SPSS IncAmos 18 Program Editor. To write a plugin, start the built-in program editor from the Amos Graphics menu by clicking Plugins Plugins.
To write a class to compute custom estimands, start the built-in program editor from the Bayesian SEM menu by clicking View Custom estimands.
For main programs and plugins (but not for custom estimands) you can use the development tool of your choice. For demonstrations using Visual Studio 2003, see Writing a Main Program with Visual Studio 2003 (on page 4) Writing a Plugin with Visual Studio 2003 (on page 21)
In the New Project dialog, select Visual Basic Projects and Windows Application. Enter a name for your Visual Studio project, say Example1. For Location, enter the folder where you want to save the project. Then click OK.
In the Add New Item dialog, select Local Project Items and Module. Click Open. 3 Visual Studio displays a source code window with an empty module called Module1.
On the .NET tab of the Add Reference dialog, double-click System.Windows.Forms.dll. Then click OK.
When the Select Component dialog opens, select AmosEngineLib.dll in the Amos program directory and click Open.
8 9
In the Add Reference dialog, click OK. Click Project -> Example1 Properties.
10
The User's Guide gives a line-by-line explanation of Sub Main in the Modeling in VB.NET section of Example 1. 12 To run the program, click Debug -> Start on the menu or press the F5 key. After the program runs, the Amos Output window will open to display the program output.
11
Source code for the plugins on the Amos Graphics Plugins menu is in the Programming\Plugins subdirectory of the Amos program directory. By default, this directory is C:\Program Files\SPSSInc\Amos18\Programming\Plugins The following two sections each give a step-by-step demonstration of writing a plugin. The plugin that is created during the demonstration does not do any useful work. Its purpose is to show how to write a simple plugin that can respond to events that occur while Amos Graphics is running. Once you have gone through the steps of the demonstration, the plugin will appear as an item on the Amos Graphics Plugins menu with the name A simple plugin. When you click A simple plugin, a messagebox will display "Installing a simple plugin". After that, clicking any point on the path diagram will display another messagebox with the text "You released a mouse button.". A mouse click is only one of many events (on page 187) that your plugins can respond to.
12
13
In the Plugins dialog, click Create. The Amos program editor opens.
14
Add code for the Name, Description and Mainsub methods as shown in the following figure.
Amos calls the Name function to obtain the name of the plugin. Amos puts this name on the Amos Graphics Plugins menu. In the present example A simple plugin will be placed on the Plugins menu. The Name function can return an empty string (""). In that case, the name of the file that contains the plugin, Simple Plugin.dll, will be placed on the Plugins menu. Amos calls the Description function to obtain a description of the plugin. A plugin's description is typically longer than its name. A plugin's description is displayed when the plugin is selected from the list in the Plugins dialog. The Description function can return an empty string (""). Amos calls the Mainsub function when you select A simple plugin from the Plugins menu. In this case, clicking A simple plugin on the Plugins menu will display the message "A simple example of a plugin".
15
Scroll down through the source code until you locate the MouseUp method.
16
The MouseUp method now displays a message, "You released a mouse button." However, as the plugin has been defined up to this point, the MouseUp method will never be called. Only the Name, Description and Mainsub functions are guaranteed to be called by Amos. For this reason, they must always be present. To cause Amos to call the MouseUp method when the mouse button is released, use the AddHandler keyword as shown in the following figure.
17
18
The plugin as specified up to this point displays a message every time you release the mouse button. You can stop this behavior only by closing Amos Graphics and re-opening it. However, you can cause the plugin to stop responding to mouse clicks by using the RemoveHandler keyword. Just as the AddHandler keyword is used to cause Amos to call the pd_MouseUp method for every mouse click, the RemoveHandler keyword can be used to cause Amos to stop calling the pd_Mouseup method. In the following figure, RemoveHandler is executed immediately after the first "mouse up" message appears. As a result Amos calls the pd_MouseUp method for a single mouse click only.
19
You may if you wish delete any method other than Name, Description, Mainsub and MouseUp. Amos always calls Name, Description and Mainsub. In the present example, it is possible that MouseUp will be called because of the AddHandler line in Mainsub. The other methods will never be called and can be deleted, making the code for the plugin look like this:
Click Compile to check for syntax errors. Error messages, if any, will displayed in the Compile Errors area. No message is displayed if the plugin compiles without errors.
20
If the plugin compiles without error, click Close. You are asked if you want to save the plugin.
Click Yes. 10 The Save As dialog opens, with the Amos Plugins directory as the default directory. Plugins must be saved in the Plugins directory.
Enter a file name for the plugin and click Save. 11 Close the Plugins dialog. 12 Click A simple plugin on the Plugins menu to test the new plugin.
21
In the New Project dialog, select Visual Basic Projects and Class Library. Enter a name for your plugin, say Simple Plugin. For Location, enter the folder where you want to save the source code for your plugin. Then click OK.
22
23
On the .NET tab of the Add Reference dialog, double-click System.Windows.Forms.dll. Then click OK.
24
25
When the Select Component dialog opens, select AmosGraphics.dll in the Amos program directory and click Open.
In the Add Reference dialog, click OK. 6 Insert the line Imports System.Windows.Forms at the top of the source code window.
26
Insert the line Implements AmosGraphics.IPlugin as shown in the following figure. Be sure to press the Enter key after you type the line. Visual Studio automatically adds code for three functions, Description, MainSub and Name.
Insert the line Dim WithEvents pd as AmosGraphics.PathDiagrammer as shown in the following figure.
27
Add code to the functions Description, MainSub and Name as shown in the following figure.
Amos calls the Name function to obtain the name of the plugin. Amos puts this name on the Amos Graphics Plugins menu. In the present example A simple plugin will be placed on the Plugins menu. The Name function can return an empty string (""). In that case, the name of the file that contains the plugin, Simple Plugin.dll, will be placed on the Plugins menu. Amos calls the Description function to obtain a description of the plugin. A plugin's description is typically longer than its name. A plugin's description is displayed when the plugin is selected from the list in the Plugins dialog. The Description function can return an empty string (""). Amos calls the MainSub function when you select A simple plugin from the Plugins menu. In this case, clicking A simple plugin on the Plugins menu will display the message "A simple example of a plugin".
28
10 In the Class Name dropdown list, select pd. Then in the Method Name dropdown list, select MouseUp. Visual Studio automatically inserts a function called pd_Mouseup.
The AddHandler line causes Amos to call the pd_MouseUp method every time a mouse button is released. Without the AddHandler line, pd_MouseUp would never be called.
29
12 The plugin as specified up to this point displays a message every time you release the mouse button. You can stop this behavior only by closing Amos Graphics and re-opening it. However, you can cause the plugin to stop responding to mouse clicks by using the RemoveHandler keyword. Just as the AddHandler keyword is used to cause Amos to call the pd_MouseUp subroutine for every mouse click, the RemoveHandler keyword can be used to cause Amos to stop calling the pd_Mouseup subroutine. In the following figure, RemoveHandler is executed immediately after the first "mouse up" message. As a result Amos calls the pd_MouseUp subroutine for a single mouse click only. That is, the plugin responds to a mouse click one time only.
13 Build the plugin by clicking Build -> Rebuild Solution. 14 Copy the Simple Plugin.dll from c:\work\Simple Plugin\bin to the Amos plugins directory, which is by default C:\Program Files\SPSSInc\Amos18\Plugins 15 A simple plugin will appear on the Plugins menu the next time you start Amos Graphics. If Amos Graphics is already running, opening the Plugins dialog (click Plugins ->Plugins) will place the new plugin on the Plugins menu.
30
Class Reference
31
If you are not using Amos's built-in program editor, you need to provide a reference to AmosGraphics.dll in order to use the Amos Graphics classes. In Visual Studio 2003: Click Project -> Add Reference. In the Add Reference dialog, click Browse. When the Select Component dialog opens, select AmosGraphics.dll from the Amos program directory and click Open. In the Add Reference dialog, click OK.
32
33
AmosDir Property
The Amos program directory.
Syntax
result = PathDiagrammer.AmosDir The AmosDir property syntax has the following parts:
Part
result
Description
The Amos program directory. result is a character string ending with a backslash character, for example, c:\program files\amos 6\.
34
NGroups Property
Gets the number of groups.
Syntax
result = PathDiagrammer.NGroups The NGroups property syntax has the following parts:
Part
result
Description
The number of groups.
35
36
NotReady Property
The NotReady property always returns False. It is provided for compatibility with earlier versions of Amos.
Syntax
result = PathDiagrammer.NotReady The NotReady method syntax has the following parts:
Part
result
Description
True.
37
PageHeight Property
Gets the page height in inches.
Syntax
result = PathDiagrammer.PageHeight The PageHeight method syntax has the following parts:
Part
result
Description
The height of the path diagram. If the path diagrams height is obtained from the Windows printer driver, value may be smaller than the height of a sheet of paper because the printer may be incapable of printing to the edges of the paper.
38
39
PageWidth Property
Gets the page width in inches.
Syntax
result = PathDiagrammer.PageWidth The PageWidth method syntax has the following parts:
Part
result
Description
The width of the path diagram. If the path diagrams width is obtained from the Windows printer driver, value may be smaller than the width of a sheet of paper because the printer may be incapable of printing to the edges of the paper.
40
PDElements Property
Gets the collection of all rectangles, ellipses, arrows and figure captions in the path diagram for the current group.
Syntax
result = PathDiagrammer.PDElements The PDElements method syntax has the following parts:
Part
result
Description
The collection of all rectangles, ellipses, arrows and figure captions in the path diagram for the current group. The collection is 1-based. That is, the items in the collection are indexed starting with 1.
See IsCovariance Property Example (see "IsCovariance Method Example" on page 258)
41
ProjectName Property
Gets the name of the file that contains the current path diagram, but without the .amw extension.
Syntax
result = PathDiagrammer.ProjectName The ProjectName method syntax has the following parts:
Part
result
Description
The file name, without the ".amw" extension.
42
43
AmwFileName Method
Gets the name of the AMW file associated with the model.
Syntax
PathDiagrammer.AmwFileName()
44
AnalyzeBayesianEstimation Method
Equivalent to the Amos Graphics menu item Analyze Bayesian Estimation.
Syntax
PathDiagrammer.AnalyzeBayesianEstimation ()
45
AnalyzeCalculateEstimates Method
Fits the specified models. This method is equivalent to the menu selection Analyze Calculate Estimates.
Syntax
PathDiagrammer.AnalyzeCalculateEstimates ()
46
AnalyzeDataImputation
Equivalent to the Amos Graphics menu item Analyze Data Imputation.
Syntax
PathDiagrammer.AnalyzeDataImputation ()
47
AnalyzeDegreesOfFreedom Method
Displays degrees of freedom. This method is equivalent to the menu selection Analyze Degrees Of Freedom.
Syntax
PathDiagrammer.AnalyzeDegreesOfFreedom ()
48
AnalyzeManageGroups Method
Opens a dialog for adding, deleting and renaming groups. This method is equivalent to the menu selection Analyze Manage Groups.
Syntax
PathDiagrammer.AnalyzeManageGroups ()
49
AnalyzeManageGroupsAdd Method
Adds a new group.
Syntax
PathDiagrammer.AnalyzeManageGroupsAdd ()
50
AnalyzeManageGroupsDelete Method
Deletes the currently selected group. This method is equivalent to pressing the Delete button in the Manage Groups dialog.
Syntax
PathDiagrammer.AnalyzeManageGroupsDelete () See GroupSelect Method Example (on page 138)
51
AnalyzeManageGroupsRename Method
Renames the currently selected group.
Syntax
PathDiagrammer.AnalyzeManageGroupsRename (newGroupName) The AnalyzeManageGroupsRename method syntax has the following parts:
Part
newGroupName
Description
New name for the currently selected group.
52
AnalyzeManageModels Method
Opens a dialog for creating, modifying and deleting models. This method is equivalent to the menu selection Analyze Manage Models.
Syntax
PathDiagrammer.AnalyzeManageModels ()
53
AnalyzeModelingLab Method
Runs the Modeling Lab. This method is equivalent to the menu selection Analyze Modeling Lab.
Syntax
PathDiagrammer.AnalyzeModelingLab ()
54
AnalyzeMultipleGroupAnalysis Method
Equivalent to the Amos Graphics menu item Analyze Multiple-Group Analysis.
Syntax
PathDiagrammer.AnalyzeMultipleGroupAnalysis ()
55
AnalyzeSpecificationSearch Method
Equivalent to the Amos Graphics menu item Analyze Specification Search.
Syntax
PathDiagrammer.AnalyzeSpecificationSearch ()
56
AnalyzeToggleObservedUnobserved Method
Changes rectangles to ellipses, and ellipses to rectangles.
Syntax
PathDiagrammer.AnalyzeToggleObservedUnobserved () PathDiagrammer.AnalyzeToggleObservedUnobserved (theElement) PathDiagrammer.AnalyzeToggleObservedUnobserved (variableName) PathDiagrammer.AnalyzeToggleObservedUnobserved (elementNumber) The AnalyzeToggleObservedUnobserved method syntax has the following parts:
Part
theElement variableName
Description
A rectangle or ellipse (of type PDElement). (String) The name of a variable.
elementNumber An integer that specifies a rectangle or ellipse in the path diagram. The objects in a path diagram are numbered starting with 1.
Calling AnalyzeToggleObservedUnobserved with no arguments is equivalent to the menu selection Analyze Toggle Observed/Unobserved.
57
BuildNumber Method
Gets the build number that is displayed in the About box.
Syntax
result = PathDiagrammer.BuildNumber () The BuildNumber method syntax has the following parts:
Part
result
Description
(Integer) The build number.
58
CanRespond Method
If Amos Graphics has an open modal dialog that may prevent it from responding correctly to calls to its methods and properties, the CanRespond method returns an explanatory string. Otherwise, it returns an empty string.
Syntax
result=PathDiagrammer.CanRespond (callerDisplaysErrorMessage) The CanRespond method syntax has the following parts:
Part
result
Description
(String) The empty string ("") if Amos Graphics can respond. Otherwise, a description of the condition that prevents Amos Graphics from responding. (boolean) False if you want Amos Graphics to display a message box with a description of any condition that prevents it from responding. True if you want the calling program to assume responsibility for displaying such messages.
callerDisplaysErrorMessage
59
60
ClickMouse Method
Clicks the mouse on a rectangle, ellipse, arrow or figure caption.
Syntax
PathDiagrammer.ClickMouse (theElement) PathDiagrammer.ClickMouse (variableName) PathDiagrammer.ClickMouse (elementNumber) The ClickMouse method syntax has the following parts:
Part Description
A path diagram object (of type PDElement). (String) The name of a variable. An integer that specifies an object in the path diagram. Objects are numbered starting with 1.
61
CopyAnalysisPropertiesTo Method
Copies the properties in the Analysis Properties window to an AmosEngine instance.
Syntax
result = PathDiagrammer.CopyAnalysisPropertiesTo (sem) The CopyAnalysisPropertiesTo method syntax has the following parts:
Part
result sem
Description
(Integer) 0 = no error. An object of type AmosEngine.
62
DiagramDrawCovariance Method
Draws a double-headed arrow.
Syntax
covariance = PathDiagrammer.DiagramDrawCovariance() covariance = PathDiagrammer.DiagramDrawCovariance(theElement1, theElement2) covariance = PathDiagrammer.DiagramDrawCovariance(variableName1, variableName2) covariance = PathDiagrammer.DiagramDrawCovariance(elementNumber1, elementNumber2) covariance = PathDiagrammer.DiagramDrawCovariance(x1, y1, x2, y2) The DiagramDrawCovariance method syntax has the following parts:
Part
covariance theElement1, theElement2 variableName1, variableName2 elementNumber1, elementNumber2
Description
The newly drawn covariance. (An object of type PDElement.)
(String) The names of the two variables to be connected by a double-headed arrow. (Integer) Numbers that identify the two variables to be connected by a double-headed arrow. Objects in a path diagram are arbitrarily numbered beginning with 1. (Single) Coordinates of one of the variables to be connected by a double-headed arrow. x1 is its distance in inches from the left edge of the path diagram. y1 is its distance in inches from the top edge. (Single) Coordinates of one of the variables to be connected by a double-headed arrow. x2 is its distance in inches from the left edge of the path diagram. y2 is its distance in inches from the top edge.
x1, y1
x2, y2
Calling DiagramDrawCovariance with no arguments is equivalent to the menu selection Diagram Draw Covariance. See Use the Amos Graphics classes to draw a path diagram (on page 742)
63
DiagramDrawIndicatorVariable Method
Draws an indicator variable and an associated residual variable for an existing unobserved variable.
Syntax
PathDiagrammer.DiagramDrawIndicatorVariable () PathDiagrammer.DiagramDrawIndicatorVariable (theElement) PathDiagrammer.DiagramDrawIndicatorVariable (variableName) PathDiagrammer.DiagramDrawIndicatorVariable (elementNumber) The DiagramDrawIndicatorVariable method syntax has the following parts:
Part
theElement variableName elementNumber
Description
(Of type PDElement) An unobserved variable (ellipse). (String) The name of an unobserved variable (ellipse). (Integer) A number that identifies an unobserved variable (ellipse). Objects in a path diagram are arbitrarily numbered beginning with 1.
Calling DiagramDrawIndicatorVariable with no arguments is equivalent to the menu selection Diagram Draw Indicator Variable. See example (see "DiagramDrawIndicatorVariable Method Example" on page 64).
64
Imports Microsoft.VisualBasic Imports AmosGraphics Public Class CustomCode Implements IPlugin Public Function Mainsub() As Integer Implements IPlugin.Mainsub Dim E As PDElement PathDiagrammer.FileNew(PathDiagrammer.PDSaveChangesEnum.pdPromptToSaveChanges) E = PathDiagrammer.DiagramDrawUnobserved(3, 3, 2, 1) PathDiagrammer.DiagramDrawIndicatorVariable(E) PathDiagrammer.DiagramDrawIndicatorVariable(E) PathDiagrammer.DiagramDrawIndicatorVariable(E) PathDiagrammer.Refresh() PathDiagrammer.EditFitToPage() End Function Public Function Name() As String Implements IPlugin.Name End Function Public Function Description() As String Implements IPlugin.Description End Function End Class
65
DiagramDrawObserved Method
Draws observed variables (rectangles).
Syntax
variable = PathDiagrammer.DiagramDrawObserved () variable = PathDiagrammer.DiagramDrawObserved (x, y, width, height) The DiagramDrawObserved method syntax has the following parts:
Part
variable x y
Description
The newly drawn observed variable. (An object of type PDElement.) Horizontal coordinate of the center of the rectangle, expressed in inches from the left margin.
Vertical coordinate of the center of the rectangle, expressed in inches from the top margin.
Width of the rectangle, in inches. Height of the rectangle, in inches
width height
Calling DiagramDrawObserved with no arguments is equivalent to the menu selection Diagram Draw Observed. See Use the Amos Graphics classes to draw a path diagram (on page 742)
66
DiagramDrawPath Method
Draws regression weights (single-headed arrows).
Syntax
weight = PathDiagrammer.DiagramDrawPath() weight = PathDiagrammer.DiagramDrawPath(theElement1, theElement2) weight = PathDiagrammer.DiagramDrawPath(variableName1, variableName2) weight = PathDiagrammer.DiagramDrawPath(elementNumber1, elementNumber2) weight = PathDiagrammer.DiagramDrawPath(x1, y1, x2, y2) The DiagramDrawPath method syntax has the following parts:
Part
weight theElement1, theElement2 variableName1, variableName2 elementNumber1, elementNumber2
Description
The newly drawn arrow (regression weight). (An object of type PDElement.)
(Of type PDElement) The new arrow points from theElement1 to theElement2.
(String) The names of two variables. The new arrow points from variableName1 to variableName2. (Integer) Numbers that identify two variables. Objects in a path diagram are arbitrarily numbered beginning with 1. The new arrow points from the first variable to the second. (Single) Coordinates of the variable that the new arrow points from. x1 is its distance in inches from the left edge of the path diagram. y1 is its distance in inches from the top edge. (Single) Coordinates of the variable that the new arrow points to. x2 is its distance in inches from the left edge of the path diagram. y2 is its distance in inches from the top edge.
x1, y1
x2, y2
Calling DiagramDrawPath with no arguments is equivalent to the menu selection Diagram Draw Path. See Use the Amos Graphics classes to draw a path diagram (on page 742)
67
DiagramDrawUniqueVariable Method
Draws a unique (residual) variable for an existing variable.
Syntax
PathDiagrammer.DiagramDrawUniqueVariable () PathDiagrammer.DiagramDrawUniqueVariable (theElement) PathDiagrammer.DiagramDrawUniqueVariable (variableName) PathDiagrammer.DiagramDrawUniqueVariable (elementNumber) The DiagramDrawIndicatorVariable method syntax has the following parts:
Part
theElement variableName elementNumber
Description
(Of type PDElement) A variable (ellipse or rectangle). (String) The name of a variable. (Integer) A number that identifies a variable (ellipse or rectangle). Objects in a path diagram are arbitrarily numbered beginning with 1.
Calling DiagramDrawUniqueVariable with no arguments is equivalent to the menu selection Diagram Draw Unique Variable. See example (see "DiagramDrawUniqueVariable Method Example" on page 68).
68
Imports Microsoft.VisualBasic Imports AmosGraphics Public Class CustomCode Implements IPlugin Public Function Mainsub() As Integer Implements IPlugin.Mainsub Dim E As PDElement PathDiagrammer.FileNew(PathDiagrammer.PDSaveChangesEnum.pdPromptToSaveChanges) E = PathDiagrammer.DiagramDrawObserved(3, 3, 2, 1) PathDiagrammer.DiagramDrawUniqueVariable(E) PathDiagrammer.Refresh() PathDiagrammer.EditFitToPage() End Function Public Function Name() As String Implements IPlugin.Name End Function Public Function Description() As String Implements IPlugin.Description End Function End Class
69
DiagramDrawUnobserved Method
Draws unobserved variables (ellipses).
Syntax
variable = PathDiagrammer.DiagramDrawUnobserved (x, y, width, height) The DiagramDrawUnobserved method syntax has the following parts:
Part
variable x y
Description
The newly drawn unobserved variable (ellipse). (An object of type PDElement.) Horizontal coordinate of the center of the ellipse, expressed in inches from the left margin.
Vertical coordinate of the center of the ellipse, expressed in inches from the top margin.
Width of the ellipse, in inches. Height of the ellipse, in inches
width height
Calling DiagramDrawUnobserved with no arguments is equivalent to the menu selection Diagram Draw Unobserved. See Use the Amos Graphics classes to draw a path diagram (on page 742)
70
DiagramFigureCaption Method
Draws new figure captions, and edits existing figure captions.
Syntax
PathDiagrammer.DiagramFigureCaption () PathDiagrammer.DiagramFigureCaption (theElement) PathDiagrammer.DiagramFigureCaption (elementNumber) The DiagramFigureCaption method syntax has the following parts:
Part
theElement elementNumber
Description
(Of type PDElement) An existing figure caption. (Integer) A number that identifies a figure caption. Objects in a path diagram are arbitrarily numbered beginning with 1.
Calling DiagramFigureCaption with no arguments is equivalent to the menu selection Diagram Figure Caption.
71
DiagramLoupe Method
Magnifies the region under the mouse pointer. This method is equivalent to the menu selection Diagram Loupe.
Syntax
PathDiagrammer.DiagramLoupe()
72
DiagramRedrawDiagram Method
Redraws the path diagram. This method is equivalent to the menu selection Diagram Redraw Diagram.
Syntax
PathDiagrammer.DiagramRedrawDiagram() See IsObservedVariable Property Example (see "IsObservedVariable Method Example" on page 265)
73
DiagramScroll Method
Scrolls the path diagram.
Syntax
PathDiagrammer.DiagramScroll () PathDiagrammer.DiagramScroll (x, y) The DiagramScroll method syntax has the following parts:
Part
x y
Description
The path diagram is scrolled x inches to the right. The path diagram is scrolled y inches down.
Calling DiagramScroll with no arguments is equivalent to the menu selection Diagram Scroll. See example (see "DiagramScroll Method Example" on page 74).
74
75
DiagramZoom Method
Fills the Amos window with a selected portion of the path diagram.
Syntax
PathDiagrammer.DiagramZoom () PathDiagrammer.DiagramZoom (x1, y1, x2, y2) The DiagramZoom method syntax has the following parts:
Part
x1, y1, x2, y2
Description
(x1, y1) and (x2, y2) specify two opposite corners of a rectangle. x1 and x2 are expressed in inches from the left margin. y1 and y2 are expressed in inches from the top margin. The DiagramZoom method resizes the path diagram so that the specified rectangle fills the Amos window.
Calling DiagramZoom with no arguments is equivalent to the menu selection Diagram Zoom. See example (see "DiagramZoom Method Example" on page 76).
76
77
DiagramZoomIn Method
Magnifies the screen image of the path diagram. This method is equivalent to the menu selection Diagram Zoom In.
Syntax
PathDiagrammer.DiagramZoomIn () See example (see "DiagramZoomIn Method Example" on page 78).
78
79
DiagramZoomOut Method
Reduces the size of the screen image of the path diagram. This method is equivalent to the menu selection Diagram Zoom Out.
Syntax
PathDiagrammer.DiagramZoomOut () See example (see "DiagramZoomOut Method Example" on page 80).
80
81
DiagramZoomPage Method
Resizes the screen image of the path diagram so that one printed page just fits the Amos window. This method is equivalent to the menu selection Diagram Zoom Page.
Syntax
PathDiagrammer.DiagramZoomPage () See DiagramZoomIn Method Example (on page 78)
82
DisplayInputPD Method
Displays the input path diagram. This method is equivalent to pressing .
Syntax
PathDiagrammer.DisplayInputPD () See DisplayOutputPD Method (on page 83)
83
DisplayOutputPD Method
Displays the input path diagram. This method is equivalent to pressing .
Syntax
PathDiagrammer.DisplayOutputPD () See DisplayInputPD Method (on page 82)
84
DoubleClickMouse Method
The DoubleClickMouse method is no longer supported.
85
DragMouse Method
Drags the mouse from one point to another.
Syntax
PathDiagrammer.DragMouse (theElement, x2, y2) PathDiagrammer.DragMouse (x1, y1, x2, y2) The DragMouse method syntax has the following parts:
Part
theElement
Description
An object of type PDElement. The drag operation begins at the point with coordinates (theElement.originX (see "OriginX Property" on page 234), theElement.originY (see "OriginY Property" on page 235)). Coordinates of the location where the drag operation begins (the left mouse button is pressed). x1 is its distance, in inches, from the left margin. y1 is its distance, in inches, from the top margin. Coordinates of the location where the drag operation ends (the left mouse button is released). x2 is its distance, in inches, from the left margin. y2 is its distance, in inches, from the top margin.
x1, y1
x2, y2
86
EditCopy Method
Copies the path diagram to the Windows clipboard. This method is equivalent to the menu selection Edit Copy.
Syntax
PathDiagrammer.EditCopy () See example (see "EditCopy Method Example" on page 87).
87
88
EditDeselectAll Method
Deselects all objects. This method is equivalent to the menu selection Edit Deselect All.
Syntax
PathDiagrammer.EditDeselectAll () See Use the Amos Graphics classes to draw a path diagram (on page 742)
89
EditDragProperties Method
Copies the properties of one object (the source object) to another object (the target object).
Syntax
PathDiagrammer.EditDragProperties () PathDiagrammer.EditDragProperties (theElement1, theElement2, height, width, x, y, nameOrCaption, parameterConstraints, parameterPosition, font, parameterFont, penWidth, curvature, colors, visibility) PathDiagrammer.EditDragProperties (elementNumber1, elementNumber2, height, width, x, y, nameOrCaption, parameterConstraints, parameterPosition, font, parameterFont, penWidth, curvature, colors, visibility) PathDiagrammer.EditDragProperties (variableName1, variableName2, height, width, x, y, nameOrCaption, parameterConstraints, parameterPosition, font, parameterFont, penWidth, curvature, colors, visibility) The EditDragProperties method syntax has the following parts:
Part
theElement1 theElement2 elementNumber1 elementNumber2 variableName1 variableName2 height width
Description
(Objects of type PDElement.) Properties are copied from theElement1 to theElement2. (Integers) Properties are copied from object number elementNumber1 to object number elementNumber2. (Objects in the path diagram are numbered starting with 1.) (Strings) Properties are copied from the variable named variableName1 to the variable named variableName1. Optional. True if the source objects height is to be copied. Optional. True if the source objects width is to be copied.
Optional. True if the source objects x (horizontal) coordinate is to be copied. Optional. True if the source object's y (vertical) coordinate is to be copied. Optional. True if the source object's name (in the case of a rectangle or ellipse) or caption (in the case of a figure caption) is to be copied. Optional. True if the source object's parameter constraints are to be copied. Optional. True if the source object's parameter position is to be copied. Optional. True if the source object's name or caption font is to be copied. Optional. True if the source object's parameter font is to be copied. Optional. True if the source object's pen width is to be copied.
y nameOrCaption
90
Part
curvature colors visibility
Description
Optional. True if the source object's curvature is to be copied. Optional. True if the source object's colors are to be copied. Optional. True if the source object's visibility properties are to be copied.
Calling EditDragProperties with no arguments is equivalent to the menu selection Edit Drag Properties.
91
EditDuplicate Method
Makes additional copies of rectangles, ellipses and captions.
Syntax
PathDiagrammer.EditDuplicate () PathDiagrammer.EditDuplicate (theElement, x2, y2) PathDiagrammer.EditDuplicate (variableName, x2, y2) PathDiagrammer.EditDuplicate (elementNumber, x2, y2) The EditDuplicate method syntax has the following parts:
Part
theElement variableName elementNumber x2, y2
Description
A path diagram object (of type PDElement) to be copied. (String) The name of a variable to be copied. An integer that specifies an object to be copied. Objects are numbered starting with 1. (Single) The coordinates of the newly created object. x2 is its distance, in inches, from the left margin. y2 is its distance, in inches, from the top margin.
Calling EditDuplicate with no arguments is equivalent to the menu selection Edit Duplicate.
92
EditErase Method
Erases objects.
Syntax
PathDiagrammer.EditErase () PathDiagrammer.EditErase (theElement) PathDiagrammer.EditErase (variableName) PathDiagrammer.EditErase (elementNumber) The EditErase method syntax has the following parts:
Part
theElement variableName elementNumber
Description
A path diagram object (of type PDElement) to be erased. (String) The name of a variable to be erased. An integer that specifies an object to be erased. Objects are numbered starting with 1.
Calling EditErase with no arguments is equivalent to the menu selection Edit Erase.
93
EditFitToPage Method
Resizes the path diagram (not just its screen image) so that it fits on a page. This method is equivalent to the menu selection Edit Fit to Page.
Syntax
PathDiagrammer.EditFitToPage () See Use the Amos Graphics classes to draw a path diagram (on page 742)
94
EditLink Method
Forms a group of objects that will be treated as a unit in future operations. This method is equivalent to the menu selection Edit Link.
Syntax
PathDiagrammer.EditLink ()
95
EditMove Method
Moves rectangles, ellipses and captions.
Syntax
PathDiagrammer.EditMove () PathDiagrammer.EditMove (theElement, x2, y2) PathDiagrammer.EditMove (variableName, x2, y2) PathDiagrammer.EditMove (elementNumber, x2, y2) The EditMove method syntax has the following parts:
Part
theElement variableName elementNumber x2, y2
Description
A path diagram object (of type PDElement) to be moved. (String) The name of a variable to be moved. An integer that specifies an object to be moved. Objects are numbered starting with 1. (Single) The new coordinates of the object. x2 is its distance, in inches, from the left margin. y2 is its distance, in inches, from the top margin.
Calling EditMove with no arguments is equivalent to the menu selection Edit Move.
96
EditMoveParameter Method
Allows parameter constraints and estimates to be moved. This method is equivalent to the menu selection Edit Move Parameter.
Syntax
PathDiagrammer.EditMoveParameter ()
97
EditPaste Method
Pastes a path diagram, or a part of a path diagram, from the Windows clipboard into the Amos Graphics window. This method is equivalent to the menu selection Edit Paste.
Syntax
PathDiagrammer.EditPaste ()
98
EditRedo Method
Undoes the effect of the most recent use of the EditUndo (see "EditUndo Method" on page 109) method. This method is equivalent to the menu selection Edit Redo.
Syntax
PathDiagrammer.EditRedo()
99
EditReflect Method
Reflects the indicators of a latent variable.
Syntax
PathDiagrammer.EditReflect () PathDiagrammer.EditReflect (theElement) PathDiagrammer.EditReflect (variableName) PathDiagrammer.EditReflect (elementNumber) The EditReflect method syntax has the following parts:
Part
theElement variableName elementNumber
Description
A latent variable (of type PDElement). (String) The name of a latent variable. An integer that specifies an object that is a latent variable. Objects are numbered starting with 1.
Calling EditReflect with no arguments is equivalent to the menu selection Edit Reflect.
100
EditRotate Method
Rotates the indicators of a latent variable.
Syntax
PathDiagrammer.EditRotate () PathDiagrammer.EditRotate (theElement) PathDiagrammer.EditRotate (variableName) PathDiagrammer.EditRotate (elementNumber) The EditRotate method syntax has the following parts:
Part
theElement variableName elementNumber
Description
A latent variable (of type PDElement). (String) The name of a latent variable. An integer that specifies an object that is a latent variable. Objects are numbered starting with 1.
Calling EditRotate with no arguments is equivalent to the menu selection Edit Rotate. See example (see "EditRotate Method Example" on page 101).
101
102
Imports Microsoft.VisualBasic Imports AmosGraphics Imports AmosGraphics.PathDiagrammer Public Class CustomCode Implements IPlugin Public Function Mainsub() As Integer Implements IPlugin.Mainsub Dim E As PDElement If FileNew(PDSaveChangesEnum.pdPromptToSaveChanges) Then Return 0 End If E = DiagramDrawUnobserved(3, 3, 2, 2) DiagramDrawIndicatorVariable(E) DiagramDrawIndicatorVariable(E) DiagramDrawIndicatorVariable(E) EditRotate(E) PathDiagrammer.Refresh() EditFitToPage() End Function Public Function Name() As String Implements IPlugin.Name End Function Public Function Description() As String Implements IPlugin.Description End Function End Class
103
EditSelect Method
Selects one object at a time.
Syntax
PathDiagrammer.EditSelect () PathDiagrammer.EditSelect (theElement) PathDiagrammer.EditSelect (variableName) PathDiagrammer.EditSelect (elementNumber) The EditSelect method syntax has the following parts:
Part
theElement variableName elementNumber
Description
An object (of type PDElement) to be selected. (String) The name of a variable to be selected. An integer that specifies an object to be selected. Objects are numbered starting with 1.
Calling EditSelect with no arguments is equivalent to the menu selection Edit Select.
104
EditSelectAll Method
Selects all objects in the path diagram. This method is equivalent to the menu selection Edit Select All.
Syntax
PathDiagrammer.EditSelectAll () See Use the Amos Graphics classes to draw a path diagram (on page 742)
105
EditShapeOfObject Method
Allows the user to change the size and shape of variables (rectangles and ellipses). This method is equivalent to the menu selection Edit Shape Of Object.
Syntax
PathDiagrammer.EditShapeOfObject () See Use the Amos Graphics classes to draw double-headed arrows (on page 745)
106
EditSpaceHorizontally Method
Arranges selected objects so that they are equally spaced horizontally. This method is equivalent to the menu selection Edit Space Horizontally.
Syntax
PathDiagrammer.EditSpaceHorizontally ()
107
EditSpaceVertically Method
Arranges selected objects so that they are equally spaced vertically. This method is equivalent to the menu selection Edit Space Vertically.
Syntax
PathDiagrammer.EditSpaceVertically ()
108
EditTouchUp Method
Rearranges the arrows in a path diagram in a way intended to be aesthetically pleasing.
Syntax
PathDiagrammer.EditTouchUp () PathDiagrammer.EditTouchUp (theElement) PathDiagrammer.EditTouchUp (variableName) PathDiagrammer.EditTouchUp (elementNumber) The EditTouchUp method syntax has the following parts:
Part
theElement variableName elementNumber
Description
A rectangle or ellipse (of type PDElement). Arrows that touch the rectangle or ellipse will be repositioned. (String) The name of a variable. Arrows that touch the variable's rectangle or ellipse will be repositioned. An integer that specifies a rectangle or ellipse. Objects in a path diagram are numbered starting with 1. Arrows that touch the rectangle or ellipse will be repositioned.
Calling EditTouchUp with no arguments is equivalent to the menu selection Edit Touch Up. See Use the Amos Graphics classes to draw a path diagram (on page 742)
109
EditUndo Method
Undoes the most recent change to the path diagram. This method is equivalent to the menu selection Edit Undo.
Syntax
PathDiagrammer.EditUndo ()
110
EnableUserInteraction Method
Enable or disable toolbox buttons and menus.
Syntax
PathDiagrammer.EnableUserInteraction (tf) The EnableUserInteraction method syntax has the following parts:
Part
tf
Description
False to disable toolbox buttons and menus. True to enable them.
111
EnableUserInteraction2 Method
EnableUserInteraction2 is identical to EnableUserInteraction, except that EnableUserInteraction2 leaves the following toolbar buttons and menu items enabled. Print a path diagram Duplicate objects Save a path diagram Save a path diagram with a new name
Syntax
PathDiagrammer.EnableUserInteraction2 (tf) The EnableUserInteraction2 method syntax has the following parts:
Part
tf
Description
False to disable toolbox buttons and menus. True to enable them.
112
113
FileDataFiles Method
Opens a dialog to allow the user to specify the database file (or files) to be analyzed. This method is equivalent to the menu selection File Data Files.
Syntax
PathDiagrammer.FileDataFiles ()
114
FileExit Method
Closes the Amos Graphics window. This method is equivalent to the menu selection File Exit.
Syntax
PathDiagrammer.FileExit () See MouseDown and MouseUp Events Example (see "MouseUp Event Example" on page 202).
115
FileNew Method
Starts a new path diagram.
Syntax
result = PathDiagrammer.FileNew () result = PathDiagrammer.FileNew (saveOptions) The FileNew method syntax has the following parts:
Part Description
True if an error occurs. Optional. A constant, as specified in Settings, that tells Amos what to do if there is currently an unsaved path diagram in the Amos window.
result
saveOptions
If saveOptions is omitted, the FileNew method is equivalent to the menu selection File New.
Settings
The settings for saveOptions are:
Constant
pdPromptToSaveChanges (default)
Value Description
0 1 2 Prompt the user to save or discard the current path diagram Discard the current path diagram. Save the current path diagram.
pdDoNotSaveChanges pdSaveChanges
See Use the Amos Graphics classes to draw a path diagram (on page 742)
116
FileNewWithTemplate Method
Starts a new path diagram using a template.
Syntax
result = PathDiagrammer.FileNewWithTemplate () result = PathDiagrammer.FileNewWithTemplate (templateFileName) result = PathDiagrammer.FileNewWithTemplate (templateFileName,saveOptions) The FileNewWithTemplate method syntax has the following parts:
Part Description
True if an error occurs or if the user cancels the operation. The name of a template file. Optional. A constant, as specified in Settings, that tells Amos what to do if there is currently an unsaved path diagram in the Amos window.
result
templateFileName saveOptions
Calling FileNewWithTemplate with no arguments is equivalent to the menu selection File New With Template.
Settings
The settings for saveOptions are:
Constant
pdPromptToSaveChanges (default)
Value Description
0 1 2 Prompt the user to save or discard the current path diagram Discard the current path diagram. Save the current path diagram.
pdDoNotSaveChanges pdSaveChanges
117
FileOpen Method
Retrieves a path diagram that was saved previously.
Syntax
result = PathDiagrammer.FileOpen () result = PathDiagrammer.FileOpen (fileName) result = PathDiagrammer.FileOpen (fileName, saveOptions) The FileOpen method syntax has the following parts:
Part
result fileName saveOptions
Description
True if an error occurs or if the user cancels the operation. The name of a path diagram file (a *.amw file). Optional. A constant, as specified in Settings, that tells Amos what to do if there is currently an unsaved path diagram in the Amos window.
Calling FileOpen with no arguments is equivalent to the menu selection File Open.
Settings
The settings for saveOptions are:
Constant
PdPromptToSaveChanges (default)
Value Description
0 1 2 Prompt the user to save or discard the current path diagram Discard the current path diagram. Save the current path diagram.
PdDoNotSaveChanges PdSaveChanges
118
FilePrint Method
Opens a dialog box for printing path diagrams. This method is equivalent to the menu selection File Print.
Syntax
PathDiagrammer.FilePrint ()
119
FileRetrieveBackup Method
This method is equivalent to the menu selection File Retrieve Backup.
Syntax
PathDiagrammer.FileRetrieveBackup ()
120
FileSave Method
Saves the path diagram as a disk file. This method is equivalent to the menu selection File Save.
Syntax
result = PathDiagrammer.FileSave () The FileSave method syntax has the following parts:
Part
result
Description
True if an error occurs or if the user cancels the operation.
121
FileSaveAs Method
Saves a path diagram with a new name.
Syntax
result = PathDiagrammer.FileSaveAs () result = PathDiagrammer.FileSaveAs (fileName) The FileSaveAs method syntax has the following parts:
Part
result fileName
Description
True if an error occurs or if the user cancels the operation. Optional new file name. If a file with this name already exists, it is overwritten.
Calling FileSaveAs with no arguments is equivalent to the menu selection File Save As. See GroupSelect Method Example (on page 138)
122
FileSaveAsTemplate Method
Saves your path diagram as a template.
Syntax
result = PathDiagrammer.FileSaveAsTemplate () result = PathDiagrammer.FileSaveAsTemplate (templateFileName) The FileSaveAsTemplate method syntax has the following parts:
Part
result templateFileName
Description
True if an error occurs or if the user cancels the operation. Optional. Name for the template file.
Calling FileSaveAsTemplate with no arguments is equivalent to the menu selection File Save As Template.
123
GetButton Method
Gets a Button control in an Amos Graphics window.
Syntax
result = PathDiagrammer.GetButton (formName, controlName) The GetButton method syntax has the following parts:
Part
result formName
Description
An object of type System.Windows.Forms.Button. (String) The name of an Amos Graphics form. To learn the name of an Amos Graphics form, press F1 while holding the mouse pointer over the form's title bar. A Help window will open. The forms name is displayed in square brackets at the bottom of the help window. (String) The name of a control on an Amos Graphics form. To learn a controls name, hold the mouse pointer over the control and press SHIFT-F1. A help window will open. The controls name will be displayed in square brackets at the bottom of the help window.
controlName
124
GetCheckBox Method
Gets a CheckBox control in an Amos Graphics window.
Syntax
result = PathDiagrammer.GetCheckBox (formName, controlName) The GetCheckBox method syntax has the following parts:
Part
result formName
Description
An object of type System.Windows.Forms.CheckBox. (String) The name of an Amos Graphics form. To learn the name of an Amos Graphics form, press F1 while holding the mouse pointer over the form's title bar. A Help window will open. The forms name is displayed in square brackets at the bottom of the help window. (String) The name of a control on an Amos Graphics form. To learn a controls name, hold the mouse pointer over the control and press SHIFT-F1. A help window will open. The controls name will be displayed in square brackets at the bottom of the help window.
controlName
125
GetCheckBox Example 1
The following plugin displays a messagebox that tells whether there is a check mark next to Estimate means and intercepts in the Analysis Properties window.
Imports Microsoft.VisualBasic Imports AmosGraphics Imports AmosGraphics.PathDiagrammer Public Class CustomCode Implements IPlugin Public Function Mainsub() As Integer Implements IPlugin.Mainsub If PathDiagrammer.GetCheckBox("AnalysisPropertiesForm", "MeansInterceptsCheck").Checked Then MsgBox("The checkbox is checked.") Else MsgBox("The checkbox is not checked.") End If End Function Public Function Name() As String Implements IPlugin.Name End Function Public Function Description() As String Implements IPlugin.Description End Function End Class
126
GetCheckBox Example 2
The following plugin puts a check mark next to Estimate means and intercepts in the Analysis Properties window.
Imports Microsoft.VisualBasic Imports AmosGraphics Public Class CustomCode Implements IPlugin Public Function Mainsub() As Integer Implements IPlugin.Mainsub PathDiagrammer.GetCheckBox("AnalysisPropertiesForm", "MeansInterceptsCheck").Checked = True End Function Public Function Name() As String Implements IPlugin.Name End Function Public Function Description() As String Implements IPlugin.Description End Function End Class
127
GetControl Method
The GetControl method is no longer supported. Use one of the following methods instead. GetButton Method (on page 123) GetCheckBox Method (on page 124) GetRadioButton Method (on page 133) GetTextBox Method (on page 134)
128
129
Public Function Mainsub() As Integer Implements IPlugin.Mainsub Dim dbformat As PXMLPersist.CDataTable.cDatabaseFormat Dim FileName As String Dim TableName As String Dim GroupingVariable As String Dim GroupingValue As Object Dim igroup As Integer Dim message As String For igroup = 1 To PathDiagrammer.ngroups PathDiagrammer.GetDataFile(igroup, dbformat, FileName, TableName, GroupingVariable, GroupingValue) message &= vbcrlf & "The data file for group " & igroup & " is " & FileName message &= vbcrlf & "The table name Is " & TableName & "" Next MsgBox(message,, "GetDataFile Example") End Function Public Function Name() As String Implements IPlugin.Name End Function Public Function Description() As String Implements IPlugin.Description End Function End Class
130
GetModels Method
Gets information about the models specified in Amos Graphics.
Syntax
PathDiagrammer.GetModels (sNames, sConstraints) The GetModels method syntax has the following parts:
Part
sNames sConstraints
Description
A string array that contains the model names. A string array. Each element of the array contains the constraints of a single model.
131
132
GetNGroups Method
Gets the number of groups.
Syntax
result = PathDiagrammer.GetNGroups () The GetNGroups method syntax has the following parts:
Part
result
Description
The number of groups.
133
GetRadioButton Method
Gets a RadioButton control in an Amos Graphics window.
Syntax
result = PathDiagrammer.GetRadioButton (formName, controlName) The GetRadioButton method syntax has the following parts:
Part
result formName
Description
An object of type System.Windows.Forms.RadioButton. (String) The name of an Amos Graphics form. To learn the name of an Amos Graphics form, press F1 while holding the mouse pointer over the form's title bar. A Help window will open. The forms name is displayed in square brackets at the bottom of the help window. (String) The name of a control on an Amos Graphics form. To learn a controls name, hold the mouse pointer over the control and press SHIFT-F1. A help window will open. The controls name will be displayed in square brackets at the bottom of the help window.
controlName
134
GetTextBox Method
Gets a TextBox control in an Amos Graphics window.
Syntax
result = PathDiagrammer.GetTextBox (formName, controlName) The GetTextBox method syntax has the following parts:
Part
result formName
Description
An object of type System.Windows.Forms.TextBox. (String) The name of an Amos Graphics form. To learn the name of an Amos Graphics form, press F1 while holding the mouse pointer over the form's title bar. A Help window will open. The forms name is displayed in square brackets at the bottom of the help window. (String) The name of a control on an Amos Graphics form. To learn a controls name, hold the mouse pointer over the control and press SHIFT-F1. A help window will open. The controls name will be displayed in square brackets at the bottom of the help window.
controlName
135
GlobalShowMenu Method
This method is no longer supported. Use the ToolsCustomize (on page 166) method instead.
136
GlobalShowTools Method
This method is no longer supported. Use the ToolsCustomize (on page 166) method instead.
137
GroupSelect Method
Selects a group. This method is equivalent to selecting a group in the group list of the Amos Graphics window.
Syntax
PathDiagrammer.GroupSelect (groupNameOrNumber) The GroupSelect method syntax has the following parts:
Part
groupNameOrNumber
Description
A group name, or a group number (where group number 1 is the first group).
138
139
HelpAmosOnTheWeb Method
Uses your web browser to visit the Amos website. This method is equivalent to the menu selection Help Amos on the Web.
Syntax
PathDiagrammer.HelpAmosOnTheWeb ()
140
HelpContents Method
Opens a help window and displays the table of contents for Amoss online help system. This method is equivalent to the menu selection Help Contents.
Syntax
PathDiagrammer.HelpContents ()
141
HighlightArrows Method
Makes the arrows in the path diagram change color when the mouse pointer approaches. (Other path diagram objects do not change color.) Use this method to let the user click an arrow.
Syntax
PathDiagrammer.HighlightArrows ()
142
HighlightNothing Method
Prevents the objects in the path diagram from changing color when the mouse pointer approaches.
Syntax
PathDiagrammer.HighlightNothing ()
143
InterfacePropertiesApplyClick Method
Clicks the Apply button in the Interface Properties window.
Syntax
result = PathDiagrammer.InterfacePropertiesApplyClick The InterfacePropertiesApplyClick method syntax has the following parts:
Part
result
Description
(Integer) 0 if no error.
144
InvalidateOutput Method
Disables the toolbox buttons and menu items that are used for displaying results. If an output path diagram is visible, it is replaced by the input path diagram. Use this method after your program has made a change that makes previously generated output invalid.
Syntax
PathDiagrammer.InvalidateOutput ()
145
IsDirtyAmp Method
Gets a value that tells how much the model has changed since the last time it was fitted.
Syntax
result = PathDiagrammer.IsDirtyAmp () The IsDirtyAmp method syntax has the following parts:
Part
result
Description
0 = No change. 1 = There have been cosmetic changes (e.g., an object has been moved). 2 = Parameter constraints have changed. 3 = The model has change structurally (e.g., an object has been added)
146
IsDirtyAmw Method
Gets a value that tells how much the model has changed since the last time it was saved as an AMW file.
Syntax
result = PathDiagrammer.IsDirtyAmw () The IsDirtyAmw method syntax has the following parts:
Part
result
Description
0 = No change. 1 = There have been cosmetic changes (e.g., an object has been moved). 2 = Parameter constraints have changed. 3 = The model has change structurally (e.g., an object has been added)
147
ModelAdd Method
Adds a new model.
Syntax
PathDiagrammer.ModelAdd (modelName, modelConstraints) The ModelAdd method syntax has the following parts:
Part
modelName modelConstraints
Description
A name for the new model. Equality constraints on parameters, separated by semicolons. For example, a=b=c or a=1;b=0;c=d=f.
148
ModelDelete Method
Deletes the model that is currently selected in the Amos Graphics window. This method is equivalent to pressing the Delete button in the Manage Models dialog.
Syntax
PathDiagrammer.ModelDelete () See ModelSelect Method Example (on page 151)
149
ModelRedefine Method
Changes the name and the definition of an existing model.
Syntax
PathDiagrammer.ModelRedefine (modelNumber, modelName, modelConstraints) The ModelRedefine method syntax has the following parts:
Part
modelNumber modelName modelConstraints
Description
A model number. Model number 1 is the first model. A new name for the model specified by modelNumber. New parameter constraints for the model specified by modelNumber. For example, a=b=c or a=1;b=0;c=d=f.
150
ModelSelect Method
Selects a model in the panel at the left side of the Amos Graphics window.
Syntax
PathDiagrammer.ModelSelect (modelNumber) PathDiagrammer.ModelSelect (modelName) The ModelSelect method syntax has the following parts:
Part
modelNumber modelName
Description
A model number. Model number 1 is the first model. A model name.
151
152
PDE Method
Gets an element of a path diagram a rectangle, ellipse, arrow or figure caption.
Syntax
result = PathDiagrammer.PDE (theElement) result = PathDiagrammer.PDE (elementNumber) result = PathDiagrammer.PDE (variableName)
Syntax 2
result = PathDiagrammer.PDE (theElement1, theElement2) result = PathDiagrammer.PDE (elementNumber1, elementNumber2) result = PathDiagrammer.PDE (variableName1, variableName2) The PDE method syntax 1 has the following parts:
Part
result theElement elementNumber variableName
Description
An object of type PDElement. An object of type PDElement. (Integer) An object number. Objects in a path diagram are numbered starting with 1. (String) A variable name.
Description
A single-headed or double-headed arrow (an object of type PDElement.) If the two variables (rectangles or ellipses) specified as function arguments are connected by a double-headed arrow, result is set equal to that double-headed arrow. If there is a single-headed arrow that points from the first variable to the second variable, result is set equal to that single-headed arrow. Otherwise, result is set equal to nothing (null). Objects of type PDElement that are both variables (rectangles or ellipses). Two integers that specify variables (rectangles or ellipses). Objects in a path diagram are numbered starting with 1. The names of two variables.
153
154
PluginsPlugins Method
Opens the Plugins dialog for creating, running, editing and deleting plugins. This method is equivalent to the menu selection Plugins Plugins.
Syntax
PathDiagrammer.PluginsPlugins ()
155
PopAllButtons Method
Pops all the buttons in the Amos Graphics toolbox.
Syntax
PathDiagrammer.PopAllButtons ()
156
PropertyGet Method
Retrieves the value of a property that was previously saved using the PropertySave (see "PropertySave Method" on page 158) method.
Syntax
result = PathDiagrammer.PropertyGet (propertyName, defaultValue) The PropertyGet method syntax has the following parts:
Part
result propertyName defaultValue
Description
(String) The value of the property called propertyName. (String) The name of a property. A string that is returned as the value of PropertyGet when no property with the name propertyName exists.
157
PropertyRemove Method
Removes a property associated with a path diagram or with an element of a path diagram.
Syntax
PathDiagrammer.PropertyRemove (propertyName) The PropertyRemove method syntax has the following parts:
Part
propertyName
Description
A string containing the name of a property.
158
PropertySave Method
Saves a string that can later be retrieved by name using the PropertyGet (see "PropertyGet Method" on page 156) method.
Syntax
PathDiagrammer.PropertySave (propertyName, value) The PropertySave method syntax has the following parts:
Part
propertyName value
Description
A string. A string. A subsequent use of the PropertyGet (see "PropertyGet Method" on page 156) method that specifies a property name of propertyName will return value.
159
Refresh Method
Refreshes the Amos Graphics window. This method can be used after other methods that change the path diagram in order to make sure that the changes are made visible immediately.
Syntax
PathDiagrammer.PluginsPlugins () For an example, see DiagramDrawIndicatorVariable Method Example (on page 64).
160
SetControl Method
The GetControl method is no longer supported. Use one of the following methods instead. GetButton Method (on page 123) GetCheckBox Method (on page 124) GetRadioButton Method (on page 133) GetTextBox Method (on page 134)
161
SetDataFile Method
Specifies the data file for a single group.
Syntax
result = PathDiagrammer.SetDataFile (groupNumber, dbFormat, fileName, tableName, groupingVariable, groupingValue) The SetDataFile method syntax has the following parts:
Part
result groupNumber dbFormat fileName tableName groupingVariable
Description
0 if successful. Group number of the group for which the data file information is specified. The first group is group number 1. (Integer) A database format specifier, as described in Settings. (String) The name of the data file. (String) The name of the data table within the data file (for data files that contain multiple data tables). (String) The name of the grouping variable. The empty string if there is no grouping variable. At present, only the empty string is allowed. (Grouping variables are not implemented for the SetDataFile method.) (Object) The value of the grouping variable for this group. At present, groupingValue is ignored.
groupingValue
Settings
The settings for dbFormat are:
Constant
mmDBASE3 mmDBASE4 mmDBASE5 mmEXCEL3 mmEXCEL4 mmEXCEL5 mmEXCEL97 mmFOXPRO20 mmFOXPRO25 mmFOXPRO26 mmLOTUSWK1 mmLOTUSWK3 mmLOTUSWK4 mmAccess mmSPSS
Value Description
0 1 2 3 4 5 6 7 8 9 11 12 13 14 18 Dbase III Dbase IV Dbase V Excel 3 Excel 4 Excel 5, Excel 7 Excel 97, Excel 8 Foxpro 2.0 Foxpro 2.5 Foxpro 2.6 Lotus *.wk1 Lotus *.wk3 Lotus *.wk4 Microsoft Access PASW Statistics
162
Constant
mmText
Value Description
19 Text
163
164
SpecifyModel Method
Obtain a model specification and data file name(s) from Amos Graphics.
Syntax
PathDiagrammer.SpecifyModel (sem) The SpecifyModel property syntax has the following parts:
Part
sem
Description
An object of type AmosEngine.
Use this method if you want to use Amos Graphics for model specification, but want to perform a nonstandard analysis that cannot be performed in Amos Graphics. See example (see "SpecifyModel Method Example" on page 165).
165
'The Amos engine now has the model specification, 'but the model has not yet been fitted. 'Fit it now using the Amos Engine (not Amos Graphics) 'and display the discrepancy function. Sem.FitModel() MsgBox(Sem.Cmin) Sem.Dispose() End Function Public Function Name() As String Implements IPlugin.Name End Function Public Function Description() As String Implements IPlugin.Description End Function End Class
166
ToolsCustomize
Opens a dialog for reorganizing the toolbox and menus. This method is equivalent to the menu selection Tools Customize.
Syntax
PathDiagrammer.ToolsCustomize ()
167
ToolsGolden Method
Turns on or off the drawing of subsequently drawn rectangles as golden sections. This method is equivalent to the menu selection Tools Golden.
Syntax
PathDiagrammer.ToolsGolden ()
168
ToolsListFont Method
This method is equivalent to the menu selection Tools List Font.
Syntax
PathDiagrammer.ToolsListFont ()
169
ToolsOutline Method
Turns on or off the display of variable names, parameter constraints and arrow heads. This method is equivalent to the menu selection Tools Outline.
Syntax
PathDiagrammer.ToolsOutline ()
170
ToolsSeedManager Method
Opens the Seed Manager window. This method is equivalent to the menu selection Tools Seed Manager.
Syntax
PathDiagrammer.ToolsSeedManager ()
171
ToolsSmart Method
Turns on or off the preservation of symmetries when objects are moved and resized. This method is equivalent to the menu selection Tools Smart.
Syntax
PathDiagrammer.ToolsSmart ()
172
ToolsSquare Method
Turns on or off the drawing of rectangles as square. This method is equivalent to the menu selection Tools Square.
Syntax
ToolsSquare ()
173
ToolsWriteAProgram Method
Converts the path diagram in the Amos Graphics window into an equivalent Visual Basic program. This method is equivalent to the menu selection Tools Write a Program.
Syntax
PathDiagrammer.ToolsWriteAProgram ()
174
UndoResume Method
Enables undo-ing of modifications to the path diagram. Typically, a program that modifies a path diagram begins with UndoToHere (see "UndoToHere Method" on page 175) and ends with UndoResume. Then all modifications made by the program can be undone with one press of the Undo button .
Syntax
PathDiagrammer.UndoResume () See Use the Amos Graphics classes to change the appearance of latent variables (on page 739)
175
UndoToHere Method
Saves the state of the path diagram. A subsequent Undo restores this state. After UndoToHere, modifications to a path diagram that are normally undo-able, such as drawing or erasing an object, cannot be undone. To restore the ability to undo such modifications use the UndoResume (see "UndoResume Method" on page 174) method. Typically, a program that modifies a path diagram begins with UndoToHere and ends with UndoResume (see "UndoResume Method" on page 174). Then all modifications made by the program can be undone with one click of the Undo button .
Syntax
PathDiagrammer.UndoToHere () See Use the Amos Graphics classes to change the appearance of latent variables (on page 739)
176
ViewAnalysisProperties Method
Opens the Analysis Properties dialog. This method is equivalent to the menu selection View AnalysisProperties.
Syntax
PathDiagrammer.ViewAnalysisProperties ()
177
ViewFullScreen Method
Displays the Amos Graphics window maximized without a title bar, or displays it normally.
Syntax
PathDiagrammer.ViewFullScreen (tf) The ViewFullScreen method syntax has the following parts:
Part
tf
Description
If tf is True, display the Amos Graphics window maximized without a title bar. Otherwise, display it normally.
178
ViewInterfaceProperties Method
Opens the Interface Properties dialog.
Syntax
PathDiagrammer.ViewInterfaceProperties ()
179
ViewMatrixRepresentation Method
Opens the Matrix Representation dialog.
Syntax
PathDiagrammer.ViewMatrixRepresentation ()
180
ViewObjectProperties Method
Opens the Object Properties dialog.
Syntax
PathDiagrammer.ViewObjectProperties () PathDiagrammer.ViewObjectProperties (theElement) PathDiagrammer.ViewObjectProperties (elementNumber) PathDiagrammer.ViewObjectProperties (variableName) The ViewObjectProperties method syntax has the following parts:
Part
theElement elementNumber
Description
When the Object Properties dialog opens it displays the properties of theElement. When the Object Properties dialog opens it displays the properties of object number elementNumber. (Objects in a path diagram are numbered starting with 1.) When the Object Properties dialog opens it displays the properties of the ellipse or rectangle that represents the variable called variableName.
variableName
181
ViewParameters Method
Displays a list of model parameters.
Syntax
PathDiagrammer.ViewParameters ()
182
ViewTextOutput Method
Displays the text output from an analysis. This method is equivalent to the menu selection View Text Output.
Syntax
PathDiagrammer.ViewTextOutput ()
183
ViewVariablesInDataset Method
Displays a list of the variables in the data file.
Syntax
PathDiagrammer.ViewVariablesInDataset ()
184
ViewVariablesInModel Method
Displays a list of all variables in the model.
Syntax
PathDiagrammer.ViewVariablesInModel ()
185
Window Method
Gets the Amos Graphics window.
Syntax
result = PathDiagrammer.Window () The Window method syntax has the following parts:
Part
result
Description
The Amos Graphics window, of type System.Windows.Window.
186
XYObject Method
Gets the object with coordinates (x, y).
Syntax
result = PathDiagrammer.XYObject (x, y) The XYObject method syntax has the following parts:
Part
result x, y
Description
The object (of type PDElement) with coordinates (x, y). If there is no object at (x, y), result = nothing. The coordinates of a point. x is expressed in inches from the left margin. y is expressed in inches from the top margin.
See MouseDown and MouseUp Events Example (see "MouseUp Event Example" on page 202)
187
188
AboutToShowMsgBox Event
Event that occurs just before Amos Graphics displays certain message boxes.
Syntax
PathDiagrammer.AboutToShowMsgBox (messageID, prompt, theMessageBoxResult) The AboutToShowMsgBox method syntax has the following parts:
Part
messageID prompt
Description
(Integer) A number that identifies the message that is about to be displayed. At present, messageID=1 is the only value that occurs. The text that is about to be displayed in a message box.
theMessageBo (Of type Windows.MessageBoxResult) If you set xResult theMessageBoxResult=None, Amos Graphics will display the message box. If you set theMessageBoxResult to a value other than None, Amos Graphics will not display the message box. Instead, Amos Graphics will execute the code that would have been executed if the message box had been displayed and the user had clicked the response button corresponding to theMessageBoxResult.
Settings
The settings for messageID are:
Value Description
1 Do you want to save your work?...
189
190
AmwFileRead Event
Event that occurs after Amos Graphics has finished reading a path diagram (*.amw) file.
Syntax
PathDiagrammer.AmwFileRead (fileName) The AmwFileRead method syntax has the following parts:
Part
fileName
Description
(String) Name of the file that was read.
191
192
AmwFileWritten Event
Event that occurs after Amos Graphics has finished writing a path diagram (*.amw) file.
Syntax
PathDiagrammer.AmwFileWritten (fileName, isTemplate) The AmwFileWritten method syntax has the following parts:
Part
fileName isTemplate
Description
193
194
ButtonPressed Event
Event that occurs when a toolbox button, or the equivalent menu item, is clicked.
Syntax
PathDiagrammer.ButtonPressed (buttonNumber, handled) The ButtonPressed event syntax has the following parts:
Part
buttonNumber handled
Description
An integer that identifies the button that caused the event. Set handled=1 to cause Amos Graphics to perform normal processing of the button click after the return from the ButtonPressed event. Set handled=0 to suppress normal processing of the button click. In other words, set handled=1 if you want to substitute your handling of a button click in place of Amos Graphicss normal handling. Set handled=0 to perform your handling of a button click before Amos Graphicss normal handling.
Settings
The settings for buttonNumber are:
Value
38 95 39 70 40 41 96 43 44 104 46
Menu item
File->New File->New with Template... File->Open... File->Retrieve Backup... File->Save File->Save As... File->Save As Template... File->Data Files... File->Print... File->Manager... Exit
Value
51 52 53 14 67 68 80
Menu item
Edit->Undo Edit->Redo Edit->Copy (to clipboard) Edit->Select Edit->Select All Edit->Deselect All Edit->Link
195
Value
9 10 5 23 76 75 24 20 21 86 37 66
Menu item
Edit->Move Edit->Duplicate Edit->Erase Edit->Move Parameter Edit->Reflect Edit->Rotate Edit->Shape of Object Edit->Space Horizontally Edit->Space Vertically Edit->Drag Properties... Edit->Fit to Page Edit->Touch Up
Value
87 88 85 89 90 91 92 42 60
Menu item
View->Interface Properties... View->Analysis Properties... View->Object Properties... View->Variables in Model... View->Variables in Dataset... View->Parameters... View->Matrix Representation... View->Text Output View->Full Screen
Value
1 2 3 4 6 77 78 8 31 32 33 30
Menu item
Diagram->Draw Observed Diagram->Draw Unobserved Diagram->Draw Path Diagram->Draw Covariance Diagram->Figure Caption Diagram->Draw Indicator Variable Diagram->Draw Unique Variable Diagram->Zoom Diagram->Zoom In Diagram->Zoom Out Diagram->Zoom Page Diagram->Scroll
196
Value
25 83
Menu item
Diagram->Loupe Diagram->Redraw diagram
Value
7 98 94 93 71 22 79 107 108 110 111
Menu item
Analyze->Calculate Estimates Analyze->Stop Calculating Estimates Analyze->Manage Groups... Analyze->Manage Models... Analyze->Modeling Lab... Analyze->Toggle Observed/Unobserved Analyze->Degrees of freedom... Analyze->Specification Search... Analyze->Multiple-Group Analysis... Analyze->Bayesian Estimation... Analyze->Data Imputation...
Value
102 74 72 54 55 109 56
Menu item
Tools->List Font... Tools->Smart Tools->Outline Tools->Square Tools->Golden Tools->Seed Manager... Tools->Customize
Value
102
Menu item
Plugins->Plugins...
Value
57 103 58
Menu item
Help->Contents Help->Amos on the Web Help->About Amos
197
198
Idle Event
The Idle event occurs periodically when Amos Graphics is not busy. You can use this event for any processing that you want to take place in the background.
Syntax
PathDiagrammer.Idle ()
199
MouseDown Event
Event that occurs when a mouse button is pressed.
Syntax
PathDiagrammer.MouseDown (button, shift, x, y) The MouseDown event syntax has the following parts:
Part
button shift
Description
An enum of type System.Windows.Forms.MouseButtons that identifies the button that was pressed to cause the event. Returns an integer that corresponds to the state of the SHIFT, CTRL, and ALT keys when the button specified in the button argument is pressed. A bit is set if the key is down. The shift argument is a bit field with the least-significant bits corresponding to the SHIFT key (bit 0), the CTRL key (bit 1), and the ALT key (bit 2 ). These bits correspond to the values 1, 2, and 4, respectively. The shift argument indicates the state of these keys. Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed. For example, if both CTRL and ALT were pressed, the value of shift would be 6. (Single) The coordinates of the mouse pointer. x is expressed in inches from the left margin. y is expressed in inches from the top margin.
x, y
See MouseDown and MouseUp Events Example (see "MouseUp Event Example" on page 202)
200
201
MouseUp Event
Event that occurs when a mouse button is released.
Syntax
PathDiagrammer.MouseUp (button, shift, x, y) The MouseUp event syntax has the following parts:
Part
button shift
Description
An enum of type System.Windows.Forms.MouseButtons that identifies the button that was pressed to cause the event. Returns an integer that corresponds to the state of the SHIFT, CTRL, and ALT keys when the button specified in the button argument is released. A bit is set if the key is down. The shift argument is a bit field with the least-significant bits corresponding to the SHIFT key (bit 0), the CTRL key (bit 1), and the ALT key (bit 2 ). These bits correspond to the values 1, 2, and 4, respectively. The shift argument indicates the state of these keys. Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed. For example, if both CTRL and ALT were pressed, the value of shift would be 6. (Single) The coordinates of the mouse pointer. x is expressed in inches from the left margin. y is expressed in inches from the top margin.
x, y
202
203
NewObjectCreated Event
Event that occurs after a new object is added to the path diagram.
Syntax
PathDiagrammer.NewObjectCreated (nObjects) The NewObjectCreated event syntax has the following parts:
Part
nObjects
Description
The number of objects in the path diagram, including the one that was just added.
204
ObjectEntered Event
Event that occurs when the mouse pointer comes close to an object and the object changes color.
Syntax
PathDiagrammer.ObjectEntered (button, shift, objectNumber) The ObjectEntered event syntax has the following parts:
Part
button shift
Description
An enum of type System.Windows.Forms.MouseButtons that gives the state of the mouse buttons when the event occurred. An integer that corresponds to the state of the SHIFT, CTRL, and ALT keys. A bit is set if the key is down. The shift argument is a bit field with the least-significant bits corresponding to the SHIFT key (bit 0), the CTRL key (bit 1), and the ALT key (bit 2 ). These bits correspond to the values 1, 2, and 4, respectively. The shift argument indicates the state of these keys. Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed. For example, if both CTRL and ALT were pressed, the value of shift would be 6. A number identifying the object that changed color when the mouse pointer came near.
objectNumber
205
OpenWindowsUpdated Event
Event that occurs when a change in the model or the data requires an update of the following windows. Matrix Representation Variables in Model Variables in Dataset Parameters Object Properties
These windows are updated automatically. The event is raised so that you can update your own windows at the same time if necessary.
Syntax
PathDiagrammer.OpenWindowsUpdated ()
206
OutputIsInvalid Event
Event that occurs when Amos Graphics disables the toolbox buttons and the menu items that are used for displaying results.
Syntax
PathDiagrammer.OutputIsInvalid ()
207
PDChanged Event
Event that occurs when Amos Graphics starts a new path diagram or opens an existing path diagram.
Syntax
PathDiagrammer.PDChanged ()
208
PostFitResults Event
Event that occurs after model fitting is complete.
Syntax
PathDiagrammer.PostFitResults (sem, modelName, status) The PostFitResults event syntax has the following parts:
Part
sem
Description
An object of type AmosEngine. sem is the AmosEngine instance used by Amos Graphics. The Group 3 methods of the sem object can be used in the PostFitResults event to obtain the results of the analysis (see Timing is Everything (on page 279) and Group 3: Methods for retrieving results (on page 285)). A string containing the name of the model that has just been fitted. Zero if the model was successfully fitted. Nonzero otherwise.
modelName status
See Use the Amos Graphics classes to calculate a new fit measure (on page 737)
209
PreFitOptions Event
Event that occurs before model fitting.
Syntax
PathDiagrammer.PreFitOptions (sem) The PreFitOptions event syntax has the following parts:
Part
sem
Description
An object of type AmosEngine. sem is the AmosEngine instance used by Amos Graphics. The Group 1 methods of the sem object can be used in the PreFitOptions event to specify options that affect model fitting (see Timing is Everything (on page 279) and Group 1: Declarative methods (on page 280)).
See Use the Amos Graphics classes to calculate a new fit measure (on page 737)
210
Syntax
PathDiagrammer.QueryUnload (cancel) The QueryUnload event syntax has the following parts:
Part
cancel
Description
(Boolean) Set cancel to True in order to prevent the Amos Graphics window from closing. Otherwise, the window will close.
211
Quitting Event
Event that occurs when the Amos Graphics window is closed.
Syntax
PathDiagrammer.Quitting () See MouseDown and MouseUp Events Example (see "MouseUp Event Example" on page 202)
212
213
BorderColor Property
Gets or sets the color of lines used to draw arrows and to draw the outlines of rectangles and ellipses.
Syntax
object.borderColor [= color] The borderColor property syntax has the following parts:
Part
object color
Description
An object of type PDElement a rectangle, ellipse or arrow. A 32-bit ARGB value corresponding to a System.Drawing.Color structure.
See Use the Amos Graphics classes to change the appearance of latent variables (on page 739)
214
Estimate1 Property
Gets a parameter estimate either a regression weight, a covariance or a variance.
Syntax
result = object.estimate1 The estimate1 property syntax has the following parts:
Part Description
When parameter estimates are displayed on the path diagram in the Amos window, result is a parameter estimate associated with object. result is a regression weight if object is a single-headed arrow. result is a covariance if object is a double-headed arrow. result is a variance if object is an exogenous variable. A rectangle, ellipse or arrow (an object of type PDElement.)
result
object
215
Estimate2 Property
Gets a parameter estimate either a mean or an intercept.
Syntax
result = object.estimate2 The estimate2 property syntax has the following parts:
Part Description
When parameter estimates are displayed on the path diagram in the Amos window, and when means and intercepts are explicit model parameters (see To estimate means and intercepts), result is a parameter estimate associated with object. result is an intercept if object is an endogenous variable. result is a mean if object is an exogenous variable. A rectangle or ellipse (an object of type PDElement.)
result
object
216
FillColor Property
Gets or sets the color of the interior of rectangles and ellipses. The FillColor property is ignored if FillStyle (see "FillStyle Property" on page 217)=0.
Syntax
object.FillColor [= color] The FillColor property syntax has the following parts:
Part
object color
Description
An object of type PDElement. A 32-bit ARGB value corresponding to a System.Drawing.Color structure.
See Use the Amos Graphics classes to change the appearance of latent variables (on page 739)
217
FillStyle Property
The FillStyle property is ignored. It is retained for syntactic compatibility with previous versions of Amos.
Syntax
object.fillStyle [= value] The fillStyle property syntax has the following parts:
Part
object value
Description
A rectangle or ellipse (an object of type PDElement.)
0 if object is to be filled with the solid color specified by the fillColor (see "FillColor Property" on page 216) property. 1 if object is to be transparent.
218
Height Property
Gets or sets the height of a rectangle or ellipse.
Syntax
object.Height [= value] The Height property syntax has the following parts:
Part
object value
Description
An object of type PDElement. The height of object, in inches
See Use the Amos Graphics classes to resize all rectangles (see "Use the Amos Graphics classes to resize all rectangles in Amos Graphics" on page 748)
219
InvisibleName Property
Gets or sets a value that is True for a variable whose name is invisible. The value of this property has no effect on the display of parameters, rectangles, ellipses or arrows. Setting an objects InvisibleName property to True has the effect of unchecking Show name on the Visibility tab of the Object Properties dialog. The InvisibleName property is ignored if Use visibility settings is unchecked on the Visibility tab of the Object Properties dialog.
Syntax
object.InvisibleName [= value] The InvisibleName property syntax has the following parts:
Part
object value
Description
A rectangle or ellipse (an object of type PDElement.) True if objects name is invisible.
220
InvisibleParameters Property
Gets or sets a value that is True for a rectangle, ellipse or arrow whose parameters are invisible. The value of this property has no effect on the display of rectangles, ellipses, arrows or variable names. Setting an objects InvisibleParameters property to True has the effect of unchecking Show parameters on the Visibility tab of the Object Properties dialog. The InvisibleParameters property is ignored if Use visibility settings is unchecked on the Visibility tab of the Object Properties dialog.
Syntax
object.InvisibleParameters [= value] The InvisibleParameters property syntax has the following parts:
Part
object value
Description
An object of type PDElement. True if objects parameters are invisible.
221
InvisiblePicture Property
Gets or sets a value that is True for a rectangle, ellipse or arrow that is invisible. The value of this property has no effect on the display of parameters or variable names. Setting an objects InvisiblePicture property to True has the effect of unchecking Show picture on the Visibility tab of the Object Properties dialog. The InvisiblePicture property is ignored if Use visibility settings is unchecked on the Visibility tab of the Object Properties dialog.
Syntax
object.InvisiblePicture [= value] The InvisiblePicture property syntax has the following parts:
Part
object value
Description
An object of type PDElement. True if objects rectangle, ellipse or arrow is invisible.
222
223
IsHighlighted Property
Gets or sets a value that is True for the object that is highlighted and False for other objects. (By default, the highlighted object is colored red.)
Syntax
object.IsHighlighted [= value] The IsHighlighted property syntax has the following parts:
Part
object value
Description
An object of type PDElement. True if object is highlighted.
224
IsSelected Property
Gets or sets a value that determines whether a path diagram element has been selected. Typically, path diagram elements are selected by using the EditSelect (see "EditSelect Method" on page 103) method or the EditSelectAll (see "EditSelectAll Method" on page 104) method.
Syntax
object.IsSelected [= value] The IsSelected property syntax has the following parts:
Part
object value
Description
An object of type PDElement. True if object is a selected path diagram object.
See Use the Amos Graphics classes to draw double-headed arrows (on page 745)
225
LongLabel Property
Gets or sets a character string used (instead of a variables name) to label a rectangle or ellipse.
Syntax
object.LongLabel [= value] The LongLabel property syntax has the following parts:
Part
object value
Description
A rectangle or ellipse (an object of type PDElement.) A character string used as a label for object.
226
NameColor Property
Gets or sets the color of variable names and figure captions.
Syntax
object.NameColor [= Color] The NameColor property syntax has the following parts:
Part
object color
Description
An object of type PDElement. A 32-bit ARGB value corresponding to a System.Drawing.Color structure.
See Use the Amos Graphics classes to change the appearance of latent variables (on page 739)
227
NameFontBold Property
Gets or sets a value that determines whether a variable name or figure caption is displayed in a bold font.
Syntax
object.NameFontBold [= value] The NameFontBold property syntax has the following parts:
Part
object value
Description
A rectangle, ellipse or figure caption (an object of type PDElement.) (Integer) -1 if objects name is displayed in a bold font. 0 otherwise.
228
229
NameFontItalic Property
Gets or sets a value that determines whether a variable name or figure caption is displayed in an italic font.
Syntax
object.NameFontItalic [= value] The NameFontItalic property syntax has the following parts:
Part
object value
Description
A rectangle, ellipse or figure caption (an object of type PDElement.) (Integer) -1 if objects name is displayed in an italic font. 0 otherwise.
230
NameFontSize Property
Gets or sets the font size used to display a variable name or figure caption.
Syntax
object.NameFontSize [= value] The NameFontSize property syntax has the following parts:
Part
object value
Description
A rectangle, ellipse or figure caption (an object of type PDElement.) (Single) The font size used to display objects name.
See Use the Amos Graphics classes to draw a path diagram (on page 742)
231
NameHeight Property
Gets the height of a variable name or figure caption.
Syntax
result = object.NameHeight The NameHeight property syntax has the following parts:
Part
result object
Description
The height, in inches, of objects variable name or figure caption A rectangle, ellipse or figure caption (an object of type PDElement.)
See Use the Amos Graphics classes to resize all rectangles (see "Use the Amos Graphics classes to resize all rectangles in Amos Graphics" on page 748)
232
NameOrCaption Property
Gets or sets a figure caption or a variable name.
Syntax
object.NameOrCaption [= value] The NameOrCaption property syntax has the following parts:
Part
object value
Description
A rectangle, ellipse or figure caption (an object of type PDElement.) A figure caption or variable name.
See Use the Amos Graphics classes to draw a path diagram (on page 742)
233
NameWidth Property
Gets the width of a variable name or figure caption.
Syntax
result = object.NameWidth The NameWidth property syntax has the following parts:
Part
result object
Description
The width, in inches, of objects variable name or figure caption A rectangle, ellipse or figure caption (an object of type PDElement.)
See Use the Amos Graphics classes to resize all rectangles (see "Use the Amos Graphics classes to resize all rectangles in Amos Graphics" on page 748)
234
OriginX Property
Gets or sets the X coordinate of the center of a rectangle or ellipse.
Syntax
object.OriginX [= value] The OriginX property syntax has the following parts:
Part
object value
Description
A rectangle or ellipse (an object of type PDElement.) (Single) The distance, in inches, of objects center from the left margin.
235
OriginY Property
Gets or sets the Y coordinate of the center of a rectangle or ellipse.
Syntax
object.OriginY [= value] The OriginY property syntax has the following parts:
Part
object value
Description
A rectangle or ellipse (an object of type PDElement.) (Single) The distance, in inches, of objects center from the top margin.
236
ParameterColor Property
Gets or sets the color of parameter constraints and parameter estimates.
Syntax
object.ParameterColor [= color] The ParameterColor property syntax has the following parts:
Part
object color
Description
An object of type PDElement. A 32-bit ARGB value corresponding to a System.Drawing.Color structure.
See Use the Amos Graphics classes to change the appearance of latent variables (on page 739)
237
ParameterFontBold Property
Gets or sets a value that determines whether a variables parameter constraints and parameter estimates are displayed in a bold font.
Syntax
object.ParameterFontBold [= value] The ParameterFontBold property syntax has the following parts:
Part
object value
Description
A rectangle, ellipse or arrow (an object of type PDElement.) (Integer) -1 if parameter constraints and parameter estimates associated with object are displayed in a bold font. 0 otherwise.
238
239
ParameterFontItalic Property
Gets or sets a value that determines whether a variables parameter constraints and parameter estimates are displayed in an italic font.
Syntax
object.ParameterFontItalic [= value] The ParameterFontItalic property syntax has the following parts:
Part
object value
Description
A rectangle, ellipse or arrow (an object of type PDElement.) (Integer) -1 if parameter constraints and parameter estimates associated with object are displayed in an italic font. 0 otherwise.
240
ParameterFontSize Property
Gets or sets the font size used to display a variables parameter constraints and parameter estimates.
Syntax
object.ParameterFontSize [= value] The ParameterFontSize property syntax has the following parts:
Part
object value
Description
A rectangle, ellipse or arrow (an object of type PDElement.) (Single) The font size used to display parameter constraints and parameter estimates associated with object.
See Use the Amos Graphics classes to draw a path diagram (on page 742)
241
ParameterFormat Property
Gets or sets the parameter formats for this object. These formats override those specified with in the View Interface Properties dialog. The ParameterFormat property can be modified interactively using the Format tab of the Object Properties dialog.
Syntax
object.ParameterFormat (formatName, formatType)[= value] The ParameterFormat property syntax has the following parts:
Part
object formatName
Description
A rectangle, ellipse or arrow (an object of type PDElement.). A string containing the name of a parameter format either Unstandardized estimates, Standardized estimates or the name of a user-defined format as defined on the Amos Graphics View Interface Properties Formats tab. See To create a new format. A constant, as described in Settings, specifying a parameter type. A parameter format containing the format descriptors x.xx, y.yy and z.zz, in addition to any labels. Use x.xx for unstandardized regression weights, variances and covariances, y.yy for mean and intercept parameters, and z.zz for standardized regression weights, correlations and squared multiple correlations. To increase the number of decimal digits on the display, use format descriptors with additional trailing characters, e.g., x.xxx for 3-digit precision. A detailed description of parameter formats can be found in the Amos Graphics online help, under To create a new format.
formatType value
Settings
The settings for formatType are:
Constant
pdExogenousNoMeans
Value Description
0 When means are not estimated, value is the format for the variance of an exogenous variable. When means are estimated, value is the format for the mean and variance of an exogenous variable. When means are not estimated, value is the format for an endogenous variable. (An endogenous variable has no parameters associated with it when means are not estimated. However, value is displayed on the path diagram as a constant string.) When means and intercepts are estimated, value is the format for the intercept associated with an endogenous variable. value is the format for a regression weight. value is the format for a covariance.
pdExogenousMeans
pdEndogenousNoMeans
pdEndogenousMeans
pdPaths pdCovariances
4 5
242
243
244
ParameterOrientation Property
Gets or sets a value that determines the orientation of parameter constraints and estimates.
Syntax
object.ParameterOrientation [= value] The ParameterOrientation property syntax has the following parts:
Part
object value
Description
A rectangle, ellipse or arrow (an object of type PDElement.) 0=Horizontal; 1=Oblique; 2=Oblique, Inverted.
245
246
Penwidth Property
Gets or sets the width of lines used to draw rectangles, ellipses and arrows.
Syntax
object.Penwidth [= value] The Penwidth property syntax has the following parts:
Part
object value
Description
A rectangle, ellipse or arrow (an object of type PDElement.) Of type integer, the width (in units of 1/96 inch) of lines used to draw rectangles, ellipses and arrows.
See Use the Amos Graphics classes to change the appearance of latent variables (on page 739)
247
TermX Property
For rectangles, gets or sets the X coordinate of the lower right corner. For ellipses, gets or sets the X coordinate of the lower right corner of the bounding rectangle.
Syntax
object.TermX [= value] The TermX property syntax has the following parts:
Part
object value
Description
A rectangle or ellipse (an object of type PDElement.) If object is a rectangle, value is the X coordinate of its lower right corner. If object is an ellipse, value is the X coordinate of the lower right corner of its bounding rectangle.
248
TermY Property
For rectangles, gets or sets the Y coordinate of the lower right corner. For ellipses, gets or sets the Y coordinate of the lower right corner of the bounding rectangle.
Syntax
object.TermY [= value] The TermY property syntax has the following parts:
Part
object value
Description
A rectangle or ellipse (an object of type PDElement.) If object is a rectangle, value is the Y coordinate of its lower right corner. If object is an ellipse, value is the Y coordinate of the lower right corner of its bounding rectangle.
249
Value1 Property
Gets or sets a parameter name or fixed parameter value for a regression weight, covariance or variance.
Syntax
object.Value1 [= value] The Value1 property syntax has the following parts:
Part
object value
Description
A rectangle, ellipse or arrow (an object of type PDElement.) (String) A parameter name or a string representation of a numeric constant.
See Use the Amos Graphics classes to draw a path diagram (on page 742)
250
Value2 Property
Gets or sets a parameter name or fixed parameter value for a mean or intercept.
Syntax
object.Value2 [= value] The Value2 property syntax has the following parts:
Part
object value
Description
A rectangle or ellipse (an object of type PDElement.) (String) A parameter name or a string representation of a numeric constant.
251
Variable1 Property
Gets a rectangle or an ellipse (an object of type PDElement.) For a single-headed arrow, Variable1 is the object that the arrow points away from. For a double-headed arrow, Variable1 is one of the objects that the arrow points to.
Syntax
result = object.Variable1 The Variable1 property syntax has the following parts:
Part
result
Description
A rectangle or an ellipse (an object of type PDElement.) If object is a single-headed arrow, result is the variable that it points away from. If object is a double-headed arrow, result is one of the variables that it points to. A single-headed arrow or a double-headed arrow (an object of type PDElement.)
object
252
Variable2 Property
Gets a rectangle or an ellipse (an object of type PDElement.) For a single-headed arrow, Variable2 is the object that the arrow points to. For a double-headed arrow, Variable2 is one of the objects that the arrow points to.
Syntax
result = object.Variable2 The Variable2 property syntax has the following parts:
Part
result
Description
A rectangle or an ellipse (an object of type PDElement.) If object is a single-headed arrow, result is the variable that it points to. If object is a double-headed arrow, result is one of the variables that it points to. A single-headed arrow or a double-headed arrow (an object of type PDElement.)
object
253
Width Property
Gets or sets the width of rectangles and ellipses.
Syntax
object.Width [= value] The Width property syntax has the following parts:
Part
object value
Description
A rectangle or ellipse (an object of type PDElement.) The width, in inches, of object.
See Use the Amos Graphics classes to resize all rectangles (see "Use the Amos Graphics classes to resize all rectangles in Amos Graphics" on page 748)
254
255
Draw Method
Draws an object.
Syntax
object.Draw () The Draw method syntax has the following parts:
Part
object
Description
An object of type PDElement.
See Use the Amos Graphics classes to change the appearance of latent variables (on page 739)
256
IsCaption Method
Returns True for figure captions.
Syntax
result = object.IsCaption () The IsCaption method syntax has the following parts:
Part
result object
Description
True if object is a figure caption. An object of type PDElement.
See MouseDown and MouseUp Events Example (see "MouseUp Event Example" on page 202)
257
IsCovariance Method
Returns True for double-headed arrows (covariances).
Syntax
result = object.IsCovariance () The IsCovariance method syntax has the following parts:
Part
result object
Description
True if object is a double-headed arrow. An object of type PDElement.
258
259
IsEndogenousVariable Method
Returns True for endogenous variables.
Syntax
result = object.IsEndogenousVariable () The IsEndogenousVariable method syntax has the following parts:
Part
result object
Description
True if object is an endogenous variable. An object of type PDElement.
260
261
IsExogenousVariable Method
Returns True for exogenous variables.
Syntax
result = object.IsExogenousVariable () The IsExogenousVariable method syntax has the following parts:
Part
result object
Description
True if object is an exogenous variable. An object of type PDElement.
262
Imports AmosGraphics Imports AmosGraphics.PathDiagrammer Public Class CustomCode Implements IPlugin Public Function Mainsub() As Integer Implements IPlugin.Mainsub Dim E As PDElement UndoToHere() For Each E In PDElements If E.IsExogenousVariable Then E.Penwidth = 3 Else E.Penwidth = 1 End If Next DiagramRedrawDiagram() UndoResume() End Function Public Function Name() As String Implements IPlugin.Name End Function Public Function Description() As String Implements IPlugin.Description End Function End Class
263
IsLatentVariable Method
Returns True for latent variables.
Syntax
result = object.IsLatentVariable () The IsLatentVariable method syntax has the following parts:
Part
result object
Description
True if object is a latent variable. An object of type PDElement.
See Use the Amos Graphics classes to change the appearance of latent variables (on page 739)
264
IsObservedVariable Method
Returns True for observed variables.
Syntax
result = object.IsObservedVariable () The IsObservedVariable method syntax has the following parts:
Part
result object
Description
True if object is an observed variable. An object of type PDElement.
265
Imports AmosGraphics Imports AmosGraphics.PathDiagrammer Public Class CustomCode Implements IPlugin Public Function Mainsub() As Integer Implements IPlugin.Mainsub Dim E As PDElement UndoToHere() For Each E In PDElements If E.IsObservedVariable Then E.Penwidth = 3 Else E.Penwidth = 1 End If Next DiagramRedrawDiagram() UndoResume() End Function Public Function Name() As String Implements IPlugin.Name End Function Public Function Description() As String Implements IPlugin.Description End Function End Class
266
IsPath Method
Returns True for single-headed arrows (regression weights).
Syntax
result = object.IsPath () The IsPath method syntax has the following parts:
Part
result object
Description
True if object is a single-headed arrow. An object of type PDElement.
267
Imports AmosGraphics Imports AmosGraphics.PathDiagrammer Public Class CustomCode Implements IPlugin Public Function Mainsub() As Integer Implements IPlugin.Mainsub Dim E As PDElement UndoToHere() For Each E In PDElements If E.IsPath Then E.Penwidth = 3 Else E.Penwidth = 1 End If Next DiagramRedrawDiagram() UndoResume() End Function Public Function Name() As String Implements IPlugin.Name End Function Public Function Description() As String Implements IPlugin.Description End Function End Class
268
IsUniqueVariable Method
Returns True for unique variables i.e., for variables that are unobserved and exogenous, and that affect only one other variable.
Syntax
result = object.IsUniqueVariable () The IsUniqueVariable method syntax has the following parts:
Part
result object
Description
True if object is a unique variable. An object of type PDElement.
269
Imports AmosGraphics Imports AmosGraphics.PathDiagrammer Public Class CustomCode Implements IPlugin Public Function Mainsub() As Integer Implements IPlugin.Mainsub Dim E As PDElement UndoToHere() For Each E In PDElements If E.IsUniqueVariable Then E.Penwidth = 3 Else E.Penwidth = 1 End If Next DiagramRedrawDiagram() UndoResume() End Function Public Function Name() As String Implements IPlugin.Name End Function Public Function Description() As String Implements IPlugin.Description End Function End Class
270
IsUnobservedVariable Method
Returns True for ellipses (unobserved variables).
Syntax
result = object.IsUnobservedVariable () The IsUnobservedVariable method syntax has the following parts:
Part
result object
Description
True if object is an unobserved variable. An object of type PDElement.
271
Imports AmosGraphics Imports AmosGraphics.PathDiagrammer Public Class CustomCode Implements IPlugin Public Function Mainsub() As Integer Implements IPlugin.Mainsub Dim E As PDElement UndoToHere() For Each E In PDElements If E.IsUnobservedVariable Then E.Penwidth = 3 Else E.Penwidth = 1 End If Next DiagramRedrawDiagram() UndoResume() End Function Public Function Name() As String Implements IPlugin.Name End Function Public Function Description() As String Implements IPlugin.Description End Function End Class
272
IsVariable Method
Returns True for rectangles and ellipses (i.e., for variables).
Syntax
result = object.IsVariable () The IsVariable method syntax has the following parts:
Part
result object
Description
True if object is a rectangle or ellipse. An object of type PDElement.
273
Imports AmosGraphics Imports AmosGraphics.PathDiagrammer Public Class CustomCode Implements IPlugin Public Function Mainsub() As Integer Implements IPlugin.Mainsub Dim E As PDElement UndoToHere() For Each E In PDElements If E.IsVariable Then E.Penwidth = 3 Else E.Penwidth = 1 End If Next DiagramRedrawDiagram() UndoResume() End Function Public Function Name() As String Implements IPlugin.Name End Function Public Function Description() As String Implements IPlugin.Description End Function End Class
274
PropertyGet Method
Retrieves the value of a property that was previously saved using the PropertySave (see "PropertySave Method" on page 277) method.
Syntax
result = object.PropertyGet (propertyName, defaultValue) The PropertyGet method syntax has the following parts:
Part
result object propertyName defaultValue
Description
(String) The value of the property called propertyName. An object of type PDElement. (String) The name of a property. A string that is returned as the value of PropertyGet when no property with the name propertyName exists.
See Use the Amos Graphics classes to create user-defined properties (on page 740)
275
PropertyRemove Method
Removes a property associated with a path diagram or with an element of a path diagram.
Syntax
object.PropertyRemove (propertyName) The PropertyRemove method syntax has the following parts:
Part
object propertyName
Description
An object of type PDElement. A string containing the name of a property.
276
277
PropertySave Method
Saves a string that can later be retrieved by name using the PropertyGet (see "PropertyGet Method" on page 274) method.
Syntax
object.PropertySave (propertyName, value) The PropertySave method syntax has the following parts:
Part
object propertyName value
Description
An object of type PDElement. A string. A string. A subsequent use of the PropertyGet (see "PropertyGet Method" on page 156) method that specifies a property name of propertyName will return value.
See Use the Amos Graphics classes to create user-defined properties (on page 740)
278
Undraw Method
Temporarily erases an object.
Syntax
object.Undraw () The Undraw method syntax has the following parts:
Part
object
Description
An object of type PDElement.
See Use the Amos Graphics classes to change the appearance of latent variables (on page 739)
279
Timing is Everything
When writing an Amos program, you have to pay attention to the order in which the Amos engines methods are called. Amos methods are divided into three general groups. Group 1 Declarative Methods These are computational and output options that apply to the entire analysis. These methods tell the Amos Engine which statistics to compute and how to compute them. Group 2 Data and Model Specification Methods This group consists of data description and model specification commands for a sample of data with multigroup or multisample analyses. These commands may vary among samples. Group 3 Methods for Retrieving Results These are commands towell, retrieve results. The rule is that groups must appear in order: Group 1, then Group 2, and finally Group 3. There is also a special group that consists only of the Initialize method (see "Initialize Method (AmosEngine)" on page 463). If the optional Initialize method (see "Initialize Method (AmosEngine)" on page 463) is used, it must come even before the Group 1 methods. Some methods can be placed in more than one group.
280
281
FactorScoreWeights Method (on page 399) Fisher Method (on page 401) FitMLMoments Method (on page 405) FitUnbiasedMoments Method (on page 409) GenerateDefaultCovariances Method (on page 411) Gls Method (on page 457) ImpliedMoments Method (on page 461) InputMLMoments Method (on page 465) InputUnbiasedMoments Method (on page 467) Iterations Method (on page 482) LineLength Method (on page 484) MaxDecimalPlaces Method (on page 485) MinDecimalPlaces Method (on page 489) Ml Method (on page 490) ModelMeansAndIntercepts Method (on page 498) Mods Method (on page 500) MonteCarlo Method (on page 503) NeedBCLowerBounds, NeedBCUpperBounds Methods (on page 513) NeedBootSampleEstimates Method (on page 517) NeedEstimates Method (on page 521) NeedPCLowerBounds, NeedPCUpperBounds Methods (on page 525) NeedStandardErrors Method (on page 529) NonPositive Method (on page 533) NormalityCheck Method (on page 535) ObservedInfo Method (on page 511) PackSymmetricEstimates Method (on page 558)
282
PageLength Method (on page 559) Paginate Method (on page 560) Permute Method (on page 579) PermuteDetail Method (on page 584) ResidualMoments Method (on page 592) SampleMoments Method (on page 608) Seed Method (on page 610) SignificantFigures Method (on page 613) Sls Method (on page 614) Smc Method (on page 616) Specran Method (on page 618) Standardized Method (on page 622) TableOutput Method (on page 624) Technical Method (on page 625) TextOutput Method (on page 627) TextOutputFileName Method (on page 629) Time Method (on page 631) Title Method (on page 633) TotalEffects Method (on page 635) Uls Method (on page 637)
283
284
285
286
GetStandardErrorsEx Method (on page 454) Interrupt Method (on page 480) IsModelingMeansAndIntercepts Method (on page 481) Ncp, NcpLo, NcpHi Methods (on page 508) Npar Method (on page 540) NumberOfGroups Method (on page 545) NumberOfParameters Method (on page 547) NumberOfVariables Method (on page 551) P Method (on page 555) ParameterCovariance Method (on page 561) ParameterInfo Method (on page 564) ParameterName Method (on page 567) ParameterNumber Method (on page 569) ParameterValue Method (on page 571) ParameterVector Method (on page 573) Pclose Method (on page 576) PutParameterValue Method (on page 586) PutParameterVector Method (on page 587) PutSampleCovariances Method (on page 588) PutSampleCovariancesPacked Method (on page 589) PutSampleMoments Method (on page 590) PutSampleMomentsPacked Method (on page 591) ReviseModel Method (on page 594) Rmsea, RmseaLo, RmseaHi Methods (on page 597) RowNames Method (on page 600) RowNumbers Method (on page 604)
287
Shutdown Method (on page 612) Stable Method (on page 620) TextOutput Method (on page 627) VariableName Method (on page 645) VariableNumber Method (on page 647) WasInverted Method (on page 649)
Special Case
If the following optional method is used, it must be used before any other method. Initialize Method (AmosEngine) (on page 463)
288
289
AmosDir Property
The Amos program directory.
Syntax
result = AmosEngine.AmosDir The AmosDir property syntax has the following parts:
Part
result
Description
The Amos program directory. result is a character string ending with a backslash character, for example, c:\program files\amos 7\.
290
291
292
Adf Method
Specifies estimation by Browne's (1982) asymptotically distribution-free criterion, minimizing (D1) together with (D4) in Appendix B.
Syntax
object.Adf () The Adf method syntax has the following parts:
Part
object
Description
An object of type AmosEngine.
Placement: [1].
Default
When you do not specify an estimation criterion, the maximum likelihood criterion (see Ml Method (on page 490)) is used.
See Also
BootAdf Method (on page 313) Gls Method (on page 457) Ml Method (on page 490) Sls Method (on page 614) Uls Method (on page 637)
293
294
Admissible Method
Returns True if parameter estimates are admissible in all groups.
Syntax
object.Admissible () The Admissible method syntax has the following parts:
Part
object
Description
An object of type AmosEngine.
Placement: [3].
See Also
Stable Method (on page 620)
295
296
AllImpliedMoments Method
Controls whether the implied covariance matrix for all variables is reported. When means and intercepts are explicitly modeled, AllImpliedMoments also controls the reporting of implied means.
Syntax
object.AllImpliedMoments () object.AllImpliedMoments (tf) The AllImpliedMoments method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine.
Optional. A boolean value that controls the reporting of implied moments. True (default) requests the output. False suppresses it.
Placement: [1].
Default
The implied moments for all variables are not reported.
Remarks
The implied variances, covariances and means are estimates of the corresponding population values under the assumption that the specified model is correct. If you use both the Standardized (see "Standardized Method" on page 622) and the AllImpliedMoments methods, the implied correlation matrix will be reported, in addition to the implied covariance matrix. AllImpliedMoments is identical to ImpliedMoments, except that AllImpliedMoments displays implied variances, covariances and means for all variables in the model, not just for the observed variables.
See Also
ImpliedMoments Method (on page 461) ResidualMoments Method (on page 592) SampleMoments Method (on page 608) TextOutput Method (on page 627)
297
298
AllowUnidentified Method
Controls whether Amos tries to fit a model that appears to be unidentified.
Syntax
object.AllowUnidentified () object.AllowUnidentified (tf) The AllowUnidentified method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine. (Boolean) Optional. If tf is True (the default), Amos tries to fit a model even if it appears to be unidentified.
Placement: [1].
Default
When a model appears to be unidentified, Amos displays an error message, and quits.
Remarks
Attempting to fit an unidentified model is generally a bad idea for the following reasons: It uses more memory, and usually takes more time. It prevents Amos from using one of its most important tests for a correct solution, namely, that the matrix of second derivatives be positive definite. For hypothesis testing purposes, it requires Amos to make a correction to degrees of freedom based on the number of additional parameter constraints needed to achieve identifiability. The difficulty of numerically recognizing and diagnosing nonidentifiability is discussed in Appendix D.
See Also
NonPositive Method (on page 533)
299
300
AnyMissingValues Method
Returns True if any group has data with missing values.
Syntax
object.AnyMissingValues The AnyMissingValues method syntax has the following parts:
Part
object
Description
An object of type AmosEngine.
Placement: [3].
Remarks
The AnyMissingValues method should be used after one of the following methods: FitModel (see "FitModel Method" on page 407), FitAllModels (see "FitAllModels Method" on page 403). See Also InputVariableHasMissingValues Method (on page 469)
301
302
AStructure Method
The AStructure method is used to specify a model. It can be used to: Name the variables and parameters in the model. Specify linear dependencies among the variables. Place equality constraints on parameters. Specify start values for parameters.
Syntax
object.AStructure (s) The AStructure method syntax has the following parts:
Part
object s
Description
An object of type AmosEngine. A string that refers to one of the following: a regression weight a regression equation the covariance between two exogenous variables the variance of a single exogenous variable s is discussed more fully under Extended explanation of the AStructure method (on page 304).
Placement: [2].
Remarks
Use the MStructure (see "MStructure Method" on page 505) method to constrain the means of exogenous variables. The AStructure and MStructure (see "MStructure Method" on page 505) methods are provided for compatibility with the obsolete $structure and $mstructure commands. Consider using the newer Path (see "Path Method" on page 574), Cov (see "Cov Method" on page 370), Var (see "Var Method" on page 641), Mean (see "Mean Method" on page 486) and Intercept (see "Intercept Method" on page 477) methods for model specification.
See Also
MStructure Method (on page 505)
303
304
That is, in the path diagram there is an arrow pointing from variable2 to variable1. Amos estimates the corresponding regression weight. The AStructure method ignores dashes, so that the following four lines are equivalent.
Sem.AStructure("variable1<variable2") Sem.AStructure("variable1 <--- variable2") Sem.AStructure("variable1 <---------- variable2") Sem.AStructure("variable2 ----------> variable1")
By default, Amos assumes that the regression weights are unconstrained. However, you can set the value of any regression weight to a constant, and you can require any number of regression weights to be equal to each other. The following example shows how to impose such constraints:
Dim Sem as New AmosEngine . . . Sem.AStructure("variable1 <--Sem.AStructure("variable1 <--Sem.AStructure("variable1 <--Sem.AStructure("variable1 <--Sem.AStructure("variable1 <--Sem.AStructure("variable1 <--Sem.AStructure("variable1 <--. . .
variable2 (red)") variable3 (red)") variable4 (1)") variable5") variable6 (blue)") variable7 (blue)") variable8 (blue)")
In this example, the first two regression weights are required to be equal because they are both labeled red. Similarly, the last three regression weights are required to be equal because they are both labeled blue. The regression weight for the regression of variable1 on variable4 is fixed at 1. (Amos will not attempt to estimate this regression weight.) The regression weight for predicting variable1 from variable5 is not constrained.
Regression equations
A linear relationship can also be described by an equation, as in the following lines.
Dim Sem as New AmosEngine . . . Sem.AStructure("variable1 = () variable2 + () variable3 + () variable4")
305
Here, variable1 is specified to be a linear function of variable2, variable3 and variable4. The empty parentheses represent unknown regression weights that Amos will estimate. Actually, the empty parentheses can be left out, as in the following lines, which are equivalent to the ones just previous.
Dim Sem as New AmosEngine . . . Sem.AStructure("variable1 = variable2 + variable3 + variable4")
Amos takes it for granted that it is supposed to estimate a regression weight for each variable on the right hand side of this equation. The parentheses sometimes contribute to readability, and, as will be shown below, provide the means for placing constraints on regression weights. In using this method for specifying linear relationships, it is possible to specify one or more intercepts in a regression equation. For example:
Dim Sem as New AmosEngine . . . Sem.AStructure("var1 = () var2 + ()") Sem.AStructure("var3 = () var4 + () + ()") . . .
Here, var1 is specified to be a multiple of var2, except for an intercept term. var3 is specified to be a multiple of var4, except for two intercept terms. The five sets of empty parentheses represent five parameters that Amos is supposed to estimate - two regression weights and three intercepts. Again, the empty parentheses can be left out if desired. Constraints can be placed on regression weights and intercepts as in the following example:
Dim Sem as New AmosEngine . . . Sem.AStructure("var1 = (alpha) var2 + (charlie)") Sem.AStructure("var3 = (alpha) var4 + (charlie) + (50)") . . .
Here, Amos is required to estimate two parameters. The two regression weights labeled alpha are required to be equal. Their common value constitutes one parameter. The two intercepts labeled charlie are required to be equal. Their common value constitutes the second parameter. The remaining intercept is fixed at 50, so it doesnt have to be estimated.
Covariances
With one exception, Amos assumes that the exogenous variables in a model are correlated, and it estimates the covariance between every pair of exogenous variables. The exception to this default assumption concerns unique variables exogenous variables that are unobserved and have a direct effect on only one variable. Amos assumes that unique variables are uncorrelated with each other, and with every other exogenous variable in the model. You may explicitly permit two variables to be correlated by using the string, <>, as illustrated in the following example:
Dim Sem as New AmosEngine . . . Sem.AStructure("variable2 <> variable3")
306
where Amos is told that variable2 and variable3 may be correlated, and is asked to estimate their covariance. Since the AStructure method ignores dashes, the following three lines are equivalent:
Sem.AStructure("variable2<>variable3") Sem.AStructure("variable2 <---> variable3") Sem.AStructure("variable2 <----------> variable3")
You can place constraints on the covariances of exogenous variables, as in the following example:
Dim Sem as New AmosEngine . . . Sem.AStructure("variable1 <---> Sem.AStructure("variable2 <---> Sem.AStructure("variable3 <---> Sem.AStructure("variable1 <---> Sem.AStructure("variable2 <---> Sem.AStructure("variable1 <---> . . .
In this example, the first three covariances listed are required to be equal because they are all labeled alpha. Similarly, the two covariances labeled beta are required to be equal to each other. variable1 and variable2 are declared to be uncorrelated, so that Amos will not attempt to estimate their covariance. (It is also possible to fix a covariance to a nonzero value, although reasons for doing so are rare.)
Variances
By default, Amos assumes that there are no constraints on the variances of the exogenous variables in the model. However, you can constrain the variances, as in the following example:
Dim Sem as New AmosEngine . . . Sem.AStructure("variable1 (gamma)") Sem.AStructure("variable2 (gamma)") Sem.AStructure("variable3 (gamma)") Sem.AStructure("variable4 (1)") Sem.AStructure("variable5 (2)") Sem.AStructure("variable6 (delta)") Sem.AStructure("variable7 (delta)") . . .
In this example, the variance of variable4 is fixed at 1, and the variance of variable5 is fixed at 2. Amos does not attempt to estimate these fixed parameters. variable1, variable2 and variable3 are required to have the same variance because they are all labeled gamma. Similarly, variable6 and variable7 are required to have the same variance because they are both labeled delta.
307
To give a parameter a non-numeric label as well as an initial value, type the non-numeric label, followed by a colon, followed by the initial value. In the following example the variances of variable1, variable2 and variable3 are constrained to be equal and given an initial value of 8, while the variances of variable6 and variable7 are constrained to be equal and given an initial value of 9:
Dim Sem as New AmosEngine . . . Sem.AStructure("variable1 (gamma Sem.AStructure("variable2 (gamma Sem.AStructure("variable3 (gamma Sem.AStructure("variable4 (1)") Sem.AStructure("variable5 (2)") Sem.AStructure("variable6 (delta Sem.AStructure("variable7 (delta . . .
: 9)") : 9)")
308
BeginGroup Method
Specifies the data file, and begins the model specification for a single group. BeginGroup is a simplified form of the BeginGroupEx (see "BeginGroupEx Method" on page 310) method. The database format is inferred from the data file name.
Syntax
object.BeginGroup (fileName) object.BeginGroup (fileName, tableName) object.BeginGroup (fileName, groupingVariable, groupingValue) object.BeginGroup (fileName, tableName, groupingVariable, groupingValue) The BeginGroup method syntax has the following parts:
Part
object fileName tableName
Description
An object of type AmosEngine. Name of a data file.
Name of a data table within the data file. Required for database formats, such as Excel 5, Excel 97 and Access, contain multiple data tables. Must be omitted for database formats, such as Excel 4, dbase and PASW Statistics, contain only a single data table.
groupingVariable groupingValue
groupingVariable and groupingValue are optional. Together they select a subset of cases from the data file for a includes those cases for which the variable named groupingVariable takes on the value groupingValue. See GroupingVariable above.
Placement: [2].
See Also
GroupName Method (on page 459)
309
310
BeginGroupEx Method
Specifies the data file, and begins the model specification for a single group.
Syntax
object.BeginGroupEx (dbFormat, fileName, tableName) object.BeginGroupEx (dbFormat, fileName, tableName, groupingVariable, groupingValue) The BeginGroupEx method syntax has the following parts:
Part
object dbFormat fileName tableName
Description
An object of type AmosEngine. A database format specifier. Name of a data file. Name of a data table within the data file. Required for database formats, such as Excel 5, Excel 97 and Access, in which a file can contain multiple data tables. Must be the empty string ("") for database formats, such as Excel 4, dbase and PASW Statistics, for which a file can contain only a single data table. GroupingVariable and GroupingValue are optional. Together they select a subset of cases from the data file for analysis. The analysis includes those cases for which the variable named VariableName takes on the value GroupingValue. See GroupingVariable above.
groupingVariable
groupingValue
Placement: [2].
Settings
The settings for DbFormat are:
Constant
mmDBASE3 mmDBASE4 mmDBASE5 mmEXCEL3 mmEXCEL4 mmEXCEL5 mmEXCEL97 mmFOXPRO20 mmFOXPRO25 mmFOXPRO26 mmLOTUSWK1 mmLOTUSWK3 mmLOTUSWK4
Value Description
0 1 2 3 4 5 6 7 8 9 11 12 13 Dbase III Dbase IV Dbase V Excel 3 Excel 4 Excel 5, Excel 7 Excel 97, Excel 8 Foxpro 2.0 Foxpro 2.5 Foxpro 2.6 Lotus *.wk1 Lotus *.wk3 Lotus *.wk4
311
Constant
mmAccess mmSPSS mmText
Value Description
14 18 19 Microsoft Access PASW Statistics Text
See Also
BeginGroup Method (on page 308) GroupName Method (on page 459)
312
313
BootAdf Method
Controls display of the histogram of discrepancies,
C ADF ( 1 ,a ),C ADF ( 2 ,a ), K , C ADF ( B ,a )
In the above formula, a is the vector of sample moments, B is the number of bootstrap samples and b is the vector of implied moments obtained by fitting the model to the b-th bootstrap sample. The mean and standard deviation of the distribution are also reported.
Syntax
object.BootAdf () object.BootAdf (tf) The BootAdf method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine. Optional. If tf is True (the default), the histogram is displayed. Otherwise, not
Placement: [1].
Default
The distribution of
C ADF ( 1 ,a ),C ADF ( 2 ,a ), K , C ADF ( B ,a )
314
Remarks
When a bootstrap is not performed, BootAdf is ignored. See Example 21 in the Users Guide for a demonstration of the BootAdf method.
See Also
Adf Method (on page 292) BootGls Method (on page 323) BootMl Method (on page 326) BootSls Method (on page 329) Bootstrap Method (on page 332) BootUls Method (on page 339) BootVerify Method (on page 342) Seed Method (on page 610)
315
316
BootBS Method
Carries out the bootstrap procedure of Bollen and Stine (1992) for testing the hypothesis that the specified model is correct.
Syntax
object.BootBS () object.BootBS (tf) The BootBS method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine. Optional. True (default) specifies that a Bollen-Stine test is to be carried out.
Placement: [1].
Default
The Bollen-Stine test is not carried out.
Remarks
If you use BootBS, you must also use Bootstrap (see "Bootstrap Method" on page 332) to specify the number of bootstrap samples. However, when BootBS is used, bootstrapped standard errors are not reported. To obtain bootstrapped standard errors, run the problem without the BootBS Method. The BootBS Method is only for testing model fit under non-normality.
See Also
Bootstrap Method (on page 332) BootVerify Method (on page 342) Seed Method (on page 610)
317
318
Thus, the departure of the data from the model is significant at the .462 level. In other words, the data do not depart significantly from the model at any conventional significance level. The distribution of 2000 likelihood ratio chi-square statistics obtained from the 2000 bootstrap samples is as follows.
319
This distribution resembles the chi-square distribution with eight degrees of freedom insofar as it is positively skewed and has a mean of about eight (actually 8.327). Unfortunately, Amos does not provide the information needed to do a more detailed comparison with the chi-square distribution.
320
BootFactor Method
Speeds up the bootstrap (see "Bootstrap Method" on page 332) algorithm and makes it more reliable under the assumption that standard errors are inversely proportional to the square root of sample size.
Syntax
object.BootFactor (M) The BootFactor method syntax has the following parts:
Part
object M
Description
An object of type AmosEngine.
A positive integer. In the BootFactor example (see "BootFactor Method Example" on page 322), M=5. Suppose that your data consist of G independent samples (groups) with sample sizes
M.
321
Placement: [1].
Default
M = 1.
Remarks
Using a value for M other than 1 requires the assumption that the standard error of each estimate is inversely proportional to the square root of sample size. The use of M > 1 can substantially reduce computation time, and reduces the probability of encountering a bootstrap sample for which parameter estimation is impossible. The larger M is, the larger the bootstrap samples will be, the more closely their sample moments will resemble the moments of the original sample, and the more closely the parameter estimates for the bootstrap samples will resemble the parameter estimates from the original sample. Since the parameter estimates from the original sample are used as initial values in the analysis of each bootstrap sample, a large value for M reduces the amount of computation required to estimate parameters for a bootstrap sample. Of course, if M is set to a very large value, generating the bootstrap samples will become the dominant cost factor. A very large M may also create numerical problems. The use of M > 1 solves a problem described in a special case by Dolker, Halperin and Divgi (1982). With small samples and M=1, the sample covariance matrix in a bootstrap sample may be singular even though the covariance matrix in the original sample is nonsingular. The occurrence of a singular covariance matrix in a bootstrap sample prohibits estimation by the Gls (see "Gls Method" on page 457) or Adf (see "Adf Method" on page 292) methods. The larger M is, the smaller are the chances of finding a singular sample covariance matrix in a bootstrap sample. It is not possible to perform a Bollen-Stine bootstrap test of fit or to obtain bootstrap confidence intervals (ConfidenceBC (see "ConfidenceBC Method" on page 360) or ConfidencePC (see "ConfidencePC Method" on page 364)) if M >1.
See Also
Bootstrap Method (on page 332) BootVerify Method (on page 342) Seed Method (on page 610)
322
323
BootGls Method
Controls display of the histogram of discrepancies,
Syntax
object.BootGls () object.BootGls (tf) The BootGls method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine. Optional. If tf is True (the default), the histogram is displayed. Otherwise, not.
324
Placement: [1].
Default
The distribution of
CGLS ( 1 ,a ), CGLS ( 2 , a),K, CGLS ( B , a) is reported only when a bootstrap is performed using the Gls
method.
Remarks
When a bootstrap is not performed, BootGls is ignored. For a demonstration of the BootGls method, see the files Ex21-adf.vb, Ex21-gls.vb, Ex21-ml.vb and Ex21- uls.vb in the Examples subdirectory.
See Also
BootAdf Method (on page 313) BootMl Method (on page 326) Bootstrap Method (on page 332) BootSls Method (on page 329) BootUls Method (on page 339) BootVerify Method (on page 342) Gls Method (on page 457) Seed Method (on page 610)
325
326
BootMl Method
Controls display of the histogram of discrepancies,
C KL ( b , a b ) C KL (a, a) , b = 1,K, B .
In the above formula, a is the vector of sample moments, B is the number of bootstrap samples and b is the vector of implied moments obtained by fitting the model to the b-th bootstrap sample. The mean and standard deviation of the distribution are also reported.
Syntax
object.BootMl () object.BootMl (tf) The BootMl method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine. Optional. If tf is True (the default), the histogram is displayed. Otherwise, not.
327
Placement: [1].
Default
The distribution of
Remarks
When no bootstrap is performed, BootMl is ignored. For a demonstration of the BootMl method, see the files Ex21-adf.vb, Ex21-gls.vb, Ex21-ml.vb and Ex21- uls.vb in the Examples subdirectory.
See Also
BootAdf Method (on page 313) BootGls Method (on page 323) BootSls Method (on page 329) Bootstrap Method (on page 332) BootUls Method (on page 339) BootVerify Method (on page 342) Ml Method (on page 490) Seed Method (on page 610)
328
329
BootSls Method
Controls display of the histogram of discrepancies,
Syntax
object.BootSls () object.BootSls (tf) The BootSls method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine. Optional. If tf is True (the default), the histogram is displayed. Otherwise, not.
330
Placement: [1].
Default
The distribution of
C SLS ( 1 , a) , C SLS ( 2 , a ) ,K, C SLS ( B , a) is reported only when a bootstrap is performed using the Sls
(see "Sls Method" on page 614) method.
Remarks
When a bootstrap is not performed, BootSls is ignored. For a demonstration of the BootSls method, see the files Ex21-adf.vb, Ex21-gls.vb, Ex21-ml.vb and Ex21- uls.vb in the Examples subdirectory.
See Also
BootAdf Method (on page 313) BootGls Method (on page 323) BootMl Method (on page 326) Bootstrap Method (on page 332) BootUls Method (on page 339) BootVerify Method (on page 342) Seed Method (on page 610) BootFactor Method Example (on page 322)
331
332
Bootstrap Method
Requests bootstrap standard errors for parameter estimates using the bootstrap algorithm of Efron (1982) and specifies the number of bootstrap samples.
Syntax
object.Bootstrap (nSamples) The Bootstrap method syntax has the following parts:
Part
object nSamples
Description
An object of type AmosEngine. The number of bootstrap samples. If the value of nSamples is zero, no bootstrap is performed.
333
Placement: [1].
Default
No bootstrap is performed.
Remarks
Amos displays bootstrap standard errors for the estimates displayed by the methods: Standardized (see "Standardized Method" on page 622), Smc (see "Smc Method" on page 616), FactorScoreWeights (see "FactorScoreWeights Method" on page 399), TotalEffects (see "TotalEffects Method" on page 635), SampleMoments (see "SampleMoments Method" on page 608), ImpliedMoments (see "ImpliedMoments Method" on page 461) and AllImpliedMoments (see "AllImpliedMoments Method" on page 296). Bootstrap standard errors are reported only for those quantities that are estimated. For example, to obtain bootstrapped standard errors for squared multiple correlations, you need to use the Smc (see "Smc Method" on page 616) method. Similarly, to obtain bootstrapped standard errors for sample correlations, you must use both SampleMoments (see "SampleMoments Method" on page 608) and Standardized (see "Standardized Method" on page 622). Note that standard errors for estimated indirect effects are provided along with the bootstrapped standard errors of the TotalEffects (see "TotalEffects Method" on page 635) method. Bootstrap requires raw data unless you use MonteCarlo (see "MonteCarlo Method" on page 503).
See Also
BootAdf Method (on page 313) BootBS Method (on page 316) BootFactor Method (on page 320) BootGls Method (on page 323) BootMl Method (on page 326) BootUls Method (on page 339) BootVerify Method (on page 342) ConfidenceBC Method (on page 360) ConfidencePC Method (on page 364) GetBCLowerBounds, GetBCUpperBounds Methods (on page 414) GetBootSampleEstimates Method (on page 423) GetPCLowerBounds, GetPCUpperBounds Methods (on page 441) GetStandardErrors Method (on page 450)
334
MonteCarlo Method (on page 503) Seed Method (on page 610)
335
336
337
338
339
BootUls Method
Controls the display of the histogram of discrepancies,
Syntax
object.BootUls () object.BootUls (tf) The BootUls method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine. Optional. If tf is True (the default), the histogram is displayed. Otherwise, not.
340
Placement: [1].
Default
The distribution of
CULS ( 1 , a) , CULS ( 2 , a) ,K, CULS ( B , a) is reported only when a bootstrap is performed using the Uls
(see "Uls Method" on page 637) method.
Remarks
When a bootstrap is not performed, BootUls is ignored. For a demonstration of the BootUls method, see the files Ex21-adf.vb, Ex21-gls.vb, Ex21-ml.vb and Ex21-uls.vb in the Examples subdirectory.
See Also
BootAdf Method (on page 313) BootGls Method (on page 323) BootMl Method (on page 326) BootSls Method (on page 329) Bootstrap Method (on page 332) BootVerify Method (on page 342) Uls Method (on page 637) Seed Method (on page 610)
341
342
BootVerify Method
Controls the reporting of detailed information about individual bootstrap samples.
Syntax
object.BootVerify () object.BootVerify (tf) The BootVerify method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine. Optional. True (default) requests the reporting of detailed information. False suppresses it.
Placement: [1].
Default
Detailed information is not reported.
Remarks
Detailed information consists of the frequency with which each observation from the original sample appears in each bootstrap sample.
See Also
Bootstrap Method (on page 332) GetBootSampleEstimates Method (on page 423) NeedBootSampleEstimates Method (on page 517) Seed Method (on page 610)
343
344
ChiCorrect Method
Specifies the value of the constant, r, in Appendix A of the Users Guide.
Syntax
object.ChiCorrect (r) The ChiCorrect method syntax has the following parts:
Part
object r
Description
An object of type AmosEngine. The constant r in Appendix A of the Users Guide.
Placement: [1].
Default
r is the number of groups.
Remarks
When the EmuLisrel6 (see "Emulisrel6 Method" on page 389) method is used, the default value for r cannot be changed. The choice of r affects only the discrepancy function and standard errors. It does not affect parameter estimates. There are few guidelines for departing from Amoss default value for r. Browne (1982, p. 98), mentions favorably a formula due to Swain (1975):
r=
p 2 p 2 + 3 p 1 y 2 y 2 + 3y 1 12d
) (
345
where
y = 1 [(1 + 8q )1 / 2 1] , 2
using the notation in Appendix A of the Users Guide. The Swain formula is intended for the case of a single group with unconstrained means and intercepts, where the model is invariant under a constant scaling factor. A one-group model in which means and intercepts are unconstrained was called invariant under a constant scaling factor by Browne (1982, p. 77) if, given any parameter vector, , and a positive number, c, there exists * such that
(1) ( *) = d ( 1) ( ) .
When means and intercepts are highly constrained, some consideration should be given to using the ChiCorrect method to specify r = 0.
See Also
Cmin Method (on page 349)
346
347
ChiSquareProbability Method
Gets the p value for a chi square statistic.
Syntax
result = object.ChiSquareProbability (chiSquare, df) The ChiSquareProbability method syntax has the following parts:
Part
result object chiSquare df
Description
The probability that a chi square statistic with df degrees of freedom will exceed chiSquare. An object of type AmosEngine. a chi square value degrees of freedom
See Also
P Method (on page 555)
348
349
Cmin Method
Gets the minimized value of the discrepancy function.
Syntax
result = object.Cmin () The Cmin method syntax has the following parts:
Part
result object
Description
The minimized value of the discrepancy function. An object of type AmosEngine.
Placement: [3].
Remarks
If you have used the Model (see "Model Method" on page 492) method to define more than one model, the Cmin method gets the minimized discrepancy function for the most recently fitted model. The second example shows how to obtain the minimized discrepancy for multiple models.
350
Debug.WriteLine("Degrees of Freedom = " & Sem.df) Debug.WriteLine("p = " & Sem.p) Debug.WriteLine("Number of parameters = " & Sem.npar) Debug.WriteLine("Noncentrality parameter = " & Sem.Ncp & " (" & Sem.NcpLo & _ ", " & Sem.NcpHi & ")") Debug.WriteLine("Rmsea = " & Sem.Rmsea & " (" & Sem.RmseaLo & ", " & Sem.RmseaHi & ")") Debug.WriteLine("Test of close fit, p = " & Sem.Pclose) Sem.Dispose() End Sub End Module
351
352
ColumnNames Method
Obtains the variable names associated with the columns of a matrix of estimates.
Syntax
object.ColumnNames (matrixID, theColumnNames) object.ColumnNames (matrixID, theColumnNames, groupNumber) The ColumnNames method syntax has the following parts:
Part
object matrixID theColumnNames
Description
An object of type AmosEngine. An integer that specifies a matrix of estimates, as described in Settings. A string array declared as Dim theColumnNames() as String in the calling program. The Amos Engine will redimension the array so that theColumnNames(1) is the first column name in the array.
groupNumber
Optional. A group number. The first group is group number 1. If groupNumber is omitted, the first group is used.
Placement: [3].
Settings
The settings for MatrixID are:
Constant
SampleCovariances SampleCorrelations SampleMeans ImpliedCovariances ImpliedCorrelations ImpliedMeans AllImpliedCovariances
Value Description
13 14 15 10 11 12 7 Sample covariances. Sample correlations. Sample means. The implied covariances among the observed variables in the model. The implied correlations among the observed variables in the model. The implied means of the observed variables in the model. The implied covariances among all variables in the model, with the exception of residual variables. The implied correlations among all variables in the model, with the exception of residual variables. The implied means of all variables in the model, with the exception of residual variables.
AllImpliedCorrelations
AllImpliedMeans
353
Constant
DirectEffects IndirectEffects TotalEffects StandardizedDirectEffects StandardizedIndirectEffects StandardizedTotalEffects FactorScoreWeights
Value Description
19 20 5 22 23 21 6 Direct effects. Indirect effects. Total effects. Standardized direct effects. Standardized indirect effects. Standardized total effects. Factor score weights.
Remarks
The NeedEstimates (see "NeedEstimates Method" on page 521) method must be used to warn that a particular matrix of estimates will be needed before the ColumnNames method can be used to obtain the column names for that matrix. For example, you have to use object.NeedEstimates (ImpliedMeans) before using object.ColumnNames (ImpliedMeans, )
See Also
ColumnNumbers Method (on page 356) RowNames Method (on page 600) RowNumbers Method (on page 604)
354
Programming with Amos Dim NRows1 As Integer, NColumns1 As Integer Dim i As Integer, j As Integer NRows1 = UBound(RNames) NColumns1 = UBound(CNames) Debug.Write(" ") For j = 0 To NColumns1 Debug.Write(CNames(j).PadLeft(10)) Next Debug.WriteLine("") For i = 0 To NRows1 Debug.Write(RNames(i).PadRight(8)) For j = 0 To NColumns1 Debug.Write(TheMatrix(i, j).ToString(".00000").PadLeft(10)) Next Debug.WriteLine("") Next End Sub End Module
355
356
ColumnNumbers Method
Obtains the variable numbers associated with the columns of a matrix.
Syntax
object.ColumnNumbers (matrixID, theVariableNumbers) object.ColumnNumbers (matrixID, theVariableNumbers, groupNumber) The ColumnNumbers method syntax has the following parts:
Part
object matrixID theVariableNumbers
Description
An object of type AmosEngine. An integer that specifies a matrix of estimates, as described in Settings An integer array declared in the calling program as Dim theVariableNumbers() as Integer The Amos Engine redimensions the array.
groupNumber
Optional. A group number. The first group is group number 1. If groupNumber is omitted, the first group is used.
Placement: [3].
Settings
The settings for matrixID are:
Constant
SampleCovariances SampleCorrelations SampleMeans ImpliedCovariances ImpliedCorrelations ImpliedMeans AllImpliedCovariances
Value Description
13 14 15 10 11 12 7 Sample covariances. Sample correlations. Sample means. The implied covariances among the observed variables in the model. The implied correlations among the observed variables in the model. The implied means of the observed variables in the model. The implied covariances among all variables in the model, with the exception of residual variables. The implied correlations among all variables in the model, with the exception of residual variables. The implied means of all variables in the model, with the exception of residual variables. Direct effects. Indirect effects.
AllImpliedCorrelations
AllImpliedMeans
DirectEffects IndirectEffects
19 20
357
Constant
TotalEffects StandardizedDirectEffects StandardizedIndirectEffects StandardizedTotalEffects FactorScoreWeights
Value Description
5 22 23 21 6 Total effects. Standardized direct effects. Standardized indirect effects. Standardized total effects. Factor score weights.
Remarks
The NeedEstimates (see "NeedEstimates Method" on page 521) method must be used to warn that a particular matrix of estimates will be needed before the ColumnNumbers method can be used to obtain the column numbers for that matrix. For example, you have to use object.NeedEstimates (ImpliedMeans) before using object.ColumnNumbers (ImpliedMeans, )
See Also
ColumnNames Method (on page 352) RowNames Method (on page 600) RowNumbers Method (on page 604)
358
359
Sub PrintMatrix1(ByVal TheMatrix(,) As Double, ByVal CNumbers() As Integer, ByVal RNumbers() As Integer) Dim NRows1 As Integer, NColumns1 As Integer Dim i As Integer, j As Integer NRows1 = UBound(RNumbers) NColumns1 = UBound(CNumbers) Debug.Write(" ") For j = 0 To NColumns1 Debug.Write(CNumbers(j).ToString.PadLeft(10)) Next Debug.WriteLine("") For i = 0 To NRows1 Debug.Write(RNumbers(i).ToString.PadLeft(8)) For j = 0 To NColumns1 Debug.Write(TheMatrix(i, j).ToString("#.00000").PadLeft(10)) Next Debug.WriteLine("") Next End Sub End Module
360
ConfidenceBC Method
Controls whether bias-corrected bootstrap confidence intervals are reported.
Syntax
object.ConfidenceBC (confidenceLevel) The ConfidenceBC method syntax has the following parts:
Part
object confidenceLevel
Description
An object of type AmosEngine. Desired confidence level. If the value of confidenceLevel is zero, bias-corrected confidence intervals are not reported.
361
Placement: [1].
Default
Bias-corrected confidence intervals are not reported.
Remarks
Amos can produce bootstrapped confidence intervals for all parameter estimates, as well as for estimates displayed by the methods: Standardized (see "Standardized Method" on page 622), Smc (see "Smc Method" on page 616), FactorScoreWeights (see "FactorScoreWeights Method" on page 399), TotalEffects (see "TotalEffects Method" on page 635), SampleMoments (see "SampleMoments Method" on page 608), ImpliedMoments (see "ImpliedMoments Method" on page 461) and AllImpliedMoments (see "AllImpliedMoments Method" on page 296). Bootstrap confidence intervals are reported only for those quantities that are estimated. For example, to obtain bootstrapped standard errors for squared multiple correlations, you need to use the Smc method. Similarly, to obtain bootstrapped standard errors for sample correlations, you must use both SampleMoments (see "SampleMoments Method" on page 608) and Standardized (see "Standardized Method" on page 622) methods. When you use ConfidenceBC, you must also use Bootstrap (see "Bootstrap Method" on page 332) to specify the number of bootstrap samples. Note that bias-corrected confidence intervals for estimated indirect effects are provided along with the bias-corrected confidence intervals of the TotalEffects (see "TotalEffects Method" on page 635) method. ConfidenceBC requires raw data unless you use MonteCarlo (see "MonteCarlo Method" on page 503).
See Also
Bootstrap Method (on page 332) ConfidencePC Method (on page 364) GetBCLowerBounds, GetBCUpperBounds Methods (on page 414) MonteCarlo Method (on page 503) NeedBCLowerBounds, NeedBCUpperBounds Methods (on page 513)
362
Sem.Standardized() Sem.TextOutput() Sem.BeginGroup(Sem.AmosDir & "Examples\UserGuide.xls", "Grnt_fem") Sem.AStructure("visperc = (1) spatial + (1) err_v") Sem.AStructure("cubes = spatial + (1) err_c") Sem.AStructure("lozenges = spatial + (1) err_l") Sem.AStructure("paragraph = (1) verbal + (1) err_p") Sem.AStructure("sentence = verbal + (1) err_s") Sem.AStructure("wordmean = verbal + (1) err_w") Sem.Dispose() End Sub End Module
363
The confidence interval for the correlation between spatial and verbal, for example, is [.250, .681]. Since the confidence interval does not include zero, you would reject the hypothesis that the correlation is zero in the population, using a two-sided test with a significance level of .10. To carry out a similar two-sided test with a significance level of .05, you would need to request a 95% confidence interval (ConfidenceBC 95). You can also refer to the value in the p column. Each p value reveals indirectly how small the confidence level would have to be to yield a confidence interval that includes the value zero. A value of p in the p column indicates that a 100(1-p)% confidence interval would have one of its end points at zero. In this sense, a p value can be used to test the hypothesis that an estimate has a population value of zero. For example, the correlation between spatial and verbal has a p value of .003, which means that a 99.7% confidence interval would have its lower boundary at zero. In other words, a confidence interval at any conventional confidence level, such as .95 or .99, would not include zero, and you would reject at any conventional significance level the hypothesis that the correlation is zero in the population.
364
ConfidencePC Method
Controls whether bootstrap confidence intervals obtained by using the percentile method (Efron, 1987) are reported. Syntax object.ConfidencePC (confidenceLevel) The ConfidencePC method syntax has the following parts:
Part
object confidenceLevel
Description
An object of type AmosEngine. Desired confidence level. If the value of confidenceLevel is zero, percentile confidence intervals are not reported.
365
Placement: [1].
Default
Percentile confidence intervals are not reported.
Remarks
Amos can produce bootstrapped confidence intervals for all parameter estimates, as well as for estimates displayed by the methods: Standardized (see "Standardized Method" on page 622), Smc (see "Smc Method" on page 616), FactorScoreWeights (see "FactorScoreWeights Method" on page 399), TotalEffects (see "TotalEffects Method" on page 635), SampleMoments (see "SampleMoments Method" on page 608), ImpliedMoments (see "ImpliedMoments Method" on page 461) and AllImpliedMoments (see "AllImpliedMoments Method" on page 296). Bootstrap confidence intervals are reported only for those quantities that are estimated. For example, to obtain bootstrapped standard errors for squared multiple correlations, you need to use the Smc (see "Smc Method" on page 616) method. Similarly, to obtain bootstrapped standard errors for sample correlations, you must use both SampleMoments (see "SampleMoments Method" on page 608) and Standardized (see "Standardized Method" on page 622). When you use ConfidencePC, you must also use Bootstrap (see "Bootstrap Method" on page 332) to specify the number of bootstrap samples. Note that percentile confidence intervals for estimated indirect effects are provided along with the percentile confidence intervals of the TotalEffects (see "TotalEffects Method" on page 635) method. ConfidencePC requires raw data unless you use MonteCarlo (see "MonteCarlo Method" on page 503). See Also
366
Sem.Standardized() Sem.TextOutput() Sem.BeginGroup(Sem.AmosDir & "Examples\UserGuide.xls", "Grnt_fem") Sem.AStructure("visperc = (1) spatial + (1) err_v") Sem.AStructure("cubes = spatial + (1) err_c") Sem.AStructure("lozenges = spatial + (1) err_l") Sem.AStructure("paragraph = (1) verbal + (1) err_p") Sem.AStructure("sentence = verbal + (1) err_s") Sem.AStructure("wordmean = verbal + (1) err_w") Sem.Dispose() End Sub End Module
367
The confidence interval for the correlation between spatial and verbal, for example, is [.277, .705]. Since the confidence interval does not include zero, you would reject the hypothesis that the correlation is zero in the population, using a two-sided test with a significance level of .10. To carry out a similar two-sided test with a significance level of .05, you would need to request a 95% confidence interval (Confidencebc 95). You can also refer to the value in the p column. Each p value reveals indirectly how small the confidence level would have to be to yield a confidence interval that includes the value zero. A value of p in the p column indicates that a 100(1-p)% confidence interval would have one of its end points at zero. In this sense, a p value can be used to test the hypothesis that an estimate has a population value of zero. For example, the correlation between spatial and verbal has a p value of .002, which implies that a 99.8% confidence interval would have its lower boundary at zero. In other words, a confidence interval at any conventional confidence level, such as .95 or .99, would not include zero, and you would reject at any conventional significance level the hypothesis that the correlation is zero in the population.
368
Corest Method
Controls whether an estimate of the correlation matrix of the parameter estimates is reported.
Syntax
object.Corest () object.Corest (tf) The Corest method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine. Optional. If tf is True (default), an estimate of the correlation matrix of the parameter estimates is calculated. Otherwise, not.
Placement: [1].
Default
The correlation matrix of parameter estimates is not estimated.
Remarks
An estimate of the correlation matrix of the parameter estimates is available only for the case of maximum likelihood (Ml (see "Ml Method" on page 490)), generalized least squares (Gls (see "Gls Method" on page 457)), and asymptotically distribution-free (Adf (see "Adf Method" on page 292)) estimation. When other estimation criteria are used, the Corest method is ignored.
See Also
Covest Method (on page 373) Crdiff Method (on page 375)
369
370
Cov Method
Specifies a covariance as a model parameter.
Syntax
object.Cov (leftVariableName, rightVariableName) object.Cov (leftVariableName, rightVariableName, parameterValue) object.Cov (leftVariableName, rightVariableName, parameterName) The Cov method syntax has the following parts:
Part
object leftVariableName rightVariableName parameterValue
Description
An object of type AmosEngine. The character strings, leftVariableName and rightVariableName, are the names of two exogenous variables. The Cov method makes their covariance a model parameter. (Optional) Parameter value. If parameterValue = 3, say, then the covariance is fixed at 3.
parameterName
(Optional) Parameter name. If parameterName = abc, say, then the covariance is named abc. It is constrained to be equal to any other parameters named abc. If parameterName = 3?, say then the covariance is given an initial value of 3, and is unconstrained. If parameterName = abc:3, say, then the covariance is named abc and is given an initial value of 3. It is constrained to be equal to any other parameters named abc. If parameterName is an empty string (""), the covariance is an unconstrained parameter.
371
Placement: [2].
Default
With one exception, Amos assumes that the exogenous variables in a model are correlated, and it estimates the covariance between every pair of exogenous variables. The exception to this default assumption concerns unique variables - exogenous variables that are unobserved and have a direct effect on only one variable. Amos assumes that unique variables are uncorrelated with each other, and with every other exogenous variable in the model. You can modify these defaults with the GenerateDefaultCovariances (see "GenerateDefaultCovariances Method" on page 411) method.
Remarks
If parameterValue and parameterName are omitted, the covariance is an unconstrained parameter.
See Also
AStructure Method (on page 302) Intercept Method (on page 477) Mean Method (on page 486) MStructure Method (on page 505) Path Method (on page 574) Var Method (on page 641)
372
373
Covest Method
Controls whether an estimate of the covariance matrix of the parameter estimates is reported.
Syntax
object.Covest () object.Covest (tf) The Covest method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine. Optional. If tf is True (default), an estimate of the covariance matrix of the parameter estimates is calculated. Otherwise, not.
Placement: [1].
Default
The covariance matrix of parameter estimates is not estimated.
Remarks
An estimate of the covariance matrix of the parameter estimates is available only for the case of maximum likelihood (Ml (see "Ml Method" on page 490)), generalized least squares (Gls (see "Gls Method" on page 457)), and asymptotically distribution-free (Adf (see "Adf Method" on page 292)) estimation. When other estimation criteria are used, the Covest method is ignored.
See Also
Corest Method (on page 368) Crdiff Method (on page 375)
374
375
Crdiff Method
Controls whether Amos calculates a critical ratio for each pair of parameter estimates. The critical ratio for a pair of parameter estimates provides a test of the hypothesis that the two parameters are equal.
Syntax
object.Crdiff () object.Crdiff (tf) The Crdiff method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine. Optional. If tf is True (default), Amos calculates critical ratios for differences between parameters. Otherwise, not.
Placement: [1].
Default
Critical ratios for differences between parameters are not calculated.
Remarks
Critical ratios for differences between parameters are available only for the case of maximum likelihood (Ml (see "Ml Method" on page 490)), generalized least squares (Gls (see "Gls Method" on page 457)), and asymptotically distribution-free (Adf (see "Adf Method" on page 292)) estimation. When other estimation criteria are used, the Crdiff method is ignored.
See Also
Corest Method (on page 368) Covest Method (on page 373)
376
377
Crit1 Method
Affects one of the convergence criteria used in deciding whether a local minimum has been reached. Amos requires the absolute value of each first order derivative to be less than the value specified by Crit1 at the end of the final iteration.
Syntax
object.Crit1 (threshold) The Crit1 method syntax has the following parts:
Part
object threshold
Description
An object of type AmosEngine. Threshold for the absolute value of each first order derivative.
Placement: [1].
Default
The absolute value of each first order derivative is required to be less than .00001 at the end of the final iteration.
See Also
Crit2 Method (on page 379) Fisher Method (on page 401) Iterations Method (on page 482) Technical Method (on page 625) Time Method (on page 631)
378
379
Crit2 Method
Affects one of the convergence criteria used in deciding whether a local minimum has been reached. Amos requires that, on the final iteration, the distance traveled in the parameter space (the square root of the sum of squared changes in the parameter values) be less than the threshold specified by Crit2.
Syntax
object.Crit2 (threshold) The Crit2 method syntax has the following parts:
Part
object threshold
Description
An object of type AmosEngine. Threshold for the distance traveled in the parameter space on the final iteration.
Placement: [1].
Default
The distance traveled in the parameter space is required to be less than .001 on the final iteration.
See Also
Crit1 Method (on page 377) Fisher Method (on page 401) Iterations Method (on page 482) Technical Method (on page 625) Time Method (on page 631)
380
381
DataFileNCases Method
Gets the number of cases in a dataset.
Syntax
object.DataFileNCases () object.DataFileNCases (groupNumber) The DataFileNCases method syntax has the following parts:
Part
object groupNumber
Description
An object of type AmosEngine. Optional number. If groupNumber is present, it is a group number, where the first group is group number 1. If groupNumber is omitted, the method returns the number of cases in the group referred to by the most recent use of the BeginGroupEx (see "BeginGroupEx Method" on page 310) method.
Placement: [2].
See Also
DataFileNVariables Method (on page 383)
382
383
DataFileNVariables Method
Gets the number of variables in a dataset.
Syntax
object.DataFileNVariables () object.DataFileNVariables (groupNumber) The DataFileNVariables method syntax has the following parts:
Part
object groupNumber
Description
An object of type AmosEngine. Optional number. If groupNumber is present, it is a group number, where the first group is group number 1. If groupNumber is omitted, the method returns the number of variables in the dataset referred to by the most recent use of the BeginGroupEx (see "BeginGroupEx Method" on page 310) method.
Placement: [2].
See Also
DataFileNCases Method (on page 381)
384
385
Df Method
Gets the degrees of freedom.
Syntax
result = object.Df () The Df method syntax has the following parts:
Part
result object
Description
The degrees of freedom. An object of type AmosEngine.
Placement: [3].
Remarks
If you have used the Model (see "Model Method" on page 492) method to define more than one model, the Df method returns the degrees of freedom for the most recently fitted model. The second example shows how to obtain the degrees of freedom for multiple models.
See Also
Npar Method (on page 540)
386
Df Method Example 1
The following program shows how to obtain various fit measures when only one model is defined (i.e., when the Model (see "Model Method" on page 492) method has been used only once or not at all).
Imports System.Diagnostics Module MainModule ' Df Method Example 1 Sub Main() Dim Sem As New AmosEngineLib.AmosEngine Sem.BeginGroup(Sem.AmosDir & "Examples\UserGuide.xls", "Grnt_fem") Sem.AStructure("visperc = (1) spatial + (1) err_v") Sem.AStructure("cubes = spatial + (1) err_c") Sem.AStructure("lozenges = spatial + (1) err_l") Sem.AStructure("paragraph = (1) verbal + (1) err_p") Sem.AStructure("sentence = verbal + (1) err_s") Sem.AStructure("wordmean = verbal + (1) err_w") Debug.WriteLine("Chi Square = " & Sem.Cmin) Debug.WriteLine("Degrees of Freedom = " & Sem.df) Debug.WriteLine("p = " & Sem.p) Debug.WriteLine("Number of parameters = " & Sem.npar) Debug.WriteLine("Noncentrality parameter = " & Sem.Ncp & " (" & _ Sem.NcpLo & ", " & Sem.NcpHi & ")") Debug.WriteLine("Rmsea = " & Sem.Rmsea & " (" & Sem.RmseaLo & ", " & Sem.RmseaHi & ")") Debug.WriteLine("Test of close fit, p = " & Sem.Pclose) Sem.Dispose() End Sub End Module
387
Df Method Example 2
The following program shows how to obtain various fit measures for multiple models (i.e., when the Model (see "Model Method" on page 492) method has been used more than once).
Imports System.Diagnostics Module MainModule ' Df Method Example 2 Sub Main() Dim Sem As New AmosEngineLib.AmosEngine Dim i As Integer Sem.BeginGroup(Sem.AmosDir & "Examples\UserGuide.xls", "Grnt_fem") Sem.AStructure("visperc = (a) spatial + (1) err_v") Sem.AStructure("cubes = (b) spatial + (1) err_c") Sem.AStructure("lozenges = (c) spatial + (1) err_l") Sem.AStructure("paragraph = (d) verbal + (1) err_p") Sem.AStructure("sentence = (e) verbal + (1) err_s") Sem.AStructure("wordmean = (f) verbal + (1) err_w") Sem.Var("spatial", 1) Sem.Var("verbal", 1) Sem.Model("Congeneric") Sem.Model("tau-equivalent", "a = b = c", "d = e = f") For i = 1 To 2 Debug.WriteLine("") Debug.WriteLine("Model number " & i) Sem.FitModel(i) Debug.WriteLine("Chi Square = " & Sem.Cmin) Debug.WriteLine("Degrees of Freedom = " & Sem.df) Debug.WriteLine("p = " & Sem.p) Debug.WriteLine("Number of parameters = " & Sem.npar) Debug.WriteLine("Noncentrality parameter = " & Sem.Ncp & " (" & _ Sem.NcpLo & ", " & Sem.NcpHi & ")") Debug.WriteLine("Rmsea = " & Sem.Rmsea & " (" & Sem.RmseaLo & ", " & Sem.RmseaHi & ")") Debug.WriteLine("Test of close fit, p = " & Sem.Pclose) Next Sem.Dispose() End Sub End Module
388
Dispose Method
Releases resources used by an AmosEngine object. Only one instance of the AmosEngine class can exist at a time, so it is essential that the resources used by one instance be released before another instance is created.
Syntax
object.Dispose () The Dispose method syntax has the following parts:
Part
object
Description
An object of type AmosEngine.
Placement: [3].
389
Emulisrel6 Method
Substitutes (D1a) for (D1) in Appendix B.
Syntax
object.Emulisrel6 () object.Emulisrel6 (tf) The Emulisrel6 method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine. If tf is True (default) then (D1a) is minimized. Otherwise, (D1) is minimized.
Placement: [1].
Default
(D1) is minimized.
Remarks
The effect of using Emulisrel6 is usually too small to matter. It has no effect at all in single group analyses. (D1a) appears to be the function minimized by the Lisrel program (Jreskog & Srbom, 1989).
See Also
ChiCorrect Method (on page 344)
390
391
EnableDisplay Method
Controls whether the Amos Engine displays a progress window.
Syntax
object.EnableDisplay (tf) The EnableDisplay method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine. If tf is True (default), the progress window is displayed. Otherwise, not.
Placement: [1].
Default
The progress window is displayed.
392
Syntax
object.Evaluate0 (ind, f) object.EvaluateEx0 (ind, f) The Evaluate0 and EvaluateEx0 method syntaxes have the following parts:
Part
object ind f
Description
An object of type AmosEngine. A variable of type Integer. On return, ind=0 if the discrepancy function is defined at the current parameter values. ind<>0 if the discrepancy function is undefined. A variable of type Double. On return, if ind=0, f is the value of the discrepancy function evaluated at the current parameter values.
Placement: [3].
Remarks
Evaluate0 and EvaluateEx0 evaluate the discrepancy function at the current parameter values, which can be retrieved using ParameterValue (see "ParameterValue Method" on page 571) or ParameterVector (see "ParameterVector Method" on page 573), and which can be set using PutParameterValue (see "PutParameterValue Method" on page 586) or PutParameterVector (see "PutParameterVector Method" on page 587).
See Use the AmosEngine class to evaluate derivatives numerically and display the results with the Amos Debug class (on page 750)
393
Syntax
object.Evaluate1 (ind, f, g) object.EvaluateEx1 (ind, f, g) The Evaluate1 and EvaluateEx1 method syntaxes have the following parts:
Part
object ind f g
Description
An object of type AmosEngine. A variable of type Integer. On return, ind=0 if the discrepancy function is defined at the current parameter values. ind<>0 if the discrepancy function is undefined. A variable of type Double. On return, if ind=0, f is the value of the discrepancy function evaluated at the current parameter values. An array of type double. On return, if ind=0, g is a one-dimensional array containing the first derivatives of the discrepancy function evaluated at the current parameter values.
Placement: [3].
Remarks
Evaluate1 and EvaluateEx1 evaluate the discrepancy function and derivatives at the current parameter values, which can be retrieved using ParameterValue (see "ParameterValue Method" on page 571) or ParameterVector (see "ParameterVector Method" on page 573), and which can be set using PutParameterValue (see "PutParameterValue Method" on page 586) or PutParameterVector (see "PutParameterVector Method" on page 587). See Use the AmosEngine class to evaluate derivatives numerically and display the results with the Amos Debug class (on page 750)
394
Syntax
object.Evaluate2a ind, f, g, h object.EvaluateEx2a ind, f, g, v The Evaluate2a and EvaluateEx2a method syntaxes have the following parts:
Part
object ind f g
Description
An object of type AmosEngine. A variable of type Integer. On return, ind=0 if the discrepancy function is defined at the current parameter values. ind<>0 if the discrepancy function is undefined. A variable of type Double. On return, if ind=0, f is the value of the discrepancy function evaluated at the current parameter values. An array of type double. On return, if ind=0, g is a one-dimensional array containing the first derivatives of the discrepancy function evaluated at the current parameter values. An array of type double. On return, if ind=0, h is a one-dimensional array containing approximate second derivatives of the discrepancy function evaluated at the current parameter values. An array of type double. On return, if ind=0, v is a one-dimensional array containing twice the inverse of the approximate second derivatives, provided that the inverse was successfully calculated. Use WasInverted after EvaluateEx2a to learn whether the inverse was successfully calculated.
Placement: [3].
Remarks
Evaluate2a and EvaluateEx2a evaluate the discrepancy function and derivatives at the current parameter values, which can be retrieved using ParameterValue (see "ParameterValue Method" on page 571) or ParameterVector (see "ParameterVector Method" on page 573), and which can be set using PutParameterValue (see "PutParameterValue Method" on page 586) or PutParameterVector (see "PutParameterVector Method" on page 587).
395
396
Syntax
object.Evaluate2e (ind, f, g, h) object.EvaluateEx2e (ind, f, g, v) The Evaluate2e and EvaluateEx2e method syntaxes have the following parts:
Part
object ind f g
Description
An object of type AmosEngine. A variable of type Integer. On return, ind=0 if the discrepancy function is defined at the current parameter values. ind<>0 if the discrepancy function is undefined. A variable of type Double. On return, if ind=0, f is the value of the discrepancy function evaluated at the current parameter values. An array of type double. On return, if ind=0, g is a one-dimensional array containing the first derivatives of the discrepancy function evaluated at the current parameter values. An array of type double. On return, if ind=0, h is a one-dimensional array containing second derivatives of the discrepancy function evaluated at the current parameter values. An array of type double. On return, if ind=0, v is a one-dimensional array containing twice the inverse of the second derivatives, provided that the inverse was successfully calculated. Use WasInverted (see "WasInverted Method" on page 649) after EvaluateEx2e to learn whether the inverse was successfully calculated.
397
Placement: [3].
Remarks
Evaluate2e and EvaluateEx2e evaluate the discrepancy function and derivatives at the current parameter values, which can be retrieved using ParameterValue (see "ParameterValue Method" on page 571) or ParameterVector (see "ParameterVector Method" on page 573), and which can be set using PutParameterValue (see "PutParameterValue Method" on page 586) or PutParameterVector (see "PutParameterVector Method" on page 587). See Use the AmosEngine class to evaluate derivatives numerically and display the results with the Amos Debug class (on page 750)
398
399
FactorScoreWeights Method
Controls whether regression weights for predicting the unobserved variables from the observed variables are displayed. The regression weights are computed by the formula W = BS W is the matrix of regression weights S is the matrix of covariances among the observed variables B is the matrix of covariances between the unobserved and observed variables.
1
where
Syntax
object.FactorScoreWeights () object.FactorScoreWeights (tf) The FactorScoreWeights method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine. Optional. If tf is True (the default), regression weights are reported. Otherwise, not.
Placement: [1].
Default
Factor score weights are not reported.
Remarks
This method is called FactorScoreWeights in conformance with usage in common factor analysis, where scores on the unobserved variables are called factor scores. The use of FactorScoreWeights is not limited to common factor analysis models, however.
See Also
GetEstimates Method (on page 432) NeedEstimates Method (on page 521)
400
401
Fisher Method
Employs Fishers scoring method in the case of maximum likelihood estimation (Ml (see "Ml Method" on page 490)), or the Gauss-Newton method in the case of least squares estimation (Uls (see "Uls Method" on page 637), Sls (see "Sls Method" on page 614), Gls (see "Gls Method" on page 457) or Adf (see "Adf Method" on page 292)).
Syntax
object.Fisher (nIterations) The Fisher method syntax has the following parts:
Part
object nIterations
Description
An object of type AmosEngine. Upper limit on the number of iterations that will be performed by Fishers scoring method or the Gauss-Newton method. If Amos has not obtained a solution by the time this limit is reached, the program will revert to the standard Amos algorithm.
Placement: [1].
Default
Only exact derivatives are used.
Remarks
For some combinations of a model with an estimation method, the Fisher method is highly effective, and may even converge in a single iteration (Kendall & Stuart, 1973, Section 18.21). However, Fisher usually makes Amos slower and less reliable.
See Also
Crit1 Method (on page 377) Crit2 Method (on page 379) Iterations Method (on page 482) Technical Method (on page 625) Time Method (on page 631)
402
403
FitAllModels Method
Fits all models.
Syntax
status = object.FitAllModels () The FitAllModels method syntax has the following parts:
Part Description
status
Zero if the most recently analyzed model was successfully fitted. Nonzero otherwise.
An object of type AmosEngine.
object
Placement: [3].
Remarks
The FitAllModels method causes all models to be fitted. If you have used the Model (see "Model Method" on page 492) method to specify multiple models, and want to have access to the results from models other than the last model fitted, use the FitModel (see "FitModel Method" on page 407) method once for each model.
See Also
FitModel Method (on page 407)
404
405
FitMLMoments Method
Fits the model to the sample covariance matrix that is the maximum likelihood estimate (rather than the unbiased estimate). In other words, the sample covariance matrix is composed of sums of squares and cross products divided by N (rather than by N 1).
Syntax
object.FitMLMoments () The FitMLMoments method syntax has the following parts:
Part
object
Description
An object of type AmosEngine.
Placement: [1].
Default
Amos fits the model to the biased sample covariance matrix, which is the maximum likelihood estimate, unless you use the FitUnbiasedMoments (see "FitUnbiasedMoments Method" on page 409) method.
Remarks
FitMLMoments and InputMLMoments (see "InputMLMoments Method" on page 465) have different effects. InputMLMoments (see "InputMLMoments Method" on page 465) specifies that any sample covariance matrix that is read from a data file is a maximum likelihood estimate. FitMLMoments, on the (g ) in Appendices A and B) that other hand, tells Amos to fit the model to the sample covariance matrix ( S is the maximum likelihood estimate.
See Also
FitUnbiasedMoments Method (on page 409) InputMLMoments Method (on page 465) InputUnbiasedMoments Method (on page 467)
406
407
FitModel Method
Fits a single model.
Syntax
status = object.FitModel () status = object.FitModel (modelName) status = object.FitModel (modelNumber) The FitModel method syntax has the following parts:
Part
status object modelName modelNumber
Description
Zero if the model was successfully fitted. Nonzero otherwise. An object of type AmosEngine. The name of a model. (Integer) A model number. The first model is model number 1.
Placement: [3].
Remarks
If neither modelName nor modelNumber is specified, model number 1 is fitted. All other methods that can be used to obtain the results of an analysis (such as Rmsea (see "Rmsea, RmseaLo, RmseaHi Methods" on page 597), Cmin (see "Cmin Method" on page 349), GetEstimates (see "GetEstimates Method" on page 432), and so forth) will provide results only for the most recently fitted model. Say that you want to print the RMSEA for each of several models. This can be done as follows.
Dim Sem As AmosEngine . . . Sem.FitModel 1 Debug.Print Sem.Rmsea Sem.FitModel 2 Debug.Print Sem.Rmsea Sem.FitModel 3 Debug.Print Sem.Rmsea . . .
See Also
FitAllModels Method (on page 403)
408
409
FitUnbiasedMoments Method
Fits the model to the unbiased sample covariance matrix (rather than the maximum likelihood estimate). In other words, the sample covariance matrix is composed of sums of squares and cross products divided by N - 1 (rather than by N).
Syntax
object.FitUnbiasedMoments () The FitUnbiasedMoments method syntax has the following parts:
Part
object
Description
An object of type AmosEngine.
Placement: [1].
Default
Amos fits the model to the biased sample covariance matrix, which is the maximum likelihood estimate, unless you use the FitUnbiasedMoments method.
Remarks
FitUnbiasedMoments and InputUnbiasedMoments (see "InputUnbiasedMoments Method" on page 467) have different effects. InputUnbiasedMoments (see "InputUnbiasedMoments Method" on page 467) specifies that any sample covariance matrix that is read from a data file is an unbiased estimate. (g ) FitUnbiasedMoments, on the other hand, tells Amos to fit the model to the sample covariance matrix ( S in the Users Guide, Appendices A and B) that is an unbiased estimate.
See Also
FitMLMoments Method (on page 405) InputMLMoments Method (on page 465) InputUnbiasedMoments Method (on page 467)
410
411
GenerateDefaultCovariances Method
Controls whether exogenous variables (except for unique variables) are allowed to covary by default.
Syntax
object.GenerateDefaultCovariances () object.GenerateDefaultCovariances (tf) The GenerateDefaultCovariances method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine. Optional. If tf is True (the default), exogenous variables (with the exception of residual variables) are allowed to covary by default. If tf is False, all exogenous variables are assumed to be uncorrelated.
Placement: [1].
Default
Residual variables are assumed to be uncorrelated among themselves and with every other exogenous variable. Exogenous variables that are not residual variables are assumed to be correlated.
412
413
414
Syntax
object.GetBCLowerBounds (matrixID, theMatrixBase0) object.GetBCLowerBounds (matrixID, theMatrixBase0, groupNumber) object.GetBCUpperBounds (matrixID, theMatrixBase0) object.GetBCUpperBounds (matrixID, theMatrixBase0, groupNumber) The GetBCLowerBounds and GetBCLowerBounds method syntaxes have the following parts:
Part
object matrixID theMatrixBase0
Description
An object of type AmosEngine. An integer that specifies a matrix of estimates, as described in Settings. A double precision array, dimensioned in the calling routine as Dim theMatrixBase0() As Double or as Dim theMatrixBase0(,) As Double On return from GetBCLowerBounds each element of theMatrixBase0 contains the lower bound on the bias-corrected confidence interval for the corresponding element of the matrix of estimates specified by matrixID. On return from GetBCUpperbounds, theMatrixBase0 contains upper bounds.
groupNumber
Optional. A group number. The first group is group number 1. If groupNumber is omitted, the first group is used.
Placement: [3].
Settings
The settings for matrixID are:
Constant
SampleCovariances SampleCorrelations SampleMeans ImpliedCovariances ImpliedCorrelations ImpliedMeans
Value Description
13 14 15 10 11 12 Sample covariances. Sample correlations. Sample means. The implied covariances among the observed variables in the model. The implied correlations among the observed variables in the model. The implied means of the observed variables in the model.
415
Constant
AllImpliedCovariances
Value Description
7 The implied covariances among all variables in the model, with the exception of residual variables. The implied correlations among all variables in the model, with the exception of residual variables. The implied means of all variables in the model, with the exception of residual variables. Direct effects. Indirect effects. Total effects. Standardized direct effects. Standardized indirect effects. Standardized total effects. Factor score weights.
AllImpliedCorrelations
AllImpliedMeans
19 20 5 22 23 21 6
Remarks
In order to use GetBCLowerBounds (matrixID), you must first use NeedBCLowerBounds (see "NeedBCLowerBounds, NeedBCUpperBounds Methods" on page 513) (matrixID). For example, you have to use
object.NeedBCLowerBounds (see "NeedBCLowerBounds, NeedBCUpperBounds Methods" on page 513) (FactorScoreWeights)
before using
object.GetBCLowerBounds (FactorScoreWeights, )
Similarly, in order to use GetBCUpperBounds (matrixID), you must first use NeedBCUpperBounds (see "NeedBCLowerBounds, NeedBCUpperBounds Methods" on page 513) (matrixID). For example, you have to use
object.NeedBCUpperBounds (see "NeedBCLowerBounds, NeedBCUpperBounds Methods" on page 513) (FactorScoreWeights)
before using
object.GetBCUpperBounds (FactorScoreWeights, )
416
Bootstrap (see "Bootstrap Method" on page 332) can be used to specify the number of bootstrap samples. By default, 1000 bootstrap samples will be generated. ConfidenceBC (see "ConfidenceBC Method" on page 360) can be used to specify the confidence level. By default, 90% confidence intervals will be estimated.
See Also
Bootstrap Method (on page 332) ConfidenceBC Method (on page 360) GetBootSampleEstimates Method (on page 423) GetEstimates Method (on page 432) GetPCLowerBounds, GetPCUpperBounds Methods (on page 441) GetStandardErrors Method (on page 450) NeedBCLowerBounds, NeedBCUpperBounds Methods (on page 513)
417
418
Debug.Write(" ") For j = 0 To NColumns1 Debug.Write(CNames(j).PadLeft(10)) Next Debug.WriteLine("") For i = 0 To NRows1 Debug.Write(RNames(i).PadRight(8)) For j = 0 To NColumns1 Debug.Write(TheMatrix(i, j).ToString(".00000").PadLeft(10)) Next Debug.WriteLine("") Next End Sub End Module
419
Syntax
object.GetBCLowerBoundsEx (matrixID, am) object.GetBCUpperBoundsEx (matrixID, am, groupNumber) The GetBCLowerBoundsEx and GetBCLowerBoundsEx method syntaxes have the following parts:
Part
object matrixID am
Description
An object of type AmosEngine. An integer that specifies a matrix of estimates, as described in Settings. An object of type AmosMatrix. On return from GetBCLowerBoundsEx am contains lower bounds on confidence intervals for the estimates specified by matrixID. On return from GetBCUpperBoundsEx, am contains upper bounds.
groupNumber
Optional. A group number. The first group is group number 1. If groupNumber is omitted, the first group is used.
Placement: [3].
Settings
The settings for matrixID are:
Constant
SampleCovariances SampleCorrelations SampleMeans ImpliedCovariances ImpliedCorrelations ImpliedMeans AllImpliedCovariances
Value Description
13 14 15 10 11 12 7 Sample covariances. Sample correlations. Sample means. The implied covariances among the observed variables in the model. The implied correlations among the observed variables in the model. The implied means of the observed variables in the model. The implied covariances among all variables in the model, with the exception of residual variables. The implied correlations among all variables in the model, with the exception of residual variables. The implied means of all variables in the model, with the exception of residual variables. Direct effects.
AllImpliedCorrelations
AllImpliedMeans
DirectEffects
19
420
Constant
IndirectEffects TotalEffects StandardizedDirectEffects StandardizedIndirectEffects StandardizedTotalEffects FactorScoreWeights
Value Description
20 5 22 23 21 6 Indirect effects. Total effects. Standardized direct effects. Standardized indirect effects. Standardized total effects. Factor score weights.
Remarks
In order to use GetBCLowerBoundsEx (matrixID), you must first use NeedBCLowerBounds (see "NeedBCLowerBounds, NeedBCUpperBounds Methods" on page 513) (matrixID). For example, you have to use
object.NeedBCLowerBounds (see "NeedBCLowerBounds, NeedBCUpperBounds Methods" on page 513) (FactorScoreWeights)
before using
object.GetBCLowerBoundsEx (maFactorScoreWeights, )
Similarly, in order to use GetBCUpperBoundsEx (matrixID), you must first use NeedBCUpperBounds (see "NeedBCLowerBounds, NeedBCUpperBounds Methods" on page 513) (matrixID). For example, you have to use
object.NeedBCUpperBounds (see "NeedBCLowerBounds, NeedBCUpperBounds Methods" on page 513) (FactorScoreWeights)
before using
object.GetBCUpperBoundsEx (FactorScoreWeights, )
421
Bootstrap (see "Bootstrap Method" on page 332) can be used to specify the number of bootstrap samples. By default, 1000 bootstrap samples are generated. ConfidenceBC (see "ConfidenceBC Method" on page 360) can be used to specify the confidence level. By default, 90% confidence intervals are estimated. GetBCLowerBoundsEx and GetBCUpperBoundsEx differ from GetBCLowerBounds (see "GetBCLowerBounds, GetBCUpperBounds Methods" on page 414) and GetBCUpperBounds (see "GetBCLowerBounds, GetBCUpperBounds Methods" on page 414) in the following way. GetBCLowerBoundsEx and GetBCUpperBoundsEx assign values to the members of an AmosMatrix object, which contains the matrix of lower bounds (or upper bounds) as well as the variable names and variable numbers associated with the matrixs rows and columns. GetBCLowerBounds (see "GetBCLowerBounds, GetBCUpperBounds Methods" on page 414) and GetBCUpperBounds (see "GetBCLowerBounds, GetBCUpperBounds Methods" on page 414), by contrast, merely set a double array equal to the matrix of lower bounds (or upper bounds). Additional calls to RowNames (see "RowNames Method" on page 600), RowNumbers (see "RowNumbers Method" on page 604), ColumnNames (see "ColumnNames Method" on page 352) and ColumnNumbers (see "ColumnNumbers Method" on page 356) are necessary if there is a need for the variable names and variable numbers associated with the matrixs rows and columns. GetBCLowerBoundsEx and GetBCUpperBoundsEx are often more convenient, but GetBCLowerBounds (see "GetBCLowerBounds, GetBCUpperBounds Methods" on page 414) and GetBCUpperBounds (see "GetBCLowerBounds, GetBCUpperBounds Methods" on page 414) are faster.
422
423
GetBootSampleEstimates Method
Gets a matrix of estimates from an individual bootstrap sample.
Syntax
object.GetBootSampleEstimates (matrixID, theMatrix, sampleNumber) object.GetBootSampleEstimates (matrixID, theMatrix, sampleNumber, groupNumber) The GetBootSampleEstimates method syntax has the following parts:
Part
object matrixID theMatrix
Description
An object of type AmosEngine. An integer that specifies a matrix of estimates, as described in Settings. A double precision array, dimensioned in the calling routine as Dim theMatrix(,) As Double. On return from GetBootSampleEstimates theMatrix contains the estimate from bootstrap sample number sampleNumber, of the matrix specified by matrixID.
sampleNumber groupNumber
An integer specifying an individual bootstrap sample. The first bootstrap sample is sample number 1. Optional integer specifying a group number. The first group is group number 1. If groupNumber is omitted, the first group is used.
Placement: [3].
Settings
The settings for matrixID are:
Constant
SampleCovariances SampleCorrelations SampleMeans ImpliedCovariances ImpliedCorrelations ImpliedMeans AllImpliedCovariances
Value Description
13 14 15 10 11 12 7 Sample covariances. Sample correlations. Sample means. The implied covariances among the observed variables in the model. The implied correlations among the observed variables in the model. The implied means of the observed variables in the model. The implied covariances among all variables in the model, with the exception of residual variables. The implied correlations among all variables in the model, with the exception of residual variables.
AllImpliedCorrelations
424
Constant
AllImpliedMeans
Value Description
9 The implied means of all variables in the model, with the exception of residual variables. Direct effects. Indirect effects. Total effects. Standardized direct effects. Standardized indirect effects. Standardized total effects. Factor score weights.
19 20 5 22 23 21 6
Remarks
You have to use NeedBootSampleEstimates (see "NeedBootSampleEstimates Method" on page 517) to declare that estimates of a matrix will be needed before you can use GetBootSampleEstimates to obtain the estimates from a bootstrap sample. For example, you have to use
object.NeedBootSampleEstimates (see "NeedBootSampleEstimates Method" on page 517) (StandardizedTotalEffects)
before using
object.GetBootSampleEstimates (StandardizedTotalEffects, )
See Also
Bootstrap Method (on page 332) GetBCLowerBounds, GetBCUpperBounds Methods (on page 414) GetEstimates Method (on page 432) GetPCLowerBounds, GetPCUpperBounds Methods (on page 441) GetStandardErrors Method (on page 450) NeedBootSampleEstimates Method (on page 517)
425
426
Debug.WriteLine("") For i = 0 To NRows1 Debug.Write(RNames(i).PadRight(8)) For j = 0 To NColumns1 Debug.Write(TheMatrix(i, j).ToString(".00000").PadLeft(10)) Next Debug.WriteLine("") Next End Sub End Module
427
GetDataFile Method
Gets information about the data file for a single group.
Syntax
object.GetDataFile (groupNumber, dbFormat, fileName, tableName, groupingVariable, groupingValue) The GetDataFile method syntax has the following parts:
Part
object groupNumber dbFormat fileName tableName groupingVariable groupingValue
Description
An object of type AmosEngine or PathDiagrammer. Number of the group for which data file information is wanted. The first group is group number 1. (Integer) A database format specifier, as described in Settings. (String) The name of the data file. (String) The name of the data table within the data file (for data files that contain multiple data tables). (String) The name of the grouping variable. The empty string if there is no grouping variable. (Object) The value of the grouping variable for this group.
Placement: [2].
Settings
The settings for dbFormat are:
Constant
mmDBASE3 mmDBASE4 mmDBASE5 mmEXCEL3 mmEXCEL4 mmEXCEL5 mmEXCEL97 mmFOXPRO20 mmFOXPRO25 mmFOXPRO26 mmLOTUSWK1 mmLOTUSWK3 mmLOTUSWK4 mmAccess mmSPSS mmText
Value Description
0 1 2 3 4 5 6 7 8 9 11 12 13 14 18 19 Dbase III Dbase IV Dbase V Excel 3 Excel 4 Excel 5, Excel 7 Excel 97, Excel 8 Foxpro 2.0 Foxpro 2.5 Foxpro 2.6 Lotus *.wk1 Lotus *.wk3 Lotus *.wk4 Microsoft Access PASW Statistics Text
428
429
430
GetEstimate Method
Gets one element of a matrix of estimates.
Syntax
result = object.GetEstimate (matrixID, rowVariableName, columnVariableName) result = object.GetEstimate (matrixID, rowVariableName, columnVariableName, groupNumber) result = object.GetEstimate (matrixID, row, column) result = object.GetEstimate (matrixID, row, column, groupNumber) The GetEstimates method syntax has the following parts:
Part
result object matrixID rowVariableName columnVariableName row column groupNumber
Description
(Double) The scalar value in the specified row and column of the matrix. An object of type AmosEngine. An integer that specifies a matrix of estimates, as described in Settings. The name of a variable that labels a row of the matrix. The name of a variable that labels a row of the matrix. (Integer) A row number. The rows are numbered starting with 0. (Integer) A column number. The columns are numbered starting with 0. Optional integer specifying a group number. The first group is group number 1. If groupNumber is omitted, the first group is used.
Placement: [3].
Settings
The settings for matrixID are:
Constant
SampleCovariances SampleCorrelations SampleMeans ImpliedCovariances ImpliedCorrelations ImpliedMeans AllImpliedCovariances
Value Description
13 14 15 10 11 12 7 Sample covariances. Sample correlations. Sample means. The implied covariances among the observed variables in the model. The implied correlations among the observed variables in the model. The implied means of the observed variables in the model. The implied covariances among all variables in the model, with the exception of residual variables.
431
Constant
AllImpliedCorrelations
Value Description
8 The implied correlations among all variables in the model, with the exception of residual variables. The implied means of all variables in the model, with the exception of residual variables. Direct effects. Indirect effects. Total effects. Standardized direct effects. Standardized indirect effects. Standardized total effects. Factor score weights.
AllImpliedMeans
19 20 5 22 23 21 6
Remarks
You have to use NeedEstimates (see "NeedEstimates Method" on page 521) to declare that estimates of a matrix will be needed before you can use GetEstimate to obtain the estimates. For example, you have to use
object.NeedEstimates (see "NeedEstimates Method" on page 521) (StandardizedTotalEffects)
before using
object.GetEstimate (StandardizedTotalEffects, )
See Also
GetEstimates Method (on page 432) GetEstimatesEx Method (on page 436) GetStandardErrors Method (on page 450) NeedEstimates Method (on page 521)
432
GetEstimates Method
Gets a matrix of estimates.
Syntax
object.GetEstimates (matrixID, theMatrixBase0) object.GetEstimates (matrixID, theMatrixBase0, groupNumber) The GetEstimates method syntax has the following parts:
Part
object matrixID theMatrixBase0
Description
An object of type AmosEngine. An integer that specifies a matrix of estimates, as described in Settings. A double precision array, dimensioned in the calling routine as Dim theMatrixBase0() As Double or as Dim theMatrixBase0(,) As Double On return from GetEstimates theMatrixBase0 contains the estimate of the matrix specified by matrixID.
groupNumber
Optional integer specifying a group number. The first group is group number 1. If groupNumber is omitted, the first group is used.
Placement: [3].
Settings
The settings for matrixID are:
Constant
SampleCovariances SampleCorrelations SampleMeans ImpliedCovariances ImpliedCorrelations ImpliedMeans AllImpliedCovariances
Value Description
13 14 15 10 11 12 7 Sample covariances. Sample correlations. Sample means. The implied covariances among the observed variables in the model. The implied correlations among the observed variables in the model. The implied means of the observed variables in the model. The implied covariances among all variables in the model, with the exception of residual variables. The implied correlations among all variables in the model, with the exception of residual variables. The implied means of all variables in the model, with the exception of residual variables.
AllImpliedCorrelations
AllImpliedMeans
433
Constant
DirectEffects IndirectEffects TotalEffects StandardizedDirectEffects StandardizedIndirectEffects StandardizedTotalEffects FactorScoreWeights
Value Description
19 20 5 22 23 21 6 Direct effects. Indirect effects. Total effects. Standardized direct effects. Standardized indirect effects. Standardized total effects. Factor score weights.
Remarks
You have to use NeedEstimates (see "NeedEstimates Method" on page 521) to declare that estimates of a matrix will be needed before you can use GetEstimates to obtain the estimates. For example, you have to use
object.NeedEstimates (see "NeedEstimates Method" on page 521) (StandardizedTotalEffects)
before using
object.GetEstimates (StandardizedTotalEffects, )
See Also
GetEstimate Method (on page 430) GetEstimatesEx Method (on page 436) GetStandardErrors Method (on page 450) NeedEstimates Method (on page 521)
434
Programming with Amos Dim NRows1 As Integer, NColumns1 As Integer Dim i As Integer, j As Integer NRows1 = UBound(RNames) NColumns1 = UBound(CNames) Debug.Write(" ") For j = 0 To NColumns1 Debug.Write(CNames(j).PadLeft(10)) Next Debug.WriteLine("") For i = 0 To NRows1 Debug.Write(RNames(i).PadRight(8)) For j = 0 To NColumns1 Debug.Write(TheMatrix(i, j).ToString(".00000").PadLeft(10)) Next Debug.WriteLine("") Next End Sub End Module
435
436
GetEstimatesEx Method
Gets a matrix of estimates.
Syntax
object.GetEstimatesEx (matrixID, theMatrix) object.GetEstimatesEx (matrixID, theMatrix, groupNumber) The GetEstimatesEx method syntax has the following parts:
Part
object matrixID theMatrix
Description
An object of type AmosEngine. An integer that specifies a matrix of estimates, as described in Settings. An object of type AmosMatrix. On return from GetEstimatesEx theMatrix contains the estimate of the matrix specified by matrixID.
groupNumber
Optional integer specifying a group number. The first group is group number 1. If groupNumber is omitted, the first group is used.
Placement: [3].
Settings
The settings for matrixID are:
Constant
SampleCovariances SampleCorrelations SampleMeans ImpliedCovariances ImpliedCorrelations ImpliedMeans AllImpliedCovariances
Value Description
13 14 15 10 11 12 7 Sample covariances. Sample correlations. Sample means. The implied covariances among the observed variables in the model. The implied correlations among the observed variables in the model. The implied means of the observed variables in the model. The implied covariances among all variables in the model, with the exception of residual variables. The implied correlations among all variables in the model, with the exception of residual variables. The implied means of all variables in the model, with the exception of residual variables. Direct effects. Indirect effects. Total effects.
AllImpliedCorrelations
AllImpliedMeans
19 20 5
437
Constant
StandardizedDirectEffects StandardizedIndirectEffects StandardizedTotalEffects FactorScoreWeights
Value Description
22 23 21 6 Standardized direct effects. Standardized indirect effects. Standardized total effects. Factor score weights.
Remarks
You have to use NeedEstimates (see "NeedEstimates Method" on page 521) to declare that estimates of a matrix will be needed before you can use GetEstimatesEx to obtain the estimates. For example, you have to use
object.NeedEstimates (see "NeedEstimates Method" on page 521) (StandardizedTotalEffects)
before using
object.GetEstimatesEx (StandardizedTotalEffects, )
GetEstimatesEx differs from GetEstimates (see "GetEstimates Method" on page 432) in the following way. GetEstimatesEx assigns values to the members of an AmosMatrix object, which contains the matrix of estimates as well as the variable names and variable numbers associated with the matrixs rows and columns. GetEstimates (see "GetEstimates Method" on page 432), by contrast, merely sets a double array equal to the matrix of estimates. Additional calls to RowNames (see "RowNames Method" on page 600), RowNumbers (see "RowNumbers Method" on page 604), ColumnNames (see "ColumnNames Method" on page 352) and ColumnNumbers (see "ColumnNumbers Method" on page 356) are necessary if there is a need for the variable names and variable numbers associated with the matrixs rows and columns. GetEstimatesEx is often more convenient, but GetEstimates (see "GetEstimates Method" on page 432) is faster.
See Also
GetEstimates Method (on page 432) GetStandardErrors Method (on page 450) NeedEstimates Method (on page 521)
438
439
GetGroupName Method
Gets the name of a group.
Syntax
object.GetGroupName () object.GetGroupName (groupNumber) The GetGroupName method syntax has the following parts:
Part
object groupNumber
Description
An object of type AmosEngine. Optional group number. The first group is group number 1. If groupNumber is omitted, the first group is used.
440
441
Syntax
object.GetPCLowerBounds (matrixID, theMatrixBase0) object.GetPCLowerBounds (matrixID, theMatrixBase0, groupNumber) object.GetPCUpperBounds (matrixID, theMatrixBase0) object.GetPCUpperBounds (matrixID, theMatrixBase0, groupNumber) The GetPCLowerBounds and GetPCLowerBounds method syntaxes have the following parts:
Part
object matrixID theMatrixBase0
Description
An object of type AmosEngine. An integer that specifies a matrix of estimates, as described in Settings. A double precision array, dimensioned in the calling routine as Dim theMatrixBase0() As Double or as Dim theMatrixBase0(,) As Double On return from GetPCLowerBounds each element of theMatrixBase0 contains the lower bound on the confidence interval for the corresponding element of the matrix of estimates specified by matrixID. On return from GetPCUpperbounds, theMatrixBase0 contains upper bounds.
groupNumber
Optional. A group number. The first group is group number 1. If groupNumber is omitted, the first group is used.
Placement: [3].
Settings
The settings for matrixID are:
Constant
SampleCovariances SampleCorrelations SampleMeans ImpliedCovariances ImpliedCorrelations ImpliedMeans
Value Description
13 14 15 10 11 12 Sample covariances. Sample correlations. Sample means. The implied covariances among the observed variables in the model. The implied correlations among the observed variables in the model. The implied means of the observed variables in the model.
442
Constant
AllImpliedCovariances
Value Description
7 The implied covariances among all variables in the model, with the exception of residual variables. The implied correlations among all variables in the model, with the exception of residual variables. The implied means of all variables in the model, with the exception of residual variables. Direct effects. Indirect effects. Total effects. Standardized direct effects. Standardized indirect effects. Standardized total effects. Factor score weights.
AllImpliedCorrelations
AllImpliedMeans
19 20 5 22 23 21 6
Remarks
In order to use GetPCLowerBounds (matrixID), you must first use NeedPCLowerBounds (see "NeedPCLowerBounds, NeedPCUpperBounds Methods" on page 525) (matrixID). For example, you have to use
object.NeedPCLowerBounds (see "NeedPCLowerBounds, NeedPCUpperBounds Methods" on page 525) (FactorScoreWeights)
before using
object.GetPCLowerBounds (FactorScoreWeights, )
Similarly, in order to use GetPCUpperBounds (matrixID), you must first use NeedPCUpperBounds (see "NeedPCLowerBounds, NeedPCUpperBounds Methods" on page 525) (matrixID). For example, you have to use
object.NeedPCUpperBounds (see "NeedPCLowerBounds, NeedPCUpperBounds Methods" on page 525) (FactorScoreWeights)
before using
object.GetPCUpperBounds (FactorScoreWeights, )
443
Bootstrap (see "Bootstrap Method" on page 332) can be used to specify the number of bootstrap samples. By default, 1000 bootstrap samples will be generated. ConfidencePC (see "ConfidencePC Method" on page 364) can be used to specify the confidence level. By default, 90% confidence intervals will be estimated.
444
Programming with Amos NRows1 = UBound(RNames) NColumns1 = UBound(CNames) Debug.Write(" ") For j = 0 To NColumns1 Debug.Write(CNames(j).PadLeft(10)) Next Debug.WriteLine("") For i = 0 To NRows1 Debug.Write(RNames(i).PadRight(8)) For j = 0 To NColumns1 Debug.Write(TheMatrix(i, j).ToString(".00000").PadLeft(10)) Next Debug.WriteLine("") Next End Sub End Module
445
446
Syntax
object.GetPCLowerBoundsEx (matrixID, am) object.GetPCLowerBoundsEx (matrixID, am, groupNumber) object.GetPCUpperBoundsEx (matrixID, am) object.GetPCUpperBoundsEx (matrixID, am, groupNumber) The GetPCLowerBoundsEx and GetPCLowerBoundsEx method syntaxes have the following parts:
Part
object matrixID am
Description
An object of type AmosEngine. An integer that specifies a matrix of estimates, as described in Settings. An object of type AmosMatrix. On return from GetPCLowerBoundsEx am contains lower bounds on confidence intervals for the estimates specified by matrixID. On return from GetPCUpperBoundsEx, am contains upper bounds.
groupNumber
Optional. A group number. The first group is group number 1. If groupNumber is omitted, the first group is used.
Placement: [3].
Settings
The settings for matrixID are:
Constant
SampleCovariances SampleCorrelations SampleMeans ImpliedCovariances ImpliedCorrelations ImpliedMeans AllImpliedCovariances
Value Description
13 14 15 10 11 12 7 Sample covariances. Sample correlations. Sample means. The implied covariances among the observed variables in the model. The implied correlations among the observed variables in the model. The implied means of the observed variables in the model. The implied covariances among all variables in the model, with the exception of residual variables. The implied correlations among all variables in the model, with the exception of residual variables.
AllImpliedCorrelations
447
Constant
AllImpliedMeans
Value Description
9 The implied means of all variables in the model, with the exception of residual variables. Direct effects. Indirect effects. Total effects. Standardized direct effects. Standardized indirect effects. Standardized total effects. Factor score weights.
19 20 5 22 23 21 6
Remarks
In order to use GetPCLowerBoundsEx (matrixID), you must first use NeedPCLowerBounds (see "NeedPCLowerBounds, NeedPCUpperBounds Methods" on page 525) (matrixID). For example, you have to use
object.NeedPCLowerBounds (see "NeedPCLowerBounds, NeedPCUpperBounds Methods" on page 525) (FactorScoreWeights)
before using
object.GetPCLowerBoundsEx (FactorScoreWeights, )
Similarly, in order to use GetPCUpperBoundsEx (matrixID), you must first use NeedPCUpperBounds (see "NeedPCLowerBounds, NeedPCUpperBounds Methods" on page 525) (matrixID). For example, you have to use
object.NeedPCUpperBounds (see "NeedPCLowerBounds, NeedPCUpperBounds Methods" on page 525) (FactorScoreWeights)
before using
object.GetPCUpperBoundsEx (FactorScoreWeights, )
448
Bootstrap (see "Bootstrap Method" on page 332) can be used to specify the number of bootstrap samples. By default, 1000 bootstrap samples are generated. ConfidencePC (see "ConfidencePC Method" on page 364) can be used to specify the confidence level. By default, 90% confidence intervals are estimated. GetPCLowerBoundsEx and GetPCUpperBoundsEx differ from GetPCLowerBounds (see "GetPCLowerBounds, GetPCUpperBounds Methods" on page 441) and GetPCUpperBounds (see "GetPCLowerBounds, GetPCUpperBounds Methods" on page 441) in the following way. GetPCLowerBoundsEx and GetPCUpperBoundsEx assign values to the members of an AmosMatrix object, which contains the matrix of lower bounds (or upper bounds) as well as the variable names and variable numbers associated with the matrixs rows and columns. GetPCLowerBounds (see "GetPCLowerBounds, GetPCUpperBounds Methods" on page 441) and GetPCUpperBounds (see "GetPCLowerBounds, GetPCUpperBounds Methods" on page 441) , by contrast, merely set a double array equal to the matrix of lower bounds (or upper bounds). Additional calls to RowNames (see "RowNames Method" on page 600), RowNumbers (see "RowNumbers Method" on page 604), ColumnNames (see "ColumnNames Method" on page 352) and ColumnNumbers (see "ColumnNumbers Method" on page 356) are necessary if there is a need for the variable names and variable numbers associated with the matrixs rows and columns. GetPCLowerBoundsEx and GetPCUpperBoundsEx are often more convenient, but GetPCLowerBounds (see "GetPCLowerBounds, GetPCUpperBounds Methods" on page 441) and GetPCUpperBounds (see "GetPCLowerBounds, GetPCUpperBounds Methods" on page 441) are faster.
449
450
GetStandardErrors Method
Gets bootstrap standard errors for the elements of a matrix of estimates.
Syntax
object.GetStandardErrors (matrixID, theMatrixBase0) object.GetStandardErrors (matrixID, theMatrixBase0, groupNumber) The GetStandardErrors method syntax has the following parts:
Part
object matrixID theMatrixBase0
Description
An object of type AmosEngine. An integer that specifies a matrix of estimates, as described in Settings. A double precision array, dimensioned in the calling routine as Dim theMatrixBase0() As Double or as Dim theMatrixBase0(,) As Double On return from GetStandardErrors theMatrixBase0 contains bootstrap standard errors for the elements of the matrix of estimates specified by matrixID.
groupNumber
Optional. A group number. The first group is group number 1. If groupNumber is omitted, the first group is used.
Placement: [3].
Settings
The settings for matrixID are:
Constant
SampleCovariances SampleCorrelations SampleMeans ImpliedCovariances ImpliedCorrelations ImpliedMeans AllImpliedCovariances
Value Description
13 14 15 10 11 12 7 Sample covariances. Sample correlations. Sample means. The implied covariances among the observed variables in the model. The implied correlations among the observed variables in the model. The implied means of the observed variables in the model. The implied covariances among all variables in the model, with the exception of residual variables. The implied correlations among all variables in the model, with the exception of residual variables.
AllImpliedCorrelations
451
Constant
AllImpliedMeans
Value Description
9 The implied means of all variables in the model, with the exception of residual variables. Direct effects. Indirect effects. Total effects. Standardized direct effects. Standardized indirect effects. Standardized total effects. Factor score weights.
19 20 5 22 23 21 6
Remarks
You have to use NeedStandardErrors (see "NeedStandardErrors Method" on page 529) to declare that standard errors for a matrix will be needed before you can use GetStandardErrors to obtain the standard errors. For example, you have to use
object.NeedStandardErrors (see "NeedStandardErrors Method" on page 529) (StandardizedTotalEffects)
before using
object.GetStandardErrors (StandardizedTotalEffects)
See Also
Bootstrap Method (on page 332) GetEstimates Method (on page 432) GetStandardErrorsEx Method (on page 454) NeedStandardErrors Method (on page 529)
452
Programming with Amos Debug.Write(TheMatrix(i, j).ToString(".00000").PadLeft(10)) Next Debug.WriteLine("") Next End Sub End Module
453
454
GetStandardErrorsEx Method
Gets bootstrap standard errors for the elements of a matrix of estimates.
Syntax
object.GetStandardErrorsEx (matrixID, am, groupNumber) The GetStandardErrorsEx method syntax has the following parts:
Part
object matrixID am
Description
An object of type AmosEngine. An integer that specifies a matrix of estimates, as described in Settings. An object of type AmosMatrix. On return from GetStandardErrorsEx, am contains bootstrap standard errors for the elements of the matrix of estimates specified by matrixID.
groupNumber
Optional. A group number. The first group is group number 1. If groupNumber is omitted, the first group is used.
Placement: [3].
Settings
The settings for matrixID are:
Constant
SampleCovariances SampleCorrelations SampleMeans ImpliedCovariances ImpliedCorrelations ImpliedMeans AllImpliedCovariances
Value Description
13 14 15 10 11 12 7 Sample covariances. Sample correlations. Sample means. The implied covariances among the observed variables in the model. The implied correlations among the observed variables in the model. The implied means of the observed variables in the model. The implied covariances among all variables in the model, with the exception of residual variables. The implied correlations among all variables in the model, with the exception of residual variables. The implied means of all variables in the model, with the exception of residual variables. Direct effects. Indirect effects. Total effects. Standardized direct effects.
AllImpliedCorrelations
AllImpliedMeans
19 20 5 22
455
Constant
StandardizedIndirectEffects StandardizedTotalEffects FactorScoreWeights
Value Description
23 21 6 Standardized indirect effects. Standardized total effects. Factor score weights.
Remarks
You have to use NeedStandardErrors (see "NeedStandardErrors Method" on page 529) to declare that standard errors for a matrix will be needed before you can use GetStandardErrorsEx to obtain the standard errors. For example, you have to use
object.NeedStandardErrors (see "NeedStandardErrors Method" on page 529) (StandardizedTotalEffects)
before using
object.GetStandardErrorsEx (StandardizedTotalEffects, )
GetStandardErrorsEx differs from GetStandardErrors (see "GetStandardErrors Method" on page 450) in the following way. GetStandardErrorsEx assigns values to the members of an AmosMatrix object, which contains the matrix of standard errors as well as the variable names and variable numbers associated with the matrixs rows and columns. GetStandardErrors (see "GetStandardErrors Method" on page 450) , by contrast, merely sets a double array equal to the matrix of standard errors. Additional calls to RowNames (see "RowNames Method" on page 600), RowNumbers (see "RowNumbers Method" on page 604), ColumnNames (see "ColumnNames Method" on page 352) and ColumnNumbers (see "ColumnNumbers Method" on page 356) are necessary if there is a need for the variable names and variable numbers associated with the matrixs rows and columns. GetStandardErrorsEx is often more convenient, but GetStandardErrors (see "GetStandardErrors Method" on page 450) is faster.
See Also
Bootstrap Method (on page 332) GetEstimates Method (on page 432) GetStandardErrors Method (on page 450) NeedStandardErrors Method (on page 529)
456
457
Gls Method
Requests a generalized least squares solution, obtained by minimizing (D1) together with (D3) in Appendix B.
Syntax
object.Gls () The Gls method syntax has the following parts:
Part
object
Description
An object of type AmosEngine.
Placement: [1].
Default
When you do not specify an estimation criterion, the maximum likelihood criterion (Ml (see "Ml Method" on page 490) method) is used.
See Also
Adf Method (on page 292) BootGls Method (on page 323) Ml Method (on page 490) Sls Method (on page 614) Uls Method (on page 637)
458
459
GroupName Method
Assigns a name to a group.
Syntax
object.GroupName (theGroupName) The GroupName method syntax has the following parts:
Part
object theGroupName
Description
An object of type AmosEngine. A name for the group whose data is specified by the most recent BeginGroup (see "BeginGroup Method" on page 308) or BeginGroupEx (see "BeginGroupEx Method" on page 310) method.
Placement: [2].
Default
The groups are called Group number 1, Group number 2, and so on.
See Also
BeginGroup Method (on page 308) BeginGroupEx Method (on page 310)
460
461
ImpliedMoments Method
Controls reporting of the implied covariance matrix for the observed variables. When means and intercepts are explicitly modeled, ImpliedMoments also controls the reporting of implied means.
Syntax
object.ImpliedMoments () object.ImpliedMoments (tf) The ImpliedMoments method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine.
Optional. A boolean value that controls the reporting of implied moments. True (default) requests the output. False suppresses it.
Placement: [1].
Default
Implied moments are not reported.
Remarks
The implied variances, covariances and means are estimates of the corresponding population values under the assumption that the specified model is correct. If you use both the Standardized (see "Standardized Method" on page 622) and the ImpliedMoments methods, the implied correlation matrix will be reported, in addition to the implied covariance matrix. ImpliedMoments is identical to AllImpliedMoments (see "AllImpliedMoments Method" on page 296), except that AllImpliedMoments (see "AllImpliedMoments Method" on page 296) displays implied variances, covariances and means for all variables in the model, not just for the observed variables.
See Also
Admissible Method (on page 294) AllImpliedMoments Method (on page 296) ResidualMoments Method (on page 592) SampleMoments Method (on page 608)
462
463
Syntax
object.Initialize (projectName) The Initialize method syntax has the following parts:
Part
object projectName
Description
An object of type AmosEngine. A fully qualified path without any file extension. The output generated by the TextOutput (see "TextOutput Method" on page 627) method is written to the file projectName.AmosOutput. The output file used for displaying results on the path diagram in Amos Graphics is called projectName.amp.
Default
The use of Initialize is optional. By default, the output generated by TextOutput (see "TextOutput Method" on page 627) is written to the file temppath\AmosScratch.AmosOutput, where temppath is the Windows system temporary directory. Results to be displayed on the path diagram in Amos Graphics are written to the file temppath\AmosScratch.amp.
Remarks
The TextOutputFileName (see "TextOutputFileName Method" on page 629) method returns the name of the file that contains the output from TextOutput (see "TextOutput Method" on page 627).
See Also
Shutdown Method (on page 612)
464
465
InputMLMoments Method
Specifies that any sample covariances that are read from a data file are (biased) maximum likelihood estimates of the corresponding population covariances. In other words, the input covariance matrix is assumed to be made up of sums of squares and cross products, divided by N (rather than by N - 1).
Syntax
object.InputMLMoments () The InputMLMoments method syntax has the following parts:
Part
object
Description
An object of type AmosEngine.
Placement: [1].
Default
Sample covariances that are read from a data file are assumed to be (biased) maximum likelihood estimates.
Remarks
FitMLMoments (see "FitMLMoments Method" on page 405) and InputMLMoments have different effects. InputMLMoments specifies that any sample covariance matrix that is read from a data file is a maximum likelihood estimate. FitMLMoments (see "FitMLMoments Method" on page 405), on the other hand, tells (g ) Amos to fit the model to the sample covariance matrix ( S in Appendices A and B) that is the maximum likelihood estimate.
See Also
FitMLMoments Method (on page 405) FitUnbiasedMoments Method (on page 409) InputUnbiasedMoments Method (on page 467)
466
467
InputUnbiasedMoments Method
Specifies that any sample covariances that are read from a data file are unbiased estimates of the corresponding population covariances. In other words, the input covariance matrix is assumed to be made up of sums of squares and cross products, divided by N - 1 (rather than by N).
Syntax
object.InputUnbiasedMoments () The InputUnbiasedMoments method syntax has the following parts:
Part
object
Description
An object of type AmosEngine.
Placement: [1].
Default
Sample covariances read from a data file are assumed to be (biased) maximum likelihood estimates.
Remarks
FitUnbiasedMoments (see "FitUnbiasedMoments Method" on page 409) and InputUnbiasedMoments have different effects. InputUnbiasedMoments specifies that any sample covariance matrix that is read from a data file is an unbiased estimate. FitUnbiasedMoments (see "FitUnbiasedMoments Method" on page 409), (g ) on the other hand, tells Amos to fit the model to the sample covariance matrix ( S in Appendices A and B) that is an unbiased estimate.
See Also
FitMLMoments Method (on page 405) FitUnbiasedMoments Method (on page 409) InputMLMoments Method (on page 465)
468
469
InputVariableHasMissingValues Method
Gets a boolean value that indicates whether an observed variable has missing observations.
Syntax
object.InputVariableHasMissingValues (variableNumber) object.InputVariableHasMissingValues (variableNumber, groupNumber) The InputVariableHasMissingValues method syntax has the following parts:
Part
object variableNumber
Description
An object of type AmosEngine. An integer specifying a variable in the data set for group number groupNumber. variableNumber is 1 for the first variable in the data set. Optional. An integer specifying a group. groupNumber is 1 for the first group. If groupNumber is omitted, the first group is used.
groupNumber
Placement: [2].
See Also
AnyMissingValues Method (on page 300)
470
471
InputVariableIsNumeric Method
Gets a boolean value that indicates whether an observed variable is numeric.
Syntax
object.InputVariableIsNumeric(variableNumber) object.InputVariableIsNumeric(variableNumber, groupNumber) The InputVariableIsNumeric method syntax has the following parts:
Part
object variableNumber
Description
An object of type AmosEngine. An integer specifying a variable in the data set for group number groupNumber. variableNumber is 1 for the first variable in the data set. Optional. An integer specifying a group. groupNumber is 1 for the first group. If groupNumber is omitted, the first group is used.
groupNumber
Placement: [2].
472
473
InputVariableLabel Method
Gets the label (not the name) of an observed variable.
Syntax
result = object.InputVariableLabel(variableNumber) result = object.InputVariableLabel(variableNumber, groupNumber) The InputVariableLabel method syntax has the following parts:
Part
result object variableNumber
Description
A variable label. An object of type AmosEngine. An integer specifying a variable in the data set for group number groupNumber. variableNumber is 1 for the first variable in the data set. Optional. An integer specifying a group. groupNumber is 1 for the first group. If groupNumber is omitted, the first group is used.
groupNumber
Placement: [2].
Remarks
Variable labels are only available for PASW Statistics data files. For other data formats, InputVariableLabel returns an empty string.
See Also
InputVariableName Method (on page 475)
474
475
InputVariableName Method
Gets the name of an observed variable.
Syntax
result = object.InputVariableName(variableNumber) result = object.InputVariableName(variableNumber, groupNumber) The InputVariableName method syntax has the following parts:
Part
result object variableNumber
Description
A variable name. An object of type AmosEngine. An integer specifying a variable in the data set for group number groupNumber. variableNumber is 1 for the first variable in the data set. Optional. An integer specifying a group. groupNumber is 1 for the first group. If groupNumber is omitted, the first group is used.
groupNumber
Placement: [2].
See Also
InputVariableLabel Method (on page 473)
476
477
Intercept Method
Specifies an intercept as a model parameter.
Syntax
object.Intercept (variableName) object.Intercept (variableName, parameterValue) object.Intercept (variableName, parameterName) The Intercept method syntax has the following parts:
Part
object variableName
Description
An object of type AmosEngine. The character string, variableName, is the name of an endogenous variable. The intercept in the regression equation for predicting variableName is a model parameter. (Optional) Parameter value. If parameterValue = 3, say, then the intercept is fixed at 3. (Optional) Parameter name. If parameterName = abc, say, then the intercept is named abc. It is constrained to be equal to any other parameters named abc. If parameterName = 3?, say then the intercept is given an initial value of 3, and is unconstrained. If parameterName = abc:3, say, then the intercept is named abc and is given an initial value of 3. It is constrained to be equal to any other parameters named abc. If parameterName is an empty string (""), the intercept is an unconstrained parameter.
parameterValue parameterName
478
Placement: [2].
Default
When the ModelMeansAndIntercepts (see "ModelMeansAndIntercepts Method" on page 498) method is not used, then all intercepts are unconstrained. However, they are not estimated. When the ModelMeansAndIntercepts (see "ModelMeansAndIntercepts Method" on page 498) method is used, the following default assumptions are made about intercepts that are not constrained or fixed at constant values by use of the AStructure (see "AStructure Method" on page 302) or Intercept (see "Intercept Method" on page 477) methods. Intercepts for the prediction of observed, endogenous variables are free parameters. Intercepts for the prediction of unobserved, endogenous variables are fixed at zero.
Remarks
If neither parameterValue nor parameterName is present, the intercept is an unconstrained parameter.
See Also
Mean Method (on page 486) ModelMeansAndIntercepts Method (on page 498)
479
480
Interrupt Method
Stops any ongoing calculations. Interrupt is equivalent to selecting Analyze Stop Calculating Estimates from the Amos Graphics menu.
Syntax
object.Interrupt () The Interrupt method syntax has the following parts:
Part
object
Description
An object of type AmosEngine.
Placement: [3].
481
IsModelingMeansAndIntercepts Method
True if means and intercepts are explicit model parameters.
Syntax
result = object.IsModelingMeansAndIntercepts () The IsModelingMeansAndIntercepts method syntax has the following parts:
Part
result object
Description
True if means and intercepts are explicit model parameters. An object of type AmosEngine.
Placement: [3].
See Also
Use the AmosEngine class to test for scale- and location-invariance (on page 753)
482
Iterations Method
Places a limit on the number of iterations Amos will perform. If this limit is reached, Amos will stop after reporting its current parameter estimates, even if the convergence criteria (see the Crit1 (see "Crit1 Method" on page 377) and Crit2 (see "Crit2 Method" on page 379) methods) have not been met.
Syntax
object.Iterations (nIterations) The Iterations method syntax has the following parts:
Part
object nIterations
Description
An object of type AmosEngine. Upper bound on the number of iterations.
Placement: [1].
Default
There is no limit on the number of iterations.
See Also
Crit1 Method (on page 377) Crit2 Method (on page 379) Fisher Method (on page 401) Technical Method (on page 625) Time Method (on page 631)
483
484
LineLength Method
The LineLength method has no effect. It is provided for compatibility with earlier versions of Amos.
Syntax
object.LineLength (nCharacters) The LineLength method syntax has the following parts:
Part
object nCharacters
Description
An object of type AmosEngine. Number of characters per line.
Placement: [1].
485
MaxDecimalPlaces Method
The MaxDecimalPlaces method has no effect. It is provided for compatibility with earlier versions of Amos.
Syntax
object.MaxDecimalPlaces (nDigits) The MaxDecimalPlaces method syntax has the following parts:
Part
object nDigits
Description
An object of type AmosEngine. Maximum number of decimal places.
Placement: [1].
486
Mean Method
Specifies a mean as a model parameter.
Syntax
object.Mean (variableName) object.Mean (variableName, parameterValue) object.Mean (variableName, parameterName) The Mean method syntax has the following parts:
Part
object variableName
Description
An object of type AmosEngine. The character string, variableName, is the name of an exogenous variable. The Mean method makes that variables mean a model parameter. (Optional) Parameter value. If parameterValue = 3, say, then the mean is fixed at 3. (Optional) Parameter name. If parameterName = abc, say, then the mean is named abc. It is constrained to be equal to any other parameters named abc. If parameterName = 3?, say then the mean is given an initial value of 3, and is unconstrained. If parameterName = abc:3, say, then the mean is named abc and is given an initial value of 3. It is constrained to be equal to any other parameters named abc. If parameterName is an empty string (""), the mean is an unconstrained parameter.
parameterValue parameterName
487
Placement: [2].
Default
When the ModelMeansAndIntercepts (see "ModelMeansAndIntercepts Method" on page 498) method is not used, then the means of all exogenous variables are unconstrained. However, the means are not estimated. When the ModelMeansAndIntercepts (see "ModelMeansAndIntercepts Method" on page 498) method is used, the following default assumptions are made about means that are not constrained or fixed at constant values by use of the MStructure (see "MStructure Method" on page 505) or Mean methods. The means of observed, exogenous variables are free parameters. The means of unobserved, exogenous variables are fixed at zero.
Remarks
If parameterValue and parameterName are omitted, the mean is an unconstrained parameter.
See Also
Intercept Method (on page 477) ModelMeansAndIntercepts Method (on page 498)
488
489
MinDecimalPlaces Method
The MinDecimalPlaces method has no effect. It is provided for compatibility with earlier versions of Amos.
Syntax
object.MinDecimalPlaces (nDigits) The MinDecimalPlaces method syntax has the following parts:
Part
object nDigits
Description
An object of type AmosEngine. Minimum number of decimal places.
Placement: [1].
490
Ml Method
Requests estimation by the method of maximum likelihood, minimizing (D1) together with (D2) in Appendix B.
Syntax
object.Ml () The Ml method syntax has the following parts:
Part
object
Description
An object of type AmosEngine.
Placement: [1].
Default
When you do not specify an estimation criterion, the maximum likelihood criterion (Ml (see "Ml Method" on page 490) method) is used.
See Also
Adf Method (on page 292) BootMl Method (on page 326) Gls Method (on page 457) Sls Method (on page 614) Uls Method (on page 637)
491
Ml Method Example
Module MainModule ' Ml Method Example Sub Main() Dim Sem As New AmosEngineLib.AmosEngine Sem.Ml() Sem.TextOutput() Sem.BeginGroup(Sem.AmosDir & "Examples\UserGuide.xls", "Grnt_fem") Sem.AStructure("visperc = (1) spatial + (1) err_v") Sem.AStructure("cubes = spatial + (1) err_c") Sem.AStructure("lozenges = spatial + (1) err_l") Sem.AStructure("paragraph = (1) verbal + (1) err_p") Sem.AStructure("sentence = verbal + (1) err_s") Sem.AStructure("wordmean = verbal + (1) err_w") Sem.Dispose() End Sub End Module
492
Model Method
Places equality constraints on model parameters.
Syntax
object.Model (modelName, constraint1) object.Model (modelName, constraint1, constraint2) object.Model (modelName, constraint1, constraint2, constraint3) ... The Model method syntax has the following parts:
Part
object modelName constraint1
Description
An object of type AmosEngine. A name for the complete set of constraints consisting of constraint1, constraint2, constraint3, etc. Either:
A string of the form p1=p2=p3=..., where each pi is either a parameter name or a number. At most one of the pi can be a number.
Or: The name of a model defined by another use of the Model method. constraint2 constraint3 ... Same as constraint1 Same as constraint1 ...
493
Placement: [2].
Default
No additional parameter constraints are imposed beyond those specified by the assignment of names and values to parameters by use of the Path (see "Path Method" on page 574), Cov (see "Cov Method" on page 370), Var (see "Var Method" on page 641), Mean (see "Mean Method" on page 486), Intercept (see "Intercept Method" on page 477), AStructure (see "AStructure Method" on page 302) and MStructure (see "MStructure Method" on page 505) methods.
Remarks
In order to use the Model method, you need to be able to refer to parameters by name. Parameters can be named by the Path (see "Path Method" on page 574), Cov (see "Cov Method" on page 370), Var (see "Var Method" on page 641), Mean (see "Mean Method" on page 486), Intercept (see "Intercept Method" on page 477), AStructure (see "AStructure Method" on page 302) and MStructure (see "MStructure Method" on page 505) methods. You can use the Model method as many times as you want.
494
495
Six parameters are named - cov1, cov2, var1, var2, var3, var4. However, since no two parameters share the same name, the presence of the names does not place any constraints on the parameters. The purpose of the names is to allow the Model method to place constraints on the named parameters.
496
Jreskog and Srbom proposed other models besides Model D. All but one of them can be obtained by constraining Model D. For instance, their Model C is just like Model D, but with the parameter named cov2 (the covariance between eps2 and eps4) fixed at zero. Their Model B goes even further. It assumes that two parameters (cov1 and cov2) are zero. Amos analyzes Models B and C along with Model D if you add the following lines to the program.
Sem.Model("B", "cov1 = cov2 = 0") Sem.Model("C", "cov2 = 0") Sem.Model("D")
The first two lines are self-explanatory - they name and describe Models B and C. You may be surprised that the third line is necessary. It declares that there is a model called Model D that employs no additional constraints beyond those specified by the Path (see "Path Method" on page 574), Var (see "Var Method" on page 641) and Cov (see "Cov Method" on page 370) methods. This line is necessary if you want to analyze Model D. The rule is that, if you use the Model method at all, Amos will only analyze models explicitly defined through use of the Model method. This convention allows you to specify an unidentified model, and then to supply enough constraints with each use of the Model method to identify the model. If you dont use the Model method at all, however, Amos will perform a single analysis of the model as specified by the Path (see "Path Method" on page 574), Cov (see "Cov Method" on page 370), Var (see "Var Method" on page 641), Mean (see "Mean Method" on page 486), Intercept (see "Intercept Method" on page 477), AStructure (see "AStructure Method" on page 302) and MStructure (see "MStructure Method" on page 505) methods. It may be possible to specify the same set of constraints in several equivalent ways. Model B, for instance, could have been specified in the following way.
Sem.Model("B", "cov1 = 0", "cov2 = 0")
There is a shorthand for indicating that one model incorporates all of the constraints of another model. In the present example, Model B includes all of the constraints of Model C, as well as one additional constraint, so Model B could be specified this way:
Sem.Model("B", "C", "cov1 = 0")
The example specified three more models for the Wheaton data. Notice that var1 and var3 are unique variances associated with anomia measurements made in 1967 and 1971. It is a plausible hypothesis that the unique variance of anomia was the same in both years. This hypothesis was incorporated into a new model by adding this line to the program.
Sem.Model("E", "var1 = var3")
Similarly, since var2 and var4 are unique variances associated with powerlessness measurements made in 1967 and 1971, it is plausible to set up a model in which those two variances are required to be equal:
Sem.Model("F", "var2 = var4")
497
Finally, both of the models just described could be right. In other words, all of the 1971 parameter values could be the same as the corresponding 1967 values. The following model specification imposes both sets of constraints.
Sem.Model("G", "E", "F")
498
ModelMeansAndIntercepts Method
Specifies that means (of exogenous variables) and intercepts (in the equations for predicting endogenous variables) are explicit model parameters. The ModelMeansAndIntercepts method must be used in order to allow the use of the Intercept (see "Intercept Method" on page 477), Mean (see "Mean Method" on page 486) or MStructure (see "MStructure Method" on page 505) methods or the specification of an intercept through use of the AStructure (see "AStructure Method" on page 302) method.
Syntax
object.ModelMeansAndIntercepts () The ModelMeansAndIntercepts method syntax has the following parts:
Part
object
Description
An object of type AmosEngine.
Placement: [1].
Default
When the ModelMeansAndIntercepts method is not used, means and intercepts are not constrained and not estimated.
Remarks
When the ModelMeansAndIntercepts method is used, means and intercepts are fixed at zero by default. Constraints on means can be changed with the Mean (see "Mean Method" on page 486) and MStructure (see "MStructure Method" on page 505) methods. Constraints on intercepts can be changed with the Intercept (see "Intercept Method" on page 477) and AStructure (see "AStructure Method" on page 302) methods.
See Also
Intercept Method (on page 477) Mean Method (on page 486) MStructure Method (on page 505)
499
500
Mods Method
Displays the modification indices described by Jreskog and Srbom (1984).
Syntax
object.Mods (threshold) The Mods method syntax has the following parts:
Part
object threshold
Description
An object of type AmosEngine. Optional. Only modification indices that exceed threshold are displayed. The default value for threshold is 4.
Placement: [1].
Default
Modification indices are not reported.
Remarks
Amos computes a modification index for each parameter that is fixed at a constant value and for each parameter that is required to equal some other parameter. The modification index for a parameter is an estimate of the amount by which the discrepancy function would decrease if the analysis were repeated with the constraints on that parameter removed. The actual decrease that would occur may be much greater. Amos computes modification indices not only for parameters that are explicitly constrained, but also for parameters that are implicitly assumed to be zero. For example, a modification index is computed for every covariance that is fixed at zero by default. Amos also computes modification indices for paths that do not appear in a model, giving the approximate amount by which the discrepancy function would decrease if such a path were introduced. There are, however, two types of nonexistent paths for which Amos does not compute a modification index. First, Amos does not compute a modification index for a nonexistent path which, if introduced, would convert an exogenous variable into an endogenous variable. Second, Amos does not compute a modification index for a nonexistent path that, if introduced, would create an indirect path from a variable to itself where none already exists. In particular, Amos does not compute a modification index for a nonexistent path that, if introduced, would convert a recursive model to a nonrecursive one. Each time Amos displays a modification index for a parameter, it also displays an estimate of the amount by which the parameter would change from its current, constrained value if the constraints on it were removed. Specifying a small value for threshold can result in the output of a large number of modification indices.
501
502
Discussion of Example
The example (which is the same as Model A in Example 6 of the Users Guide) yields the following modification indices. Covariances: (Group number 1 - Default model)
eps2 eps2 eps2 eps1 eps1 eps1 <--> <--> <--> <--> <--> <--> delta1 eps4 eps3 delta1 eps4 eps3 M.I. 5.905 26.545 32.071 4.609 35.367 40.911 Par Change -.424 .825 -.988 .421 -1.069 1.253
The largest modification index is 40.911, indicating that the chi-square statistic will drop by at least 40.911 if the covariance between eps1 and eps3 is allowed to depart from zero (the value at which it is fixed in Model A). The number 1.254 in the Par Change column indicates that the covariance will increase by about 1.254 if it is free to take on any value. Of course if the covariance (now zero) increases by 1.254 it will then be equal to 1.254. Actually, in Model B of Example 6, where the covariance between eps1 and eps3 is unconstrained, its estimate is 1.888. Kaplan (1989) and Saris, Satorra and Srbom (1987) discuss the use of estimated parameter changes in exploratory analyses.
503
MonteCarlo Method
Controls whether a parametric bootstrap or a nonparametric bootstrap (Efron & Tibshirani, 1993) is performed. When the MonteCarlo method is used, bootstrap samples are drawn from a multivariate normal population whose means, variances and covariances are the same as the sample means, variances and covariances.
Syntax
object.MonteCarlo () object.MonteCarlo (tf) The MonteCarlo method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine. True (default) specifies a parametric bootstrap. False specifies a nonparametric bootstrap.
Placement: [1].
Default
A nonparametric bootstrap is performed. (Bootstrap samples are drawn with replacement from the original sample. Raw data input is required.)
Remarks
MonteCarlo allows bootstrapping to be carried out (with the assumption of normality) when raw data are not available. If you do not use the Bootstrap (see "Bootstrap Method" on page 332) method, the MonteCarlo method has no effect.
See Also
Bootstrap Method (on page 332) Seed Method (on page 610)
504
505
MStructure Method
Frees or constrains the mean of an exogenous variable. The Mean method accomplishes the same thing, and is recommended for new Amos programs. The syntax of the MStructure (see "MStructure Method" on page 505) method resembles the syntax of the $MStructure command in previous versions of Amos, and is provided to assist in the translation of old Amos input files.
Syntax
object.MStructure (s) The MStructure method syntax has the following parts:
Part
object s
Description
An object of type AmosEngine. A character string in one of the following forms
1. variablename 2. variablename (number) 3. variablename (parametername) 4. variablename (number ?) 5. variablename (parametername : number)
In the first form, the mean of the variable named variablename is a free parameter. In the second form, the mean of the variable named variablename is fixed at number. In the third form, the mean of the variable named variablename is given the name parametername. In the fourth form, the mean of the variable named variablename is a free parameter, and is given an initial value of number. In the fifth form, the mean of the variable named variablename is given the name parametername and an initial value of number.
506
Placement: [2].
Default
When the ModelMeansAndIntercepts (see "ModelMeansAndIntercepts Method" on page 498) method is not used, then all means and intercepts are unconstrained. However, no means or intercepts are estimated. When the ModelMeansAndIntercepts (see "ModelMeansAndIntercepts Method" on page 498) method is used, the following default assumptions are made about exogenous variables that are not constrained or fixed at constant values by use of the MStructure or Mean (see "Mean Method" on page 486) methods. The means of observed, exogenous variables are free parameters. The means of unobserved, exogenous variables are fixed at zero.
Remarks
The ModelMeansAndIntercepts (see "ModelMeansAndIntercepts Method" on page 498) method must be used before using the MStructure method. It is possible to name an endogenous variable as an argument to the MStructure method. Doing so has the effect of freeing or constraining the intercept in the regression equation for predicting that variable. However, the following methods for specifying constraints on intercepts are recommended. Include the intercept in a linear equation through use of the AStructure (see "AStructure Method" on page 302) method. Use the Intercept (see "Intercept Method" on page 477) method.
See Also
Intercept Method (on page 477) Mean Method (on page 486) ModelMeansAndIntercepts Method (on page 498) AStructure Method (on page 302)
507
508
Syntax
object.Ncp () object.NcpLo () object.NcpHi () The Ncp, NcpLo and NcpHi method syntaxes have the following parts:
Part
object
Description
An object of type AmosEngine.
Placement: [3].
Remarks
If you have used the Model (see "Model Method" on page 492) method to define more than one model, the Ncp, NcpLo and NcpHi methods return estimates for the most recently fitted model. The second example shows how to obtain estimates for multiple models.
509
510
511
ObservedInfo Method
Controls whether the covariance matrix of estimates is estimated by inverting the expected second derivatives or the exact second derivatives.
Syntax
object.ObservedInfo () object.ObservedInfo (tf) The ObservedInfo method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine. Optional. If tf is True (the default), the covariance matrix of estimates is estimated by inverting the matrix of exact second derivatives. If tf is False, the matrix of expected second derivatives is used.
Placement: [1].
Default
The matrix of expected second derivatives is used.
Remarks
See Efron and Hinkley (1978) for a discussion of exact versus expected second derivatives in the estimation of the covariance matrix of estimates.
512
513
Syntax
object.NeedBCLowerBounds (matrixID) object.NeedBCUpperBounds (matrixID) The NeedBCLowerBounds and NeedBCLowerBounds method syntaxes have the following parts:
Part
object matrixID
Description
An object of type AmosEngine. An integer that specifies a matrix of estimates, as described in Settings.
Placement: [1].
Settings
The settings for matrixID are:
Constant
SampleCovariances SampleCorrelations SampleMeans ImpliedCovariances ImpliedCorrelations ImpliedMeans AllImpliedCovariances
Value Description
13 14 15 10 11 12 7 Sample covariances. Sample correlations. Sample means. The implied covariances among the observed variables in the model. The implied correlations among the observed variables in the model. The implied means of the observed variables in the model. The implied covariances among all variables in the model, with the exception of residual variables. The implied correlations among all variables in the model, with the exception of residual variables. The implied means of all variables in the model, with the exception of residual variables. Direct effects. Indirect effects. Total effects. Standardized direct effects. Standardized indirect effects.
AllImpliedCorrelations
AllImpliedMeans
19 20 5 22 23
514
Constant
StandardizedTotalEffects FactorScoreWeights
Value Description
21 6 Standardized total effects. Factor score weights.
Remarks
In order to use GetBCLowerBounds (see "GetBCLowerBounds, GetBCUpperBounds Methods" on page 414) (matrixID), you must first use NeedBCLowerBounds (matrixID). For example, you have to use
object.NeedBCLowerBounds (FactorScoreWeights)
before using
object.GetBCLowerBounds (see "GetBCLowerBounds, GetBCUpperBounds Methods" on page 414) (FactorScoreWeights, )
Similarly, in order to use GetBCUpperBounds (see "GetBCLowerBounds, GetBCUpperBounds Methods" on page 414) (matrixID), you must first use NeedBCUpperBounds (matrixID). For example, you have to use
object.NeedBCUpperBounds (FactorScoreWeights)
before using
object.GetBCUpperBounds (see "GetBCLowerBounds, GetBCUpperBounds Methods" on page 414) (FactorScoreWeights, )
515
Sem.NeedBCLowerBounds(FactorScoreWeights) Sem.NeedBCUpperBounds(FactorScoreWeights) Sem.Standardized() Sem.BeginGroup(Sem.AmosDir & "Examples\UserGuide.xls", "Grnt_fem") Sem.AStructure("visperc = (1) spatial + (1) err_v") Sem.AStructure("cubes = spatial + (1) err_c") Sem.AStructure("lozenges = spatial + (1) err_l") Sem.AStructure("paragraph = (1) verbal + (1) err_p") Sem.AStructure("sentence = verbal + (1) err_s") Sem.AStructure("wordmean = verbal + (1) err_w") Dim X(,) As Double Dim RNames() As String Dim CNames() As String 'Get the row and column variable names Sem.RowNames(FactorScoreWeights, RNames) Sem.ColumnNames(FactorScoreWeights, CNames) 'Print the lower bounds Sem.GetBCLowerBounds(FactorScoreWeights, X) Debug.WriteLine(vbCrLf & "Confidence intervals on factor score weights -- lower bound") PrintMatrix(X, CNames, RNames) 'Print the upper bounds Sem.GetBCUpperBounds(FactorScoreWeights, X) Debug.WriteLine(vbCrLf & "Confidence intervals on factor score weights -- upper bound") PrintMatrix(X, CNames, RNames) Sem.Dispose() End Sub 'Print a matrix in the debug window Sub PrintMatrix(ByVal TheMatrix(,) As Double, ByVal CNames$(), ByVal RNames$()) Dim NRows1 As Integer, NColumns1 As Integer Dim i As Integer, j As Integer NRows1 = UBound(RNames) NColumns1 = UBound(CNames)
516
Debug.Write(" ") For j = 0 To NColumns1 Debug.Write(CNames(j).PadLeft(10)) Next Debug.WriteLine("") For i = 0 To NRows1 Debug.Write(RNames(i).PadRight(8)) For j = 0 To NColumns1 Debug.Write(TheMatrix(i, j).ToString(".00000").PadLeft(10)) Next Debug.WriteLine("") Next End Sub End Module
517
NeedBootSampleEstimates Method
Declares that GetBootSampleEstimates (see "GetBootSampleEstimates Method" on page 423) will be used to get a matrix of estimates from an individual bootstrap sample.
Syntax
object.NeedBootSampleEstimates (matrixID) The NeedBootSampleEstimates method syntax has the following parts:
Part
object matrixID
Description
An object of type AmosEngine. An integer that specifies a matrix of estimates, as described in Settings.
Placement: [1].
Settings
The settings for matrixID are:
Constant
SampleCovariances SampleCorrelations SampleMeans ImpliedCovariances ImpliedCorrelations ImpliedMeans AllImpliedCovariances
Value Description
13 14 15 10 11 12 7 Sample covariances. Sample correlations. Sample means. The implied covariances among the observed variables in the model. The implied correlations among the observed variables in the model. The implied means of the observed variables in the model. The implied covariances among all variables in the model, with the exception of residual variables. The implied correlations among all variables in the model, with the exception of residual variables. The implied means of all variables in the model, with the exception of residual variables. Direct effects. Indirect effects. Total effects. Standardized direct effects. Standardized indirect effects. Standardized total effects. Factor score weights.
AllImpliedCorrelations
AllImpliedMeans
19 20 5 22 23 21 6
518
Remarks
You have to use NeedBootSampleEstimates to declare that estimates of a matrix will be needed before you can use GetBootSampleEstimates (see "GetBootSampleEstimates Method" on page 423) to obtain the estimates from a bootstrap sample. For example, you have to use
object.NeedBootSampleEstimates (StandardizedTotalEffects)
before using
object.GetBootSampleEstimates (see "GetBootSampleEstimates Method" on page 423) (StandardizedTotalEffects, )
519
520
Debug.WriteLine("") For i = 0 To NRows1 Debug.Write(RNames(i).PadRight(8)) For j = 0 To NColumns1 Debug.Write(TheMatrix(i, j).ToString(".00000").PadLeft(10)) Next Debug.WriteLine("") Next End Sub End Module
521
NeedEstimates Method
Declares that GetEstimates (see "GetEstimates Method" on page 432) will be used to get a matrix of estimates.
Syntax
object.NeedEstimates (matrixID) The NeedEstimates method syntax has the following parts:
Part
object matrixID
Description
An object of type AmosEngine. An integer that specifies a matrix of estimates, as described in Settings.
Placement: [1].
Settings
The settings for matrixID are:
Constant
SampleCovariances SampleCorrelations SampleMeans ImpliedCovariances ImpliedCorrelations ImpliedMeans AllImpliedCovariances
Value Description
13 14 15 10 11 12 7 Sample covariances. Sample correlations. Sample means. The implied covariances among the observed variables in the model. The implied correlations among the observed variables in the model. The implied means of the observed variables in the model. The implied covariances among all variables in the model, with the exception of residual variables. The implied correlations among all variables in the model, with the exception of residual variables. The implied means of all variables in the model, with the exception of residual variables. Direct effects. Indirect effects. Total effects. Standardized direct effects. Standardized indirect effects. Standardized total effects. Factor score weights.
AllImpliedCorrelations
AllImpliedMeans
19 20 5 22 23 21 6
522
Remarks
You have to use NeedEstimates to declare that estimates of a matrix will be needed before you can use GetEstimates (see "GetEstimates Method" on page 432) to obtain the estimates. For example, you have to use
object.NeedEstimates (StandardizedTotalEffects)
before using
object.GetEstimates (see "GetEstimates Method" on page 432) (StandardizedTotalEffects, )
523
524
Debug.Write(" ") For j = 0 To NColumns1 Debug.Write(CNames(j).PadLeft(10)) Next Debug.WriteLine("") For i = 0 To NRows1 Debug.Write(RNames(i).PadRight(8)) For j = 0 To NColumns1 Debug.Write(TheMatrix(i, j).ToString(".00000").PadLeft(10)) Next Debug.WriteLine("") Next End Sub End Module
525
Syntax
object.NeedPCLowerBounds (matrixID) object.NeedPCUpperBounds (matrixID) The NeedPCLowerBounds and NeedPCLowerBounds method syntaxes have the following parts:
Part
object matrixID
Description
An object of type AmosEngine. An integer that specifies a matrix of estimates, as described in Settings.
Placement: [1].
Settings
The settings for matrixID are:
Constant
SampleCovariances SampleCorrelations SampleMeans ImpliedCovariances ImpliedCorrelations ImpliedMeans AllImpliedCovariances
Value Description
13 14 15 10 11 12 7 Sample covariances. Sample correlations. Sample means. The implied covariances among the observed variables in the model. The implied correlations among the observed variables in the model. The implied means of the observed variables in the model. The implied covariances among all variables in the model, with the exception of residual variables. The implied correlations among all variables in the model, with the exception of residual variables. The implied means of all variables in the model, with the exception of residual variables. Direct effects. Indirect effects. Total effects. Standardized direct effects. Standardized indirect effects.
AllImpliedCorrelations
AllImpliedMeans
19 20 5 22 23
526
Constant
StandardizedTotalEffects FactorScoreWeights
Value Description
21 6 Standardized total effects. Factor score weights.
Remarks
In order to use GetPCLowerBounds (see "GetPCLowerBounds, GetPCUpperBounds Methods" on page 441) (matrixID), you must first use NeedPCLowerBounds (matrixID). For example, you have to use
object.NeedPCLowerBounds (FactorScoreWeights)
before using
object.GetPCLowerBounds (see "GetPCLowerBounds, GetPCUpperBounds Methods" on page 441) (FactorScoreWeights, )
Similarly, in order to use GetPCUpperBounds (see "GetPCLowerBounds, GetPCUpperBounds Methods" on page 441) (matrixID), you must first use NeedPCUpperBounds (matrixID). For example, you have to use
object.NeedPCUpperBounds (FactorScoreWeights)
before using
object.GetPCUpperBounds (see "GetPCLowerBounds, GetPCUpperBounds Methods" on page 441) (FactorScoreWeights, )
527
Sem.NeedPCLowerBounds(FactorScoreWeights) Sem.NeedPCUpperBounds(FactorScoreWeights) Sem.BeginGroup(Sem.AmosDir & "Examples\UserGuide.xls", "Grnt_fem") Sem.AStructure("visperc = (1) spatial + (1) err_v") Sem.AStructure("cubes = spatial + (1) err_c") Sem.AStructure("lozenges = spatial + (1) err_l") Sem.AStructure("paragraph = (1) verbal + (1) err_p") Sem.AStructure("sentence = verbal + (1) err_s") Sem.AStructure("wordmean = verbal + (1) err_w") Dim X(,) As Double Dim RNames() As String Dim CNames() As String 'Get the row and column variable names Sem.RowNames(FactorScoreWeights, RNames) Sem.ColumnNames(FactorScoreWeights, CNames) 'Print the lower bounds Sem.GetPCLowerBounds(FactorScoreWeights, X) Debug.WriteLine(vbCrLf & "Confidence intervals on factor score weights -- lower bound") PrintMatrix(X, CNames, RNames) 'Print the upper bounds Sem.GetPCUpperBounds(FactorScoreWeights, X) Debug.WriteLine(vbCrLf & "Confidence intervals on factor score weights -- upper bound") PrintMatrix(X, CNames, RNames) Sem.Dispose() End Sub 'Print a matrix in the debug window Sub PrintMatrix(ByVal TheMatrix(,) As Double, ByVal CNames$(), ByVal RNames$()) Dim NRows1 As Integer, NColumns1 As Integer Dim i As Integer, j As Integer NRows1 = UBound(RNames) NColumns1 = UBound(CNames)
528
Debug.Write(" ") For j = 0 To NColumns1 Debug.Write(CNames(j).PadLeft(10)) Next Debug.WriteLine("") For i = 0 To NRows1 Debug.Write(RNames(i).PadRight(8)) For j = 0 To NColumns1 Debug.Write(TheMatrix(i, j).ToString(".00000").PadLeft(10)) Next Debug.WriteLine("") Next End Sub End Module
529
NeedStandardErrors Method
Declares that the GetStandardErrors (see "GetStandardErrors Method" on page 450) method will be used to obtain bootstrap standard errors for the elements of a matrix of estimates.
Syntax
object.NeedStandardErrors (matrixID) The NeedStandardErrors method syntax has the following parts:
Part
object matrixID
Description
An object of type AmosEngine. An integer that specifies a matrix of estimates, as described in Settings.
Placement: [1].
Settings
The settings for matrixID are:
Constant
SampleCovariances SampleCorrelations SampleMeans ImpliedCovariances ImpliedCorrelations ImpliedMeans AllImpliedCovariances
Value Description
13 14 15 10 11 12 7 Sample covariances. Sample correlations. Sample means. The implied covariances among the observed variables in the model. The implied correlations among the observed variables in the model. The implied means of the observed variables in the model. The implied covariances among all variables in the model, with the exception of residual variables. The implied correlations among all variables in the model, with the exception of residual variables. The implied means of all variables in the model, with the exception of residual variables. Direct effects. Indirect effects. Total effects. Standardized direct effects. Standardized indirect effects. Standardized total effects. Factor score weights.
AllImpliedCorrelations
AllImpliedMeans
19 20 5 22 23 21 6
530
Remarks
You have to use NeedStandardErrors to declare that standard errors for a matrix will be needed before you can use GetStandardErrors (see "GetStandardErrors Method" on page 450) to obtain the standard errors. For example, you have to use
object.NeedStandardErrors (StandardizedTotalEffects)
before using
object.GetStandardErrors (see "GetStandardErrors Method" on page 450) (StandardizedTotalEffects, )
531
532
533
NonPositive Method
Controls whether Amos attempts to obtain maximum likelihood estimates when a sample covariance matrix is not positive definite.
Syntax
object.NonPositive () object.NonPositive (tf) The NonPositive method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine. Optional. If tf is True (default), Amos attempts to obtain maximum likelihood estimates even when a sample covariance matrix is not positive definite.
Placement: [1].
Default
Amos reports an error if you attempt a maximum likelihood analysis when a sample covariance matrix fails to be positive definite.
Remarks
When you use the NonPositive method, Amos does not try to test the hypothesis that your model is correct against the usual alternative that the population moments are unconstrained. Wothke (1993) discusses the problem of covariance matrices that are not positive definite.
See Also
AllowUnidentified Method (on page 298)
534
535
NormalityCheck Method
Controls the reporting of statistics for assessing multivariate normality of the observed variables.
Syntax
object.NormalityCheck () object.NormalityCheck (tf) The NormalityCheck method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine. Optional. If tf is True (the default), statistics for assessing normality are reported.
Placement: [1].
Default
Statistics for assessing normality are not reported.
536
537
Discussion of Example
In the example (see "NormalityCheck Method Example" on page 536), NormalityCheck produces the following output. Assessment of normality (Group number 1)
Variable wordmean sentence paragraph lozenges cubes visperc Multivariate min 2.000 4.000 2.000 3.000 9.000 11.000 max 41.000 28.000 19.000 36.000 37.000 45.000 skew .575 -.836 .374 .833 -.131 -.406 c.r. 2.004 -2.915 1.305 2.906 -.457 -1.418 kurtosis -.212 .537 -.239 .127 1.439 -.281 3.102 c.r. -.370 .936 -.416 .221 2.510 -.490 1.353
538
The first row of the table shows that the lowest wordmean score was 2 and the highest was 41. wordmean had a sample skewness of
i=1 ( xi x )
N
$ N s3
= .575
,
2
has a mean of zero and a standard error of sample skewness divided by its standard error. wordmean has a sample kurtosis of
$ s 2 = ( xi x ) ( N 1) $2 where s is the unbiased variance estimate . Assuming normality, skewness 6 N = .287 . The critical ratio 2.004 in the c.r. column is the
i=1 ( xi x )
N
$ N s4
3 = .212
.
Assuming normality, kurtosis has a mean of zero and a standard error of .370, is the sample kurtosis divided by its standard error.
The table has a separate row for each observed variable. A final row, labeled multivariate, contains Mardias (Mardia, 1970; Mardia, 1974) coefficient of multivariate kurtosis
p ( p + 2) ( N 1) 1 N $ = 3102 . ( x i x ) S1 ( x i x) N i =1 N +1 ,
2
where i is the i-th observation on the p observed variables, x is the vector of their means and S is the unbiased estimate of their population covariance matrix. Assuming normality, this coefficient has a mean of zero and a standard error of . The critical ratio obtained by dividing the sample coefficient by its standard error is 1.353, as shown in the c.r. column. Assuming normality in very large samples, each of the critical values shown in the table above is an observation on a standard normally distributed random variable. Even with a very large sample, however, the table is of limited use. All it does is to quantify the departure from normality in the sample and provide a rough test of whether the departure is statistically significant. Unfortunately, this is not enough. In order to make use of this information you also need to know how robust your chosen estimation method is against the departure from normality that you have discovered. A departure from normality that is big enough to be significant could still be small enough to be harmless. The following table, also produced by NormalityCheck from the Grnt_fem data, provides additional evidence on the question of normality. Observations farthest from the centroid (Mahalanobis distance) (Group number 1)
$ 1
8 p ( p + 2 ) N = 2.294
539
Only the first five rows of the table are shown here. Specifically, the table focuses on the occurrence of outliers, individual observations that differ markedly from the general run of observations. The table lists the observations that are furthest from the centroid of all observations, using as the distance measure for the i-th observation the squared Mahalanobis distance, multivariate kurtosis can be written
di4
N p ( p + 2 ) ( N 1) ( N + 1)
2 d42
d i2 = (x i x ) S 1 (x i x ) . Mardias coefficient of
. The first row of the table
di2 )
column shows, still assuming normality, that the probability is .268 that the largest i would exceed 18.747. The second row of the table shows that: Observation number 20 is the second furthest observation
2 d20 = 17.201 . The probability of any arbitrary di2 exceeding 17.201 is .009. The d2 probability of the second largest i exceeding 17.201 is .130. Small numbers in the p1 column are to be
d2
expected. Small numbers in the p2 column, on the other hand, indicate observations that are improbably far from the centroid under the hypothesis of normality. For the Grnt_fem data, none of the probabilities in the p2 column is very small, so there is no evidence that any of the five most unusual observations should be treated as outliers under the assumption of normality. See Bollen (1987) for a discussion of the importance of checking for outliers.
540
Npar Method
Gets the number of model parameters.
Syntax
object.Npar () The Npar method syntax has the following parts:
Part
object
Description
An object of type AmosEngine.
Placement: [3].
Remarks
If you have used the Model (see "Model Method" on page 492) method to define more than one model, the Npar method returns the number of parameters for the most recently fitted model. The second example shows how to obtain the number of parameters for multiple models.
See Also
Df Method (on page 385)
541
542
543
NumberOfColumns Method
Gets the number of columns in a matrix of estimates.
Syntax
object.NumberOfColumns (matrixID) object.NumberOfColumns (matrixID, groupNumber) The NumberOfColumns method syntax has the following parts:
Part
object matrixID groupNumber
Description
An object of type AmosEngine. An integer that specifies a matrix of estimates, as described in Settings. Optional. A group number. The first group is group number 1. If groupNumber is omitted, the first group is used.
Placement: [3].
Settings
The settings for matrixID are:
Constant
SampleCovariances SampleCorrelations SampleMeans ImpliedCovariances ImpliedCorrelations ImpliedMeans AllImpliedCovariances
Value Description
13 14 15 10 11 12 7 Sample covariances. Sample correlations. Sample means. The implied covariances among the observed variables in the model. The implied correlations among the observed variables in the model. The implied means of the observed variables in the model. The implied covariances among all variables in the model, with the exception of residual variables. The implied correlations among all variables in the model, with the exception of residual variables. The implied means of all variables in the model, with the exception of residual variables. Direct effects. Indirect effects. Total effects. Standardized direct effects. Standardized indirect effects.
AllImpliedCorrelations
AllImpliedMeans
19 20 5 22 23
544
Constant
StandardizedTotalEffects FactorScoreWeights
Value Description
21 6 Standardized total effects. Factor score weights.
Remarks
In order to use NumberOfColumns (matrixID), you must first use NeedEstimates (see "NeedEstimates Method" on page 521) (matrixID). For example, you have to use
object.NeedEstimates (see "NeedEstimates Method" on page 521) (FactorScoreWeights)
before using
object.NumberOfColumns (FactorScoreWeights, )
545
NumberOfGroups Method
Gets the number of groups.
Syntax
object.NumberOfGroups () The NumberOfGroups method syntax has the following parts:
Part
object
Description
An object of type AmosEngine.
Placement: [3].
546
547
NumberOfParameters Method
Gets the number of model parameters, not taking into account any parameter constraints specified with the Model (see "Model Method" on page 492) method.
Syntax
object.NumberOfParameters () The NumberOfVariables method syntax has the following parts:
Part
object
Description
An object of type AmosEngine.
Placement: [3].
548
549
NumberOfRows Method
Gets the number of rows in a matrix of estimates.
Syntax
object.NumberOfRows (matrixID) object.NumberOfRows (matrixID, groupNumber) The NumberOfRows method syntax has the following parts:
Part
object matrixID groupNumber
Description
An object of type AmosEngine. An integer that specifies a matrix of estimates, as described in Settings. Optional. A group number. The first group is group number 1. If groupNumber is omitted, the first group is used.
Placement: [3].
Settings
The settings for matrixID are:
Constant
SampleCovariances SampleCorrelations SampleMeans ImpliedCovariances ImpliedCorrelations ImpliedMeans AllImpliedCovariances
Value Description
13 14 15 10 11 12 7 Sample covariances. Sample correlations. Sample means. The implied covariances among the observed variables in the model. The implied correlations among the observed variables in the model. The implied means of the observed variables in the model. The implied covariances among all variables in the model, with the exception of residual variables. The implied correlations among all variables in the model, with the exception of residual variables. The implied means of all variables in the model, with the exception of residual variables. Direct effects. Indirect effects. Total effects. Standardized direct effects. Standardized indirect effects.
AllImpliedCorrelations
AllImpliedMeans
19 20 5 22 23
550
Constant
StandardizedTotalEffects FactorScoreWeights
Value Description
21 6 Standardized total effects. Factor score weights.
Remarks
In order to use NumberOfRows (matrixID), you must first use NeedEstimates (see "NeedEstimates Method" on page 521) (matrixID). For example, you have to use
object.NeedEstimates (see "NeedEstimates Method" on page 521) (FactorScoreWeights)
before using
object.NumberOfRows (FactorScoreWeights, )
551
NumberOfVariables Method
Gets the number of variables in the model for one group.
Syntax
object.NumberOfVariables () object.NumberOfVariables (groupNumber) The NumberOfVariables method syntax has the following parts:
Part
object groupNumber
Description
An object of type AmosEngine. Optional group number. The first group is group number 1. If groupNumber is omitted, the first group is used.
Placement: [3].
552
553
OVariableCount Method
Specifies the number of observed variables in the model.
Syntax
object.OVariableCount (nVariables) The OVariableCount method syntax has the following parts:
Part
object nVariables
Description
An object of type AmosEngine. The number of observed variables in the model.
Placement: [2].
Default
When the OVariableCount method is not used, no error checking is done based on the number of observed variables.
Remarks
Amos checks nVariables for consistency with the model and the data file. If a discrepancy is found, Amos reports the discrepancy and quits. Spelling or typing errors are frequently detected by this check, since two variant spellings of a variable name will be treated as references to two distinct variables. In a multiple-group analysis, the OvariableCount method can be used once per group.
See Also
UVariableCount Method (on page 639) VariableCount Method (on page 643)
554
555
P Method
Gets the p value for testing the null hypothesis that the specified model is correct.
Syntax
object.P () The P method syntax has the following parts:
Part
object
Description
An object of type AmosEngine.
Placement: [3].
Remarks
If you have used the Model (see "Model Method" on page 492) method to define more than one model, the P method gets the p value for the most recently fitted model. The second example shows how to obtain the p value for multiple models.
556
P Method Example 1
The following program shows how to obtain various fit measures when only one model is defined (i.e., when the Model (see "Model Method" on page 492) method has been used only once or not at all).
Imports System.Diagnostics Module MainModule ' P Method Example 1 Sub Main() Dim Sem As New AmosEngineLib.AmosEngine Sem.BeginGroup(Sem.AmosDir & "Examples\UserGuide.xls", "Grnt_fem") Sem.AStructure("visperc = (1) spatial + (1) err_v") Sem.AStructure("cubes = spatial + (1) err_c") Sem.AStructure("lozenges = spatial + (1) err_l") Sem.AStructure("paragraph = (1) verbal + (1) err_p") Sem.AStructure("sentence = verbal + (1) err_s") Sem.AStructure("wordmean = verbal + (1) err_w") Debug.WriteLine("Chi Square = " & Sem.Cmin) Debug.WriteLine("Degrees of Freedom = " & Sem.df) Debug.WriteLine("p = " & Sem.p) Debug.WriteLine("Number of parameters = " & Sem.npar) Debug.WriteLine("Noncentrality parameter = " & Sem.Ncp & " (" & _ Sem.NcpLo & ", " & Sem.NcpHi & ")") Debug.WriteLine("Rmsea = " & Sem.Rmsea & " (" & Sem.RmseaLo & ", " & Sem.RmseaHi & ")") Debug.WriteLine("Test of close fit, p = " & Sem.Pclose) Sem.Dispose() End Sub End Module
557
P Method Example 2
The following program shows how to obtain various fit measures for multiple models (i.e., when the Model (see "Model Method" on page 492) method has been used more than once).
Imports System.Diagnostics Module MainModule ' P Method Example 2 Sub Main() Dim Sem As New AmosEngineLib.AmosEngine Dim i As Integer Sem.BeginGroup(Sem.AmosDir & "Examples\UserGuide.xls", "Grnt_fem") Sem.AStructure("visperc = (a) spatial + (1) err_v") Sem.AStructure("cubes = (b) spatial + (1) err_c") Sem.AStructure("lozenges = (c) spatial + (1) err_l") Sem.AStructure("paragraph = (d) verbal + (1) err_p") Sem.AStructure("sentence = (e) verbal + (1) err_s") Sem.AStructure("wordmean = (f) verbal + (1) err_w") Sem.Var("spatial", 1) Sem.Var("verbal", 1) Sem.Model("Congeneric") Sem.Model("tau-equivalent", "a = b = c", "d = e = f") For i = 1 To 2 Debug.WriteLine("") Debug.WriteLine("Model number " & i) Sem.FitModel(i) Debug.WriteLine("Chi Square = " & Sem.Cmin) Debug.WriteLine("Degrees of Freedom = " & Sem.df) Debug.WriteLine("p = " & Sem.p) Debug.WriteLine("Number of parameters = " & Sem.npar) Debug.WriteLine("Noncentrality parameter = " & Sem.Ncp & " (" & _ Sem.NcpLo & ", " & Sem.NcpHi & ")") Debug.WriteLine("Rmsea = " & Sem.Rmsea & " (" & Sem.RmseaLo & ", " & Sem.RmseaHi & ")") Debug.WriteLine("Test of close fit, p = " & Sem.Pclose) Next Sem.Dispose() End Sub End Module
558
PackSymmetricEstimates Method
Controls whether the GetEstimates (see "GetEstimates Method" on page 432) returns symmetric matrices as square two-dimensional arrays or as one-dimensional arrays that contain only the lower triangle.
Syntax
object.PackSymmetricEstimates (tf) The PackSymmetricEstimates method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine. If tf is False, symmetric matrices are returned as square two-dimensional arrays. If tf is True, symmetric matrices are returned as one-dimensional arrays, with the elements in the lower triangle stored in the order x(0,0), x(1,0), x(1,1),....
Placement: [1].
Default
If the PackSymmetricEstimates method is not used, symmetric matrices are returned as square two-dimensional arrays.
Remarks
PackSymmetricEstimates does not affect GetEstimatesEx (see "GetEstimatesEx Method" on page 436).
559
PageLength Method
The PageLength method has no effect. It is provided for compatibility with earlier versions of Amos.
Syntax
object.PageLength (nLines) The PageLength method syntax has the following parts:
Part
object nLines
Description
An object of type AmosEngine. The number of lines per page.
Placement: [1].
560
Paginate Method
The Paginate method has no effect. It is provided for compatibility with earlier versions of Amos.
Syntax
object.Paginate (tf) The Paginate method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine. If tf is True (default), the text output file is paginated. Otherwise, not.
Placement: [1].
561
ParameterCovariance Method
Gets the covariance between two parameter estimates.
Syntax 1
result = object.ParameterCovariance (parameterIndex) result = object.ParameterCovariance (parameterIndex1, parameterIndex2) result = object.ParameterCovariance (parameterName) result = object.ParameterCovariance (parameterName1, parameterName2) The ParameterCovariance method syntax 1 has the following parts:
Part
result object parameterIndex parameterIndex1 parameterIndex2 parameterName parameterName1 parameterName2
Description
The covariance between two parameters or the variance of a single parameter. An object of type AmosEngine. Parameter indices. Parameters are numbered starting with 1.
Parameter names.
Placement: [3].
See Also
ParameterName Method (on page 567) ParameterNumber Method (on page 569) ParameterValue Method (on page 571)
562
563
Debug.WriteLine(Math.Sqrt(Sem.ParameterCovariance("verr_w"))) Debug.WriteLine("") Debug.Write("The correlation between ""verr_v"" and ""verr_c"" is ") Dim Numerator As Double, Denominator As Double Numerator = sem.ParameterCovariance("verr_v", "verr_c") Denominator = Math.Sqrt(Sem.ParameterCovariance("verr_v") * _ Sem.ParameterCovariance("verr_c")) Debug.WriteLine(Numerator / Denominator) Sem.Dispose() End Sub End Module
564
ParameterInfo Method
Get information about the parameter that is specified by an index number, based on an arbitrary ordering of model parameters. The first parameter is parameter number 1.
Syntax
object.ParameterInfo (parameterNumber, groupNumber, parameterType, leftVariable, rightVariable) The ParameterInfo method syntax has the following parts:
Part
object parameterNumber groupNumber
Description
An object of type AmosEngine. Input: A whole number between 1 and n, where n is the number of parameters. Output: When the parameter specified by parameterNumber is associated with one group only, then groupNumber is that groups number. The first group is group number 1. Output: An integer that tells what kind of parameter is specified by parameterNumber. The possible values are 1 (regression weight), 2 (mean), 3 (intercept), 4 (covariance) and 5 (variance). Integers that specify two variables. (Use the VariableName (see "VariableName Method" on page 645) method to get their names.) If the parameter specified by parameterNumber is a regression weight, leftVariable refers to the dependent variable, rightVariable to the independent variable. If the parameter specified by parameterNumber is a covariance, it is the covariance between leftVariable and rightVariable. If the parameter specified by parameterNumber is a variance, it is the variance of leftVariable. (rightVariable is the same as leftVariable.) If the parameter specified by parameterNumber is a mean, it is the mean of leftVariable. (The value returned for rightVariable is undefined.)
parameterType
leftVariable, rightVariable
Placement: [3].
See Also
ParameterName Method (on page 567) ParameterNumber Method (on page 569) ParameterValue Method (on page 571)
565
566
567
ParameterName Method
Gets the name of a parameter, given its parameter number.
Syntax
object.ParameterName (parameterNumber) The ParameterName method syntax has the following parts:
Part
object parameterNumber
Description
An object of type AmosEngine. A parameter number.
Placement: [3].
See Also
ParameterNumber Method (on page 569)
568
569
ParameterNumber Method
Gets a parameter number, given its name. A parameter number is a parameters position on Amoss internal parameter list. The first parameter on the list is parameter number 1. Some methods refer to model parameters by number (i.e., by list position).
Syntax
object.ParameterNumber (ParameterName) The ParameterNumber method syntax has the following parts:
Part
object ParameterName
Description
An object of type AmosEngine. A parameter name.
Placement: [3].
570
571
ParameterValue Method
Gets a parameter value, given either a parameter name or a parameter number.
Syntax
object.ParameterValue (parameterIndex) object.ParameterValue (parameterName) The ParameterValue method syntax has the following parts:
Part
object parameterIndex parameterName
Description
An object of type AmosEngine. (Integer) A parameter index. Parameters are numbered starting with 1. (String) A parameter name.
Placement: [3].
See Also
ParameterName Method (on page 567) ParameterNumber Method (on page 569)
572
573
ParameterVector Method
Gets the values of all free parameters.
Syntax
object.ParameterVector (x) The ParameterVector method syntax has the following parts:
Part
object x
Description
An object of type AmosEngine. An array of type double dimensioned in the calling program as Dim x() as Double On return from ParameterVector, x is a 1-dimensional array containing the vector of free parameters.
Placement: [3].
See Also
Use the AmosEngine class to evaluate derivatives numerically and display the results with the Amos Debug class (on page 750)
574
Path Method
Specifies a regression weight as a model parameter.
Syntax
object.Path (leftVariableName, rightVariableName) object.Path (leftVariableName, rightVariableName, parameterValue) object.Path (leftVariableName, rightVariableName, parameterName) The Path method syntax has the following parts:
Part
object leftVariableName rightVariableName
Description
An object of type AmosEngine. The character strings, leftVariableName and rightVariableName, are the names of two variables. leftVariableName depends linearly on rightVariableName. That is, leftVariableName is on the left-hand side of a regression equation and rightVariableName appears on the right-hand side with a regression weight that is a model parameter. (Optional) Parameter value. If parameterValue = 3, say, then the regression weight is fixed at 3.
parameterValue
parameterName
(Optional) Parameter name. If parameterName = abc, say, then the regression weight is named abc. It is constrained to be equal to any other parameters named abc. If parameterName = 3?, say then the regression weight is given an initial value of 3, and is unconstrained. If parameterName = abc:3, say, then the regression weight is named abc and is given an initial value of 3. It is constrained to be equal to any other parameters named abc. If parameterName is an empty string (""), the regression weight is an unconstrained parameter.
Placement: [2].
Default
A variable is assumed not to depend directly on another variable unless a linearly dependency is specified by use of the Path or AStructure (see "AStructure Method" on page 302) method.
Remarks
If parameterValue and parameterName are omitted, the regression weight is an unconstrained parameter.
575
576
Pclose Method
Gets the p value for testing the null hypothesis that RMSEA is less than .05 in the population. (Browne & Cudeck, 1993)
Syntax
object.Pclose () The Pclose method syntax has the following parts:
Part
object
Description
An object of type AmosEngine.
Placement: [3].
Remarks
If you have used the Model (see "Model Method" on page 492) method to define more than one model, the Pclose method gets the p value for the most recently fitted model. The second example shows how to obtain the p value for multiple models.
577
578
579
Permute Method
Performs a permutation test (Arbuckle, 1994b) of the specified model.
Syntax
object.Permute (x) The Permute method syntax has the following parts:
Part
object x
Description
An object of type AmosEngine. An integer. If x = 0, the permutation test is based on all permutations of the observed variables. If x is positive, the permutation test is based on x random permutations. If x is negative, no permutation test is performed.
Placement: [1].
Default
No permutation test is performed.
Remarks
Bootstrapping cannot be performed at the same time as the permutation test. That is, you cant execute both the Permute and the Bootstrap (see "Bootstrap Method" on page 332) methods in the same program.
See Also
PermuteDetail Method (on page 584)
580
Sem.PermuteDetail() Sem.BeginGroup(Sem.AmosDir & "Examples\UserGuide.xls", "Wheaton") Sem.Path("anomia67", "67_alienation", 1) Sem.Path("anomia67", "eps1", 1) Sem.Path("powles67", "67_alienation") Sem.Path("powles67", "eps2", 1) Sem.Path("anomia71", "71_alienation", 1) Sem.Path("anomia71", "eps3", 1) Sem.Path("powles71", "71_alienation") Sem.Path("powles71", "eps4", 1) Sem.Path("67_alienation", "ses") Sem.Path("67_alienation", "zeta1", 1) Sem.Path("71_alienation", "67_alienation") Sem.Path("71_alienation", "ses") Sem.Path("71_alienation", "zeta2", 1) Sem.Path("education", "ses", 1) Sem.Path("education", "delta1", 1) Sem.Path("SEI", "ses") Sem.Path("SEI", "delta2", 1) Sem.Var("eps1", "var1") Sem.Var("eps2", "var2") Sem.Var("eps3", "var3") Sem.Var("eps4", "var4") Sem.Cov("eps1", "eps3", "cov1") Sem.Cov("eps2", "eps4", "cov2") Sem.Dispose() End Sub End Module
581
Discussion of Example
Here is a portion of the output from the example.
Matrix Permutations Test (Model 1) Summary (Model 1) Of 719 permutations: 15 permutations improved the model fit or left it unchanged. 86 permutations resulted in a model that could not be fitted. 618 permutations resulted in a higher discrepancy function. Of the remaining permutations: 0 resulted in inadmissible estimates and unstable systems. 0 resulted in inadmissible estimates. 0 resulted in unstable systems. p = 16 / 720 = .022
582
With six observed variables, there are 720 possible permutations -- 719, if you dont count the permutation that leaves each observed variable in its original position. Of the 719 non-identity permutations, 15 made the discrepancy function smaller or left it unchanged. 617 of the permutations made the discrepancy function larger. 86 permutations resulted in a model for which Amos could not find a solution. As noted above, failures are to be expected in fitting a series of generally bad models. The question is, how do you classify the models for which no solution was found? Can it be assumed that each one of those models is worse than the original model? In other words, can you assume that, whenever Amos fails, its the models fault rather than Amoss? Experience shows that Amoss failures to find solutions are almost always due to bad models (or samples that are too small). But not always. Therefore, there may be an objection to lumping the 86 permutations that produced an unfittable model together with the 617 permutations that produced a worse fitting model, on the grounds that doing so could result in an overcount of the number of permutations that make the model worse. With these considerations in mind, Amos follows the convention that unfittable models are worse than the model being evaluated. Then out of 720 permutations (including the identity permutation), there are 16 permutations that produce a model that fits as well as or better than the original model. (The original model itself is one of those 16.). In other words, if you picked a model at random out of those generated by permuting the observed variables, there is a probability of 16/720 = .022 of getting a model as good as the one that Jreskog and Srbom proposed. It is possible for an Amos solution to be inadmissible or to consist of an unstable linear system, although neither of these problems arose in the present example. There needs to be a policy on permutations that produce a model with a lower discrepancy function than was obtained for the original model, but for which an inadmissible solution or an unstable system occurs. Amos adheres to the following policy. First of all, if the original model results in an inadmissible solution, Amos disregards the admissibility status of estimates for models that are generated by permutations. Also, if the original model results in an unstable system, Amos ignores any instability that occurs in linear systems that result from permutations. If the original model yields an admissible solution with a stable system of linear equations, Amos reports the number of permutations that lower the discrepancy function while producing an inadmissible solution or an unstable system, and follows the convention that such permutations are harmful (i.e., that they make a model worse). The frequency of inadmissible solutions and unstable systems is summarized as follows for the present example.
Of the remaining permutations: 0 resulted in inadmissible estimates and unstable systems. 0 resulted in inadmissible estimates. 0 resulted in unstable systems.
583
Of the 15 permutations that resulted in a discrepancy function that was as good as or better than that of the original model, all were in fact exactly as good - none were better. Examination of the output from the PermuteDetail (see "PermuteDetail Method" on page 584) method reveals that these 15 models are equivalent to the original model in the sense of Stelzl (1986), Lee and Hershberger (1990) and MacCallum, et al. (1993). In principal, it would be possible to reduce the computational requirements of the permutation test by fitting one representative model from each set of equivalent models. Amos does not do this, however. More importantly, the fact that the permuted models come in clusters of equivalent models has a bearing on the interpretation of the permutation test. In the current example, for instance, the proportion of permuted models that fit as well as or better than the original model cannot take on just any of the values 1/720, 2/720, 3/720,.... Instead, the proportion is restricted to the values 16/720, 32/720, 48/720,.... The number of possible p values is still 720/16 = 45, and so it remains an interesting question what the value of p is. However, a serious problem arises when the number of permutations that leave the fit of the model invariant is very large, so that the number of distinct discrepancy function values that can occur is very small. To take an extreme case, consider the common factor model with one common factor, and no parameter constraints other than those required to make the model identified. No permutation of the observed variables will affect the fit of the model, and it will not be possible to apply the permutation test in a meaningful way.
584
PermuteDetail Method
Gives detailed information about the solution obtained for each permutation when the Permute (see "Permute Method" on page 579) method is used. First the permutation itself is reported. (That is, the new location of each observed variable in the model is shown after the permutation is carried out.) Then, if a solution is found, the value of the discrepancy function is reported along with a notation of whether the solution was admissible and whether the resulting linear system was stable.
Syntax
object.PermuteDetail () object.PermuteDetail (tf) The PermuteDetail method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine. Optional. A boolean value that controls the reporting of information about each permutation. True (default) requests the output. False suppresses it
Placement: [1].
Default
Detailed information about each permutation is not reported.
585
586
PutParameterValue Method
Assigns a value to a parameter.
Syntax
object.PutParameterValue (parameterIndex, parameterValue) object.PutParameterValue (parameterName, parameterValue) The PutParameterValue method syntax has the following parts:
Part
object parameterIndex parameterName parameterValue
Description
An object of type AmosEngine. (Integer) A parameter index. Parameters are numbered starting with 1. (String) A parameter name. (Double) New parameter value.
Placement: [3].
See Also
Use the AmosEngine class to evaluate derivatives numerically and display the results with the Amos Debug class (on page 750)
587
PutParameterVector Method
Assigns values to the vector of free parameters.
Syntax
object.PutParameterVector (x) The PutParameterVector method syntax has the following parts:
Part
object x
Description
An object of type AmosEngine. A 1-dimensional array of type double. x must be dimensioned to have exactly one element for each parameter. The first parameter is in x(0). (The number of parameters can be obtained with the NumberOfParameters (see "NumberOfParameters Method" on page 547) method.)
Placement: [3].
See Also
Use the AmosEngine class to evaluate derivatives numerically and display the results with the Amos Debug class (on page 750)
588
PutSampleCovariances Method
Assigns values to the matrix of sample covariances. This method should not be used if means/intercepts are explicit model parameters, because it sets the vector of sample means to zero. (Use PutSampleMoments (see "PutSampleMoments Method" on page 590) instead.)
Syntax
object.PutSampleCovariances (covarianceMatrix) object.PutSampleCovariances (covarianceMatrix, groupNumber) The PutSampleCovariances method syntax has the following parts:
Part
object covarianceMatrix
Description
An object of type AmosEngine. A two-dimensional array of type double. The dimensions of covarianceMatrix must exactly match the dimensions of the sample covariance matrix. Optional. A group number. The first group is group number 1. If groupNumber is omitted, the first group is used.
groupNumber
Placement: [3].
Remarks
One technique for performing sampling studies consists of the repeated use of PutSampleCovariances and FitModel (see "FitModel Method" on page 407).
See Also
Use the AmosEngine class to test for scale- and location-invariance (on page 753)
589
PutSampleCovariancesPacked Method
Assigns values to the matrix of sample covariances, where sample covariances are stored as a one-dimensional array. This method should not be used if means/intercepts are explicit model parameters, because it sets the vector of sample means to zero. (Use PutSampleMomentsPacked (see "PutSampleMomentsPacked Method" on page 591) instead.) If your sample covariances are stored in a two-dimensional array, use PutSampleCovariances (see "PutSampleCovariances Method" on page 588).
Syntax
object.PutSampleCovariancesPacked (covarianceMatrix) object.PutSampleCovariancesPacked (covarianceMatrix, groupNumber) The PutSampleCovariancesPacked method syntax has the following parts:
Part
object covarianceMatrix
Description
An object of type AmosEngine. A one-dimensional array of type double. The lower triangular elements of covarianceMatrix should be stored in the order x(0,0), x(1,0), x(1,1),..... Optional. A group number. The first group is group number 1. If groupNumber is omitted, the first group is used.
groupNumber
Placement: [3].
Remarks
One efficient technique for performing a sampling study is to loop through the following sequence. 1 2 3 Generate a new sample covariance matrix. Use PutSampleCovariancesPacked. Use FitModel (see "FitModel Method" on page 407).
590
PutSampleMoments Method
Assigns values to the sample covariances and the sample means.
Syntax
object.PutSampleMoments (covariancesBase0, meansBase0) object.PutSampleMoments (covariancesBase0, meansBase0, groupNumber) The PutSampleMoments method syntax has the following parts:
Part
object covariancesBase0
Description
An object of type AmosEngine. A two-dimensional array of type double. The dimensions of covariancesBase0 must exactly match the dimensions of the sample covariance matrix. A one-dimensional array of type double. The number of elements in meansBase0 must equal the number of observed variables in the model. Optional. A group number. The first group is group number 1. If groupNumber is omitted, the first group is used.
meansBase0
groupNumber
Placement: [3].
Remarks
One technique for performing sampling studies consists of the repeated use of PutSampleMoments and FitModel (see "FitModel Method" on page 407).
See Also
Use the AmosEngine class to test for scale- and location-invariance (on page 753)
591
PutSampleMomentsPacked Method
Assigns values to the sample covariances and the sample means when sample covariances are stored as a one-dimensional array.
Syntax
object.PutSampleMomentsPacked (covariances, means) object.PutSampleMomentsPacked (covariances, means, groupNumber) The PutSampleMomentsPacked method syntax has the following parts:
Part
object covariances
Description
An object of type AmosEngine. A one-dimensional array of type double. The lower triangular elements of covariances should be stored in the order x(0,0), x(1,0), x(1,1),..... A one-dimensional array of type double. The number of elements in means must equal the number of observed variables in the model. Optional. A group number. The first group is group number 1. If groupNumber is omitted, the first group is used.
means
groupNumber
Placement: [3].
Remarks
One efficient technique for performing a sampling study is to loop through the following sequence. 1 2 3 Generate a new sample covariance matrix. Use PutSampleMomentsPacked. Use FitModel (see "FitModel Method" on page 407).
592
ResidualMoments Method
Controls reporting of the difference between the sample covariance matrix and the implied covariance matrix. If means and intercepts are explicitly modeled, the ResidualMoments method also controls reporting of differences between sample means and implied means.
Syntax
object.ResidualMoments () object.ResidualMoments (tf) The ResidualMoments method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine. Optional. A boolean value that controls the reporting of residual moments. True (default) requests the output. False suppresses it.
Placement: [1].
Default
Residual moments are not reported.
See Also
Admissible Method (on page 294) ImpliedMoments Method (on page 461) SampleMoments Method (on page 608)
593
594
ReviseModel Method
Changes the constraints on a model that was previously defined by the Model (see "Model Method" on page 492) method. There are some limitations on the extent to which a model can be changed.
Syntax
object.ReviseModel (modelName, constraint1) object.ReviseModel (modelName, constraint1, constraint2) object.ReviseModel (modelName, constraint1, constraint2, constraint3) ... The ReviseModel method syntax is identical to the Model (see "Model Method" on page 492) method syntax. The ReviseModel method syntax has the following parts:
Part
object modelName constraint1
Description
An object of type AmosEngine. The name of a model previously defined by the Model (see "Model Method" on page 492) method. Either:
A string of the form p1=p2=p3=..., where each pi is either a parameter name or a number. At most one of the pi can be a number.
Or: The name of another model. constraint2 constraint3 ... Same as constraint1 Same as constraint1 ...
Placement: [3].
Remarks
The constraints expressed by constraint1, constraint2, replace the constraints of the original model. There are the following limitations on the changes model changes that can be made by ReviseModel. The number of equality constraints in the revised model cannot exceed the number of constraints in the original model. For example, the ReviseModel method in following program fragment raises an error because it attempts to create four constraints on a model that originally had only three.
Dim Sem As New AmosEngine Sem.Model "Model 1", "a=0", "b=0", "c=0" Sem.ReviseModel "Model 1", "u=v=w=x=0"
595
The constraints in the revised model may only employ constants of 0, 1, or constants that have been previously been assigned to parameter values with the Model (see "Model Method" on page 492), AStructure (see "AStructure Method" on page 302), MStructure (see "MStructure Method" on page 505), Path (see "Path Method" on page 574), Cov (see "Cov Method" on page 370), Var (see "Var Method" on page 641), Mean (see "Mean Method" on page 486), or Intercept (see "Intercept Method" on page 477) methods.
596
597
Syntax
object.Rmsea () object.RmseaLo () object.RmseaHi () The Rmsea, RmseaLo and RmseaHi method syntaxes have the following parts:
Part
object
Description
An object of type AmosEngine.
Remarks
If you have used the Model (see "Model Method" on page 492) method to define more than one model, the Rmsea, RmseaLo and RmseaHi methods return estimates for the most recently fitted model. The second example shows how to obtain estimates for multiple models.
598
599
600
RowNames Method
Obtains the variable names associated with the rows of a matrix of estimates.
Syntax
object.RowNames (matrixID, theRowNames) object.RowNames (matrixID, theRowNames, groupNumber) The RowNames method syntax has the following parts:
Part
object matrixID theRowNames
Description
An object of type AmosEngine. An integer that specifies a matrix of estimates, as described in Settings A string array declared in the calling program as Dim theRowNames() as String The Amos Engine will redimension the array.
groupNumber
Optional. A group number. The first group is group number 1. If groupNumber is omitted, the first group is used.
Placement: [3].
Settings
The settings for matrixID are:
Constant
SampleCovariances SampleCorrelations SampleMeans ImpliedCovariances ImpliedCorrelations ImpliedMeans AllImpliedCovariances
Value Description
13 14 15 10 11 12 7 Sample covariances. Sample correlations. Sample means. The implied covariances among the observed variables in the model. The implied correlations among the observed variables in the model. The implied means of the observed variables in the model. The implied covariances among all variables in the model, with the exception of residual variables. The implied correlations among all variables in the model, with the exception of residual variables. The implied means of all variables in the model, with the exception of residual variables. Direct effects. Indirect effects.
AllImpliedCorrelations
AllImpliedMeans
DirectEffects IndirectEffects
19 20
601
Constant
TotalEffects StandardizedDirectEffects StandardizedIndirectEffects StandardizedTotalEffects FactorScoreWeights
Value Description
5 22 23 21 6 Total effects. Standardized direct effects. Standardized indirect effects. Standardized total effects. Factor score weights.
Remarks
The NeedEstimates (see "NeedEstimates Method" on page 521) method must be used to give notice that a particular matrix of estimates will be needed before the RowNames method can be used to obtain the row names for that matrix. For example, you have to use
object.NeedEstimates (see "NeedEstimates Method" on page 521) (ImpliedMeans)
before using
object.RowNames (ImpliedMeans, )
602
Programming with Amos Dim NRows1 As Integer, NColumns1 As Integer Dim i As Integer, j As Integer NRows1 = UBound(RNames) NColumns1 = UBound(CNames) Debug.Write(" ") For j = 0 To NColumns1 Debug.Write(CNames(j).PadLeft(10)) Next Debug.WriteLine("") For i = 0 To NRows1 Debug.Write(RNames(i).PadRight(8)) For j = 0 To NColumns1 Debug.Write(TheMatrix(i, j).ToString(".00000").PadLeft(10)) Next Debug.WriteLine("") Next End Sub End Module
603
604
RowNumbers Method
Obtains the variable numbers associated with the rows of a matrix.
Syntax
object.RowNumbers matrixID, theVariableNumbers, groupNumber The RowNumbers method syntax has the following parts:
Part
object matrixID theVariableNumbers
Description
An object of type AmosEngine. An integer that specifies a matrix of estimates, as described in Settings An integer array declared in the calling program as Dim theVariableNumbers() as Integer The Amos Engine will redimension the array. Optional. A group number. The first group is group number 1. If groupNumber is omitted, the first group is used.
groupNumber
Placement: [3].
Settings
The settings for matrixID are:
Constant
SampleCovariances SampleCorrelations SampleMeans ImpliedCovariances ImpliedCorrelations ImpliedMeans AllImpliedCovariances
Value Description
13 14 15 10 11 12 7 Sample covariances. Sample correlations. Sample means. The implied covariances among the observed variables in the model. The implied correlations among the observed variables in the model. The implied means of the observed variables in the model. The implied covariances among all variables in the model, with the exception of residual variables. The implied correlations among all variables in the model, with the exception of residual variables. The implied means of all variables in the model, with the exception of residual variables. Direct effects. Indirect effects. Total effects.
AllImpliedCorrelations
AllImpliedMeans
19 20 5
605
Constant
StandardizedDirectEffects StandardizedIndirectEffects StandardizedTotalEffects FactorScoreWeights
Value Description
22 23 21 6 Standardized direct effects. Standardized indirect effects. Standardized total effects. Factor score weights.
Remarks
The NeedEstimates (see "NeedEstimates Method" on page 521) method must be used to give notice that a particular matrix of estimates will be needed before the RowNumbers method can be used to obtain the row numbers for that matrix. For example, you have to use
object.NeedEstimates (see "NeedEstimates Method" on page 521) (ImpliedMeans)
before using
object.RowNumbers (ImpliedMeans, )
606
607
Sub PrintMatrix1(ByVal TheMatrix(,) As Double, ByVal CNumbers() As Integer, ByVal RNumbers() As Integer) Dim NRows1 As Integer, NColumns1 As Integer Dim i As Integer, j As Integer NRows1 = UBound(RNumbers) NColumns1 = UBound(CNumbers) Debug.Write(" ") For j = 0 To NColumns1 Debug.Write(CNumbers(j).ToString.PadLeft(10)) Next Debug.WriteLine("") For i = 0 To NRows1 Debug.Write(RNumbers(i).ToString.PadLeft(8)) For j = 0 To NColumns1 Debug.Write(TheMatrix(i, j).ToString("#.00000").PadLeft(10)) Next Debug.WriteLine("") Next End Sub End Module
608
SampleMoments Method
Controls the reporting of the sample covariance matrix and (if means and intercepts are explicitly modeled) the sample means.
Syntax
object.SampleMoments () object.SampleMoments (tf) The SampleMoments method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine. Optional. A boolean value that controls the reporting of sample moments. True (default) requests the output. False suppresses it.
Placement: [1].
Default
Sample moments are not reported.
See Also
Admissible Method (on page 294) ImpliedMoments Method (on page 461) ResidualMoments Method (on page 592) InputUnbiasedMoments Method (on page 467) FitUnbiasedMoments Method (on page 409)
609
610
Seed Method
Specifies a seed for the random number generator used for bootstrapping and for the permutation test. Using Amos twice with the same seed guarantees getting the same sequence of random numbers both times.
Syntax
object.Seed (theSeed) The Seed method syntax has the following parts:
Part
object theSeed
Description
An object of type AmosEngine. An integer between 1 and 29999
Placement: [1].
Default
A seed of 1 is used.
See Also
BootAdf Method (on page 313) BootBS Method (on page 316) BootGls Method (on page 323) BootMl Method (on page 326) BootSls Method (on page 329) Bootstrap Method (on page 332) BootSls Method (on page 329) BootVerify Method (on page 342) Permute Method (on page 579)
611
612
Shutdown Method
The Shutdown method has no effect. It is provided for compatibility with earlier versions of Amos.
Syntax
object.Shutdown The Shutdown method syntax has the following parts:
Part
object
Description
An object of type AmosEngine.
Placement: [3].
613
SignificantFigures Method
The SignificantFigures method has no effect. It is provided for compatibility with earlier versions of Amos.
Syntax
object.SignificantFigures Ndigits The SignificantFigures method syntax has the following parts:
Part
object Ndigits
Description
An object of type AmosEngine. Number of significant figures to be used in displaying matrices, within the bounds specified by MinDecimalPlaces (see "MinDecimalPlaces Method" on page 489) and MaxDecimalPlaces (see "MaxDecimalPlaces Method" on page 485).
614
Sls Method
Requests the scale free least squares solution obtained by minimizing (D1) together with (D5) in Appendix B.
Syntax
object.Sls () The Sls method syntax has the following parts:
Part
object
Description
An object of type AmosEngine.
Placement: [1].
Default
When you do not specify an estimation criterion, the maximum likelihood criterion (Ml (see "Ml Method" on page 490) method) is used.
See Also
Adf Method (on page 292) BootSls Method (on page 329) Gls Method (on page 457) Ml Method (on page 490) Uls Method (on page 637)
615
616
Smc Method
Controls reporting of the squared multiple correlation between each endogenous variable and the variables (other than residual variables) that directly affect it.
Syntax
object.Smc () object.Smc (tf) The Smc method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine. Optional. If tf is True, squared multiple correlations are reported. Otherwise, not.
Placement: [1].
Default
Squared multiple correlations are not reported.
617
618
Specran Method
Controls whether Amos uses a special random number generator that is common to all versions of Amos (since the beginning of time).
Syntax
object.Specran () object.Specran (tf) The Specran method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine. Optional. If tf is True (default), the special random number generator is used. If tf is False, the random number generator of Wichman and Hill (1982) is used.
Placement: [1].
Default
The random number generator of Wichman and Hill (1982) is used.
Remarks
The random number generator that the Specran method invokes is not very good. It should not be used except to replicate an example in which the Specran method (or the $specran command of Amos 3.61 or earlier) was used.
619
620
Stable Method
Returns True if the solution is a stable linear system for every group.
Syntax
object.Stable() The Stable method syntax has the following parts:
Part
object
Description
An object of type AmosEngine.
Placement: [3].
See Also
Admissible Method (on page 294)
621
622
Standardized Method
Controls reporting of standardized parameter estimates (correlations among exogenous variables, and standardized regression weights). When used with the SampleMoments (see "SampleMoments Method" on page 608) method, it controls reporting of sample correlations. When used with the ImpliedMoments (see "ImpliedMoments Method" on page 461) or AllImpliedMoments (see "AllImpliedMoments Method" on page 296) methods, it controls reporting of implied correlations. When used with TotalEffects (see "TotalEffects Method" on page 635), it controls reporting of standardized direct effects, indirect effects and total effects.
Syntax
object.Standardized () object.Standardized (tf) The Standardized method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine. Optional. If tf is True (default), standardized estimates are reported. Otherwise, not.
Placement: [1].
Default
Standardized estimates are not reported.
623
624
TableOutput Method
The TableOutput method is obsolete. Use the TextOutput (see "TextOutput Method" on page 627) method instead.
625
Technical Method
Controls the reporting of information about the progress of minimization of the discrepancy function.
Syntax
object.Technical () object.Technical (tf) The Technical method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine. Optional. If tf is True, the minimization history is reported. Otherwise, not.
Placement: [1].
Default
The minimization history is reported.
See Also
Crit1 Method (on page 377) Crit2 Method (on page 379) Fisher Method (on page 401) Iterations Method (on page 482) Time Method (on page 631)
626
627
TextOutput Method
Controls whether results are displayed at the end of the analysis.
Syntax
object.TextOutput () object.TextOutput (tf) The TextOutput method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine. Optional. If tf is True (default), results are written to a html file that is displayed at the conclusion of the analysis. If tf is False, results are written to a html file, but the file is not automatically displayed at the conclusion of the analysis.
Default
Results are written to a html file, but the file is not automatically displayed at the conclusion of the analysis.
Remarks
By default, the html output file is created in the Windows temporary directory with the name AmosScratch.AmosOutput. Use Initialize (see "Initialize Method (AmosEngine)" on page 463) to change the name and location of the output file.
628
629
TextOutputFileName Method
Gets the fully qualified path to the file that contains output displayed by the TextOutput (see "TextOutput Method" on page 627) method.
Syntax
object.TextOutputFileName () The TextOutputFileName method syntax has the following parts:
Part
object
Description
An object of type AmosEngine.
Placement: [1].
630
631
Time Method
Sets an execution time limit.
Syntax
object.Time (seconds) The Time method syntax has the following parts:
Part
object seconds
Description
An object of type AmosEngine. Time limit in seconds. If the time limit is reached, Amos displays the most recent estimates of the parameters and quits, even if the convergence criteria (see the Crit1 (see "Crit1 Method" on page 377) and Crit2 (see "Crit2 Method" on page 379) methods) have not been met.
Placement: [1].
Default
There is no time limit.
Remarks
If the time limit specified by the Time method is reached, it will take additional time to complete the output of results. You should allow for this by specifying a value with the Time method that is smaller than any time limit placed on your analysis by the operating system. Permitted values for the time limit range from one to 2,147,483 seconds.
See Also
Crit1 Method (on page 377) Crit2 Method (on page 379) Fisher Method (on page 401) Iterations Method (on page 482) Technical Method (on page 625)
632
633
Title Method
Specifies a title for the analysis.
Syntax
object.Title (theTitle) The Title method syntax has the following parts:
Part
object theTitle
Description
An object of type AmosEngine. A title. The title is displayed in the output generated by TextOutput (see "TextOutput Method" on page 627).
Placement: [1].
Default
The title is an empty string.
634
635
TotalEffects Method
Controls reporting of direct, indirect and total effects (Fox, 1980).
Syntax
object.TotalEffects () object.TotalEffects (tf) The TotalEffects method syntax has the following parts:
Part
object tf
Description
An object of type AmosEngine. Optional. If tf is True (the default), then direct, indirect and total effects are reported. Otherwise, not.
Placement: [1].
Default
Direct, indirect and total effects are not reported.
Remarks
When you use the Standardized (see "Standardized Method" on page 622) method, standardized direct, indirect and total effects are reported along with direct, indirect and total effects.
636
637
Uls Method
Requests an unweighted least squares solution, obtained by minimizing (D1) together with (D6) in the Users Guide, Appendix B.
Syntax
object.Uls () The Uls method syntax has the following parts:
Part
object
Description
An object of type AmosEngine.
Placement: [1].
Default
When you do not specify an estimation criterion, the maximum likelihood criterion (Ml (see "Ml Method" on page 490) method) is used.
See Also
BootUls Method (on page 339) Adf Method (on page 292) Gls Method (on page 457) Ml Method (on page 490) Sls Method (on page 614)
638
639
UVariableCount Method
Specifies the number of unobserved variables in the model.
Syntax
object.UVariableCount (nVariables) The UVariableCount method syntax has the following parts:
Part
object nVariables
Description
An object of type AmosEngine. The number of unobserved variables in the model.
Placement: [2].
Default
When the UVariableCount method is not used, no error checking is done based on the number of unobserved variables.
Remarks
Amos checks nVariables for consistency with the model and the data file. If a discrepancy is found, Amos reports the discrepancy and quits. Spelling or typing errors are frequently detected by this check, since two variant spellings of a variable name will be treated as references to two distinct variables. In a multiple-group analysis, the UvariableCount method can be used once per group.
See Also
OVariableCount Method (on page 553) VariableCount Method (on page 643)
640
641
Var Method
Specifies a variance as a model parameter.
Syntax
object.Var (variableName) object.Var (variableName, parameterValue) object.Var (variableName, parameterName) The Var method syntax has the following parts:
Part
object variableName parameterValue parameterName
Description
An object of type AmosEngine. The character string, variableName, is the name of an exogenous variable. The Var method makes its variance a model parameter. (Optional) Parameter value. If parameterValue = 3, say, then the variance is fixed at 3. (Optional) Parameter name. If parameterName = abc, say, then the variance is named abc. It is constrained to be equal to any other parameters named abc. If parameterName = 3?, say then the variance is given an initial value of 3, and is unconstrained. If parameterName = abc:3, say, then the variance is named abc and is given an initial value of 3. It is constrained to be equal to any other parameters named abc. If parameterName is an empty string (""), the variance is an unconstrained parameter.
Placement: [2].
Default
The variance of an exogenous variable is an unconstrained parameter unless it has been constrained or fixed at a constant by use of the Var or AStructure (see "AStructure Method" on page 302) method.
Remarks
If parameterValue and parameterName are omitted, the variance is an unconstrained parameter.
642
643
VariableCount Method
Specifies the number of variables in the model.
Syntax
object.VariableCount (nVariables) The VariableCount method syntax has the following parts:
Part
object nVariables
Description
An object of type AmosEngine. The number of variables in the model.
Placement: [2].
Default
When the VariableCount method is not used, no error checking is done based on the number of variables.
Remarks
Amos checks nVariables for consistency with the model and the data file. If a discrepancy is found, Amos reports the discrepancy and quits. Spelling or typing errors are frequently detected by this check, since two variant spellings of a variable name will be treated as references to two distinct variables. In a multiple-group analysis, the VariableCount method can be used once per group.
See Also
OVariableCount Method (on page 553) UVariableCount Method (on page 639)
644
645
VariableName Method
Gets the name of a variable.
Syntax
object.VariableName (variableNumber) object.VariableName (variableNumber, groupNumber) The VariableName method syntax has the following parts:
Part
object variableNumber groupNumber
Description
An object of type AmosEngine. A variable number. Variable numbers start at 1 in each group. Optional group number. The first group is group number 1. If groupNumber is omitted, the first group is used.
Placement: [3].
646
647
VariableNumber Method
Gets a variable number. A variable number is a variables position on Amoss internal variable list. The first variable on the list is variable number 1. Some methods refer to model variables by number (i.e., by list position).
Syntax
object.VariableNumber (variableName) object.VariableNumber (variableName, groupNumber) The VariableNumber method syntax has the following parts:
Part
object variableName groupNumber
Description
An object of type AmosEngine. A variable name. Optional group number. The first group is group number 1. If groupNumber is omitted, the first group is used.
Placement: [3].
648
649
WasInverted Method
True if the matrix of (approximate or exact) second derivatives was successfully inverted by the most recent use of EvaluateEx2a (see "Evaluate2a and EvaluateEx2a Methods" on page 394) or EvaluateEx2e (see "Evaluate2e and EvaluateEx2e Methods" on page 396).
Syntax
result = object.WasInverted () The WasInverted method syntax has the following parts:
Part
result object
Description
True if the matrix of (approximate or exact) second derivatives was successfully inverted. False otherwise. An object of type AmosEngine.
Placement: [3].
See Also
Evaluate2a and EvaluateEx2a methods example (on page 395)
650
651
Properties
This section documents the properties of the AmosMatrix class.
652
ColumnName Property
Name of the variable associated with a matrix column. Read-only.
Syntax
result = object.ColumnName(i) The ColumnName property syntax has the following parts:
Part
result object i
Description
The name of the variable associated with column i. An object of type AmosMatrix. An integer specifying a column number. Column 0 is the first column.
Placement: [3].
653
654
ColumnNumber Property
Variable number (maintained internally by the Amos engine) of the variable associated with a matrix column. Read-only.
Syntax
result = object.ColumnNumber(i) The ColumnNumber property syntax has the following parts:
Part
result object i
Description
The Amos engines internal variable number for the variable associated with column i. An object of type AmosMatrix. An integer specifying a column number. Column 0 is the first column.
Placement: [3].
655
656
NColumns Property
The number of columns in a matrix. Read-only.
Syntax
result = object.NColumns The NColumns property syntax has the following parts:
Part
result object
Description
The number of columns in objects matrix. An object of type AmosMatrix.
Placement: [3].
657
658
NRows Property
The number of rows in a matrix. Read-only.
Syntax
result = object.nRows The nRows property syntax has the following parts:
Part
result object
Description
The number of rows in objects matrix. An object of type AmosMatrix.
Placement: [3].
659
660
RowName Property
Name of the variable associated with a matrix row. Read-only.
Syntax
result = object.RowName(i) The RowName property syntax has the following parts:
Part
result object i
Description
The name of the variable associated with row i. An object of type AmosMatrix. An integer specifying a row number. Row 0 is the first row.
Placement: [3].
661
662
RowNumber Property
Variable number (maintained internally by the Amos engine) of the variable associated with a matrix row. Read-only.
Syntax
result = object.RowNumber(i) The RowNumber property syntax has the following parts:
Part
result object i
Description
The Amos engines internal variable number for the variable associated with row i. An object of type AmosMatrix. An integer specifying a row number. Row 0 is the first row.
Placement: [3].
663
664
X Property
A matrix element. Read-only.
Syntax
result = object.X(i, j) The X property syntax has the following parts:
Part
result object i j
Description
The (i, j) element of objects matrix. An object of type AmosMatrix. An integer specifying a row number. Row 0 is the first row. An integer specifying a column number. Column 0 is the first row.
Placement: [3].
665
X Property Example
The following program fits the model of Example 4 and displays the sample covariance matrix.
Imports System.Diagnostics Imports AmosEngineLib Imports AmosEngineLib.AmosEngine.TMatrixID Module MainModule Sub Main() Dim Sem As New AmosEngine Dim AM As New AmosMatrix Dim i As Integer, j As Integer Sem.NeedEstimates(SampleCovariances) Sem.BeginGroup(Sem.AmosDir & "Examples\UserGuide.xls", "Warren5v") Sem.AStructure("performance = knowledge + value + satisfaction + error (1)") Sem.GetEstimatesEx(SampleCovariances, AM) For i = 0 To AM.NRows - 1 For j = 0 To AM.NColumns - 1 Debug.Write(AM.X(i, j).ToString("#.0000").PadLeft(10)) Next Debug.WriteLine("") Next Sem.Dispose() End Sub End Module
666
667
Properties
This section documents the properties of the AmosDebug class.
668
DecimalPlaces Property
Gets or sets the number of decimal places used to display numbers.
Syntax
object.DecimalPlaces [=value] The DecimalPlaces property syntax has the following parts:
Part
object value
Description
An object of type AmosDebug. The number of decimal places used to display numbers.
669
670
FieldWidth Property
Sets or gets the number of characters used to display each matrix element.
Syntax
object.FieldWidth [=value] The FieldWidth property syntax has the following parts:
Part
object value
Description
An object of type AmosDebug. The number of characters used to display each matrix element.
671
672
Methods
This section documents the methods of the AmosDebug class.
673
Clear Method
The Clear method is no longer supported because output from the AmosDebug class is now written to the trace listeners in the Listeners collection, not to a separate AmosDebug window. In earlier versions, the Clear method cleared (erased) the contents of the AmosDebug window.
Syntax
object.Clear () The Clear method syntax has the following parts:
Part
object
Description
An object of type AmosDebug.
674
Fixed Method
Displays elements of numeric matrices in fixed point format.
Syntax
object.Fixed () The Fixed method syntax has the following parts:
Part
object
Description
An object of type AmosDebug.
Default
Elements of numeric matrices are displayed in fixed point format with 3 decimal places and a field width of 10.
675
676
Hide Method
The Hide method is no longer supported because output from the AmosDebug class is now written to the trace listeners in the Listeners collection, not to a separate AmosDebug window. In earlier versions, the Hide method made the AmosDebug window invisible.
Syntax
object.Hide () The Hide method syntax has the following parts:
Part
object
Description
An object of type AmosDebug.
Default
The AmosDebug window is visible.
677
KeepOnTop Method
The KeepOnTop method is no longer supported because output from the AmosDebug class is now written to the trace listeners in the Listeners collection, not to a separate AmosDebug window. In earlier versions, the KeepOnTop method kept the AmosDebug window on top of other windows (if called with an argument of True) or allowed other windows to be on top (if called with an argument of False).
Syntax
object.KeepOnTop () The KeepOnTop method syntax has the following parts:
Part
object
Description
An object of type AmosDebug.
678
PrintTranspose Method
Displays the transpose of a 1- or 2-dimensional array.
Syntax
object.PrintTranspose (item) object.PrintTranspose (item, title) The PrintTranspose method syntax has the following parts:
Part
object item title
Description
An object of type AmosDebug. A 1- or 2-dimensional array of Double or String, or an AmosMatrix object. (Optional) A string that describes item.
Remarks
PrintTranspose transposes 2-dimensional arrays and AmosMatrix objects. PrintTranspose displays a 1-dimensional array as a single row.
See Also
PrintX, PrintTranspose, PrintTriangle Methods Example (on page 681)
679
PrintTriangle Method
Displays a 1-dimensional array as a lower triangular matrix.
Syntax
object.PrintTriangle (theMatrix) object.PrintTriangle (theMatrix, title) The PrintTriangle method syntax has the following parts:
Part
object theMatrix title
Description
An object of type AmosDebug. A 1-dimensional array of Double or String. (Optional) A string that describes theMatrix.
Remarks
PrintTriangle displays a vector x as x(0) x(1) x(2) x(3) x(4) x(5) ... Thus, the PrintTriangle method may be used when the vector contains the lower triangular portion of a symmetric matrix (see Evaluate2a and EvaluateEx2a methods example (on page 395)), and also when the vector contains the lower triangular portion of a lower triangular matrix.
See Also
PrintX, PrintTranspose, PrintTriangle Methods Example (on page 681)
680
PrintX Method
Displays a number, a string, a 1- or 2-dimensional array of numbers or strings, or AmosMatrix object.
Syntax
object.PrintX (item) object.PrintX (item, title) The PrintX method syntax has the following parts:
Part
object item title
Description
An object of type AmosDebug. A Double, a String, a 1- or 2-dimensional array of Double or String, or AmosMatrix object. (Optional) A string that describes item.
Remarks
PrintX displays a 1-dimensional array as a single column.
681
682
683
Scientific Method
Displays elements of numeric matrices in scientific format.
Syntax
object.Scientific The Scientific method syntax has the following parts:
Part
object
Description
An object of type AmosDebug.
Default
Elements of numeric matrices are displayed in fixed point format with 3 decimal places and a field width of 10.
684
685
Show Method
The Show method is no longer supported because output from the AmosDebug class is now written to the trace listeners in the Listeners collection, not to a separate AmosDebug window. In earlier versions, the Show method made the AmosDebug window visible.
Syntax
object.Show () The Show method syntax has the following parts:
Part
object
Description
An object of type AmosDebug.
Default
The AmosDebug window is visible.
686
Unload Method
The Unload method is no longer supported because output from the AmosDebug class is now written to the trace listeners in the Listeners collection, not to a separate AmosDebug window. In earlier versions, the Unload method closed the AmosDebug window.
Syntax
object.Unload () The Unload method syntax has the following parts:
Part
object
Description
An object of type AmosDebug.
687
688
689
CholeskyEpsilon Property
The threshold used in the Cholesky decomposition of the population covariance matrix to decide whether a variable is linearly dependent on previous variables. The k-th variable is judged to be linearly dependent on variables 1 through k-1 if the k-th pivot is less than CholeskyEpsilon. The InstantSqrt (see "InstantSqrt Method" on page 706) and SpecifyPopulation (see "SpecifyPopulation Method" on page 722) methods make use of CholeskyEpsilon.
Syntax
value= object.CholeskyEpsilon object.CholeskyEpsilon = value The CholeskyEpsilon property syntax has the following parts:
Part
object value
Description
An object of type AmosRanGen. The threshold.
Default
The default threshold is 1.0e-10.
690
3 1 1 2 as well as the rank of the matrix and the square root of its determinant. matrix
Module MainModule Sub Main() Dim arand As New AMOSRANDOMLib6.AmosRanGen Dim Cov(2) As Double Cov(0) = 3 Cov(1) = 1 Cov(2) = 2 Dim Rank As Integer Dim sqrdet As Double arand.CholeskyEpsilon = 0.0000000001 Call arand.InstantSqrt(2, Cov(0), Rank, sqrdet) Dim ad As New AmosDebug.AmosDebug Call ad.PrintTriangle(Cov, "Square root of matrix") Call ad.PrintX(Rank, "Rank") Call ad.PrintX(sqrdet, "Square root of determinant") End Sub End Module
691
Rank Property
Gets the rank of the population covariance matrix already specified with SpecifyPopulation (see "SpecifyPopulation Method" on page 722).
Syntax
result = object.Rank The Rank property syntax has the following parts:
Part Description
result object
Remarks
The Rank property is read-only.
692
3 1 = , 1 2
4 = 5 .
693
SecondMomentsType Property
The type of second order moments returned by RandomMoments (see "RandomMoments Method" on page 714).
Syntax
value = object.SecondMomentsType object.SecondMomentsType = value The SecondMomentsType property syntax has the following parts:
Part Description
value
object
Settings
The settings for value are:
Constant
SSCP ML UNBIASED
Value Description
1 2 3 RandomMoments() returns sums of squares and cross products about the mean. RandomMoments() returns the (biased) maximum likelihood estimate of the population covariances. RandomMoments() returns the unbiased estimate of the population covariances.
694
3 1 = , 1 2
4 = 5 .
Then it draws a sample of 500 and displays the (biased) maximum likelihood estimate of the covariance matrix and mean vector.
Module MainModule Sub Main() Dim arand As New AMOSRANDOMLib6.AmosRanGen Dim PopCovariances(2) As Double Dim PopMeans(1) As Double PopCovariances(0) = 3 PopCovariances(1) = 1 PopCovariances(2) = 2 PopMeans(0) = 4 PopMeans(1) = 5 Call arand.SpecifyPopulation(PopCovariances, PopMeans) Dim SampleCovariances(2) As Double Dim SampleMeans(1) As Double arand.SecondMomentsType = AMOSRANDOMLib6.SECONDMOMENTS.ML Call arand.RandomMoments(SampleCovariances(0), SampleMeans(0), 2, 500) Dim ad As New AmosDebug.AmosDebug Call ad.PrintTriangle(SampleCovariances, "Sample Covariances") Call ad.PrintX(SampleMeans, "Sample Means") End Sub End Module
695
696
ChversInPlace Method
Replaces a positive definite symmetric matrix with its inverse.
Syntax
object.ChversInPlace (N, SymMatrix, WorkVector, Determinant, Eps, errorflag) The ChversInPlace property syntax has the following parts:
Part
object N SymMatrix
Description
An object of type AmosRanGen. Number of rows in the matrix. An array of length N*(N+1)/2, of type Double. On input, the matrix to be inverted. On output, the inverse. SymMatrix contains the first element of the first row, the first two elements of the second row, and so on. The first element of SymMatrix is passed by reference. An array of length N, of type Double. Used as work space. The first element of WorkVector is passed by reference. Output, of type Double. The determinant.
697
698
Syntax
object.Initialize (Seed) The Initialize method syntax has the following parts:
Part
object Seed
Description
An object of type AmosRanGen. Input, of type Integer. Seed for the random number generator.
699
700
InstantRandomVector Method
Gets a random multivariate normal vector where the mean vector and the square root of the covariance matrix are specified.
Syntax
object.InstantRandomVector (N, X, mean, s_sqrt) The InstantRandomVector property syntax has the following parts:
Part
object N X mean s_sqrt
Description
An object of type AmosRanGen. Input of type Integer. Number of elements in the vector. Output array of length N, of type Double. The random vector. The first element of X is passed by reference. X must be dimensioned by the caller. Input array of length N, of type Double. The population mean. The first element of mean is passed by reference. Input array of length N*(N+1)/2, of type Double. The square root of the population covariance matrix. s_sqrt contains the first element of the first row, the first two elements of the second row, and so on. The first element of s_sqrt is passed by reference.
See Also
InstantRandomVectorEx Method (on page 702) RandomVector Method (on page 716)
701
3 1 = , 1 2
4 = 5 .
Imports System.Diagnostics Module MainModule Sub Main() Dim arand As New AMOSRANDOMLib6.AmosRanGen Dim Cov(2) As Double Dim Mean(1) As Double Cov(0) = 3 Cov(1) = 1 Cov(2) = 2 Mean(0) = 4 Mean(1) = 5 Dim Rank As Integer Dim sqrdet As Double Call arand.InstantSqrt(2, Cov(0), Rank, sqrdet) Dim rx(1) As Double Dim i As Long For i = 1 To 5 Call arand.InstantRandomVector(2, rx(0), Mean(0), Cov(0)) Debug.WriteLine(rx(0) & rx(1)) Next End Sub End Module
702
InstantRandomVectorEx Method
Generates a random multinormal vector and calculates its squared Mahalanobis distance from the mean.
Syntax
object.InstantRandomVectorEx (N, X, mean, s_sqrt, MahalanobisD2) The InstantRandomVectorEx property syntax has the following parts:
Part
object N X
Description
An object of type AmosRanGen. Input of type Integer. Number of elements in the vector. Output array of length N, of type Double. The random vector. The first element of X is passed by reference. X must be dimensioned by the caller. Input array of length N, of type Double. The population mean. The first element of mean is passed by reference. Input array of length N*(N+1)/2, of type Double. The square root of the population covariance matrix. s_sqrt contains the first element of the first row, the first two elements of the second row, and so on. The first element of s_sqrt is passed by reference. Output of type Double. The squared Mahalanobis distance between X and mean.
mean s_sqrt
MahalanobisD2
See Also
InstantRandomVector Method (on page 700) RandomVector Method (on page 716)
703
3 1 = , 1 2
4 = 5 .
The program also displays the squared Mahalanobis distance of each observation from the mean.
Imports System.Diagnostics Module MainModule Sub Main() Dim arand As New AMOSRANDOMLib6.AmosRanGen Dim Cov(2) As Double Dim Mean(1) As Double Cov(0) = 3 Cov(1) = 1 Cov(2) = 2 Mean(0) = 4 Mean(1) = 5 Dim Rank As Integer Dim sqrdet As Double Call arand.InstantSqrt(2, Cov(0), Rank, sqrdet) Dim D2 As Double Dim rx(1) As Double Dim i As Long For i = 1 To 5 Call arand.InstantRandomVectorEx(2, rx(0), Mean(0), Cov(0), D2) Debug.WriteLine(rx(0) & rx(1) & "D2 = " & D2) Next End Sub End Module
704
InstantSolve Method
Solves Ax=y for x where A is lower triangular.
Syntax
object.InstantSolve (N, A, x, errorflag) The InstantSolve property syntax has the following parts:
Part
object N A
Description
An object of type AmosRanGen. Input of type Integer. The number of rows in the matrix a. Input array of length N*(N+1)/2, of type Double. A contains the first element of the first row, the first two elements of the second row, and so on. The first element of A is passed by reference. Input and output array of length N, of type double. The first element of x is passed by reference. Output, of type Integer. If the system of linear equations was successfully solved, errorflag=0. Otherwise, errorflag=1.
x errorflag
705
706
InstantSqrt Method
Replaces a nonnegative definite symmetric matrix with its Cholesky square root.
Syntax
object.InstantSqrt (n, x, rank, sqrdet) The InstantSqrt property syntax has the following parts:
Part
object n x
Description
An object of type AmosRanGen. Input of type Integer. The number of rows in the matrix. Input and output array of length N*(N+1)/2, of type Double. x contains the first element of the first row, the first two elements of the second row, and so on. The first element of x is passed by reference. Output of type Integer. The number of pivot elements greater than CholeskyEpsilon (see "CholeskyEpsilon Property" on page 689). Output of type double. The square root of the determinant.
rank sqrdet
Remarks
On output, x and sqrdet are meaningful only if rank = n.
See Also
CholeskyEpsilon Property (on page 689)
707
708
MahalanobisD2 Method
Gets the squared Mahalanobis distance of an observation from the mean.
Syntax
object.MahalanobisD2 (N, covsqrt, mean, X, D2, errorflag) The MahalanobisD2 property syntax has the following parts:
Part
object N covsqrt
Description
An object of type AmosRanGen. Input of type Integer. The number of elements in the vector. Input array of length N*(N+1)/2, of type Double. The square root of the covariance matrix. covsqrt contains the first element of the first row, the first two elements of the second row, and so on. The first element of covsqrt is passed by reference. Input array of length N, of type Double. The mean vector. The first element of mean is passed by reference. Input array of length N, of type Double. The observation. The first element of X is passed by reference. Output of type Double. The squared Mahalanobis distance between X and mean. Output of type Integer. errorflag=1 if an error occurred, errorflag=0 otherwise.
mean X D2 errorflag
709
(x )T 1 (x ) ,
6 x= 7 from the mean of a multivariate normal distribution with covariance matrix and mean of the vector
given by
3 1 = , 1 2
4 = 5 .
Imports System.Diagnostics Module MainModule Sub Main() Dim arand As New AMOSRANDOMLib6.AmosRanGen Dim Cov(2) As Double Dim Mean(1) As Double Cov(0) = 3 Cov(1) = 1 Cov(2) = 2 Mean(0) = 4 Mean(1) = 5 Dim Rank As Integer Dim sqrdet As Double Call arand.InstantSqrt(2, Cov(0), Rank, sqrdet) Dim D2 As Double Dim ef As Integer Dim x(1) As Double x(0) = 6 x(1) = 7 Call arand.MahalanobisD2(2, Cov(0), Mean(0), x(0), D2, ef) If ef = 0 Then Debug.WriteLine("Squared Mahalanobis distance = " & D2) Else Debug.WriteLine("Error") End If End Sub End Module
710
NextNormal Method
Gets a normally distributed random number that has mean 0 and standard deviation 1.
Syntax
result = object.NextNormal () The NextNormal method syntax has the following parts:
Part Description
result object
Remarks
NextNormal uses the NextUniform (see "NextUniform Method" on page 712) method.
711
712
NextUniform Method
Gets a random number that is uniformly distributed over the interval from 0 to 1.
Syntax
result = object.NextUniform () The NextUniform method syntax has the following parts:
Part Description
result object
713
714
RandomMoments Method
Gets a sample mean vector and covariance matrix from the population specified by SpecifyPopulation (see "SpecifyPopulation Method" on page 722).
Syntax
object.RandomMoments (Covariances, Means, NCases) The RandomMoments method syntax has the following parts:
Part
object Covariances
Description
An object of type AmosRanGen. Output array of type Double. Second order moment matrix from a sample of NCases observations. Use SecondMomentsType (see "SecondMomentsType Property" on page 693) to specify whether Covariances contains unbiased estimates of the population covariances, maximum likelihood estimates of the population covariances, or sums of squares and cross products about the sample mean. Covariances contains the first element of the first row, the first two elements of the second row, and so on. The first element of Covariances is passed by reference. Covariances must be dimensioned by the caller.
Means
Output array of type Double. The vector of sample means from a sample of NCases observations. The first element of Means is passed by reference. Means must be dimensioned by the caller. Input of type Integer. The number of observations.
NCases
715
3 1 = , 1 2
4 = 5 .
Then it draws a sample of 500 and displays the sample covariance matrix and mean vector. The unbiased estimate of the covariance matrix is displayed because the default value of SecondMomentsType (see "SecondMomentsType Property" on page 693) is UNBIASED.
Module MainModule Sub Main() Dim arand As New AMOSRANDOMLib6.AmosRanGen Dim PopCovariances(2) As Double Dim PopMeans(1) As Double PopCovariances(0) = 3 PopCovariances(1) = 1 PopCovariances(2) = 2 PopMeans(0) = 4 PopMeans(1) = 5 Call arand.SpecifyPopulation(PopCovariances, PopMeans) Dim SampleCovariances(2) As Double Dim SampleMeans(1) As Double Call arand.RandomMoments(SampleCovariances(0), SampleMeans(0), 2, 500) Dim ad As New AmosDebug.AmosDebug Call ad.PrintTriangle(SampleCovariances, "Sample Covariances") Call ad.PrintX(SampleMeans, "Sample Means") End Sub End Module
716
RandomVector Method
Gets a random vector from the population specified by SpecifyPopulation (see "SpecifyPopulation Method" on page 722).
Syntax
object.RandomVector (X) The RandomVector method syntax has the following parts:
Part
object X
Description
An object of type AmosRanGen. Output array of type Double. The random vector. The first element of X is passed by reference. It must be dimensioned by the caller.
717
3 1 = , 1 2
4 = 5 .
718
RestoreState Method
The RestoreState method is no longer supported. The random number generator can be placed in a reproducible state by using the NextSeed (see "NextSeed Method" on page 733) method of the CAmosSeedManager class to obtain a seed, and then using the Initialize (see "Initialize Method (AmosRanGen)" on page 698) method of the AmosRanGen class to initialize the random number generator.
719
RestoreStateFromFile Method
The RestoreStateFromFile method is no longer supported. The random number generator can be placed in a reproducible state by using the NextSeed (see "NextSeed Method" on page 733) method of the CAmosSeedManager class to obtain a seed, and then using the Initialize (see "Initialize Method (AmosRanGen)" on page 698) method of the AmosRanGen class to initialize the random number generator.
720
SaveState Method
The SaveState method is no longer supported. The random number generator can be placed in a reproducible state by using the NextSeed (see "NextSeed Method" on page 733) method of the CAmosSeedManager class to obtain a seed, and then using the Initialize (see "Initialize Method (AmosRanGen)" on page 698) method of the AmosRanGen class to initialize the random number generator.
721
SaveStateToFile Method
The SaveStateToFile method is no longer supported. The random number generator can be placed in a reproducible state by using the NextSeed (see "NextSeed Method" on page 733) method of the CAmosSeedManager class to obtain a seed, and then using the Initialize (see "Initialize Method (AmosRanGen)" on page 698) method of the AmosRanGen class to initialize the random number generator.
722
SpecifyPopulation Method
Specifies the population covariance matrix and mean vector used by RandomMoments (see "RandomMoments Method" on page 714), RandomVector (see "RandomVector Method" on page 716), Rank (see "Rank Property" on page 691), SqrDeterminant (see "SqrDeterminant Method" on page 724). and Sqrt (see "Sqrt Method" on page 726). The specified population covariance matrix must be non-negative definite.
Syntax
object.SpecifyPopulation (CovarianceMatrix, MeanVector) The SpecifyPopulation method syntax has the following parts:
Part
object CovarianceMatrix
Description
An object of type AmosRanGen. Input. One-dimensional array of type Double. CovarianceMatrix is the population covariance matrix. CovarianceMatrix contains the first element of the first row, the first two elements of the second row, and so on. CovarianceMatrix is passed as a 1-dimensional array of type Double. (Optional) Input. One-dimensional array of type Double. MeanVector is the population mean vector. MeanVector is passed as a 1-dimensional array of type Double. If MeanVector is omitted, the population mean vector is assumed to be zero.
MeanVector
723
3 1 = , 1 2
4 = 5 .
Then it displays the square root of the determinant of the covariance matrix.
Imports System.Diagnostics Module MainModule Sub Main() Dim arand As New AMOSRANDOMLib6.AmosRanGen Dim Covariances(2) As Double Dim Means(1) As Double Covariances(0) = 3 Covariances(1) = 1 Covariances(2) = 2 Means(0) = 4 Means(1) = 5 Call arand.SpecifyPopulation(Covariances, Means) Debug.WriteLine(arand.SqrDeterminant()) End Sub End Module
724
SqrDeterminant Method
Gets the square root of the determinant of the covariance matrix previously specified with SpecifyPopulation (see "SpecifyPopulation Method" on page 722).
Syntax
result = object.SqrDeterminant () The SqrDeterminant property syntax has the following parts:
Part
result object
Description
The square root of the determinant An object of type AmosRanGen.
725
3 1 = , 1 2
4 = 5 .
Then it displays the square root of the determinant of the covariance matrix.
Imports System.Diagnostics Module MainModule Sub Main() Dim arand As New AMOSRANDOMLib6.AmosRanGen Dim Covariances(2) As Double Dim Means(1) As Double Covariances(0) = 3 Covariances(1) = 1 Covariances(2) = 2 Means(0) = 4 Means(1) = 5 Call arand.SpecifyPopulation(Covariances, Means) Debug.WriteLine(arand.SqrDeterminant()) End Sub End Module
726
Sqrt Method
Gets the Cholesky square root of the population covariance matrix previously specified with SpecifyPopulation (see "SpecifyPopulation Method" on page 722).
Syntax
object.Sqrt (X) The Sqrt method syntax has the following parts:
Part Description
Output array of type Double. The Cholesky square root. The first element of X is passed by reference. It must be dimensioned by the caller.
727
3 1 = , 1 2
4 = 5 .
728
SVMult Method
Multiplies a symmetric matrix times a vector.
Syntax
object.SVMult(N, matrix, invector, outvector) The SVMult property syntax has the following parts:
Part
object N matrix
Description
An object of type AmosRanGen. Input of type Integer. The number of elements in the vector. Input array of array of length N*(N+1)/2, of type Double. matrix contains the first element of the first row, the first two elements of the second row, and so on. The first element of matrix is passed by reference. Input array of length N, of type Double. The first element of invector is passed by reference. Output array of length N, of type Double. The product of matrix times invector. The first element of outvector is passed by reference. outvector must be dimensioned by the caller.
invector outvector
Remarks
outvector must be distinct from invector.
729
730
TimingTest Method
Generates N uniform random numbers for performance testing.
Syntax
object.TimingTest(N) The TimingTest property syntax has the following parts:
Part
object N
Description
An object of type AmosRanGen. The number of random numbers to generate.
731
732
733
NextSeed Method
Gets a 32-bit integer value that your program can use as a random number seed. The value returned by NextSeed is determined by a rule that you specify by clicking ToolsSeed Manager on the Amos Graphics menu, or by clicking All ProgramsSPSS IncAmos 18Seed Manager on the Windows Start menu.
Syntax
object.NextSeed (AppName) The NextSeed property syntax has the following parts:
Part
object AppName
Description
An object of type CAmosSeedManager. A string that identifies your program.
734
735
PersistFile Method
Gets the name of the file in which CAmosSeedManager keeps a history of random number seeds returned by NextSeed. The file may be examined in a text editor, although the history of seed values is more easily viewed by clicking ToolsSeed Manager on the Amos Graphics menu, or by clicking All ProgramsSPSS IncAmos 18Seed Manager on the Windows Start menu.
Syntax
result = object.PersistFile () The PersistFile method syntax has the following parts:
Part
result object
Description
The name of the file that contains the history of random number seeds. An object of type CAmosSeedManager.
736
737
738
'Dtemp is the standardized RMR 'Display it Dim message As String message = "Model: " & ModelName & vbCrLf If status = 0 Then message &= "Standardized RMR = " & DTemp.ToString("#.0000") Else message &= ("The model was not successfully fitted.") End If MsgBox(message,,"Standardized RMR") End Sub Public Function Name() As String Implements IPlugin.Name End Function Public Function Description() As String Implements IPlugin.Description End Function End Class
739
Use the Amos Graphics classes to change the appearance of latent variables
Running the following Amos Graphics plugin modifies the appearance of latent variables. The Undraw (see "Undraw Method" on page 278) and Draw (see "Draw Method" on page 255) methods make the changes immediately visible. The UndoToHere (see "UndoToHere Method" on page 175) and UndoResume (see "UndoResume Method" on page 174) methods allow you to undo all the changes carried out by the program . The On Error GoTo statement is a safety measure to make sure that undo capability is with one press of restored before the program exits.
Imports AmosGraphics Imports System.drawing Public Class CustomCode Implements IPlugin Public Function Mainsub() As Integer Implements IPlugin.Mainsub Dim x As PDElement PathDiagrammer.UndoToHere() On Error Goto ErrExit For Each x In PathDiagrammer.PDElements If x.IsLatentVariable Then x.Undraw() x.BorderColor = Color.Black.ToArgb x.FillColor = Color.White.ToArgb x.NameColor = Color.Red.ToArgb x.ParameterColor = Color.Green.ToArgb x.Fillstyle = 0 x.Penwidth = 2 x.Draw() End If Next ErrExit: PathDiagrammer.UndoResume() End Function Public Function Name() As String Implements IPlugin.Name End Function Public Function Description() As String Implements IPlugin.Description End Function End Class
740
The following plugin uses the properties created by the previous plugin to compute an estimate of Performances error variance. If Reliability or Variance is undefined, PropertyGet (see "PropertyGet Method" on page 156) returns the non-numeric string, x. Attempting to perform arithmetic with the non-numeric string generates the error message Could not compute error variance.
Imports Microsoft.VisualBasic Imports AmosGraphics Public Class CustomCode Implements IPlugin Public Function Mainsub() As Integer Implements IPlugin.Mainsub Dim ErrorVariance As Double Try Dim E As PDElement = PathDiagrammer.PDE("Performance") ErrorVariance = (1 - E.PropertyGet("Reliability", "x")) _ * E.PropertyGet("Variance", "x") MsgBox("Error variance = " & ErrorVariance,, "Error variance") Catch ex As System.Exception MsgBox("Could not compute error variance.",, "Error variance") End Try End Function Public Function Name() As String Implements IPlugin.Name
Programming with Amos End Function Public Function Description() As String Implements IPlugin.Description End Function End Class
741
742
743
Imports Microsoft.VisualBasic Imports AmosGraphics Imports AmosGraphics.PathDiagrammer Public Class CustomCode Implements IPlugin Public Function Mainsub() As Integer Implements IPlugin.Mainsub If FileNew() Then Return 0 End If Dim E As PDElement 'Coordinates of variables Dim Y1 As Single, Y2 As Single, Y3 As Single, Y4 As Single Dim X1 As Single, X2 As Single, X3 As Single Y1 = 1 Y2 = 2 Y3 = 3 Y4 = 5 X1 = 1 X2 = 3 X3 = 4.5 'Height and width of variables Dim XHeight As Single, XWidth As Single XHeight = 0.5 XWidth = 0.7
'Draw the variables E = DiagramDrawObserved(X1, Y1, XWidth, XHeight) E.NameOrCaption = "Var1" E.NameFontSize = 16 E = DiagramDrawObserved(X1, Y2, XWidth, XHeight) E.NameOrCaption = "Var2" E.NameFontSize = 16 E = DiagramDrawObserved(X1, Y3, XWidth, XHeight) E.NameOrCaption = "Var3" E.NameFontSize = 16 E = DiagramDrawObserved(X2, Y2, XWidth, XHeight) E.NameOrCaption = "Var4" E.NameFontSize = 16 E = DiagramDrawUnobserved(X3, Y2, XWidth, XHeight) E.NameOrCaption = "Other" E.NameFontSize = 12 'Draw the paths DiagramDrawPath("Var1", "Var4") DiagramDrawPath("Var2", "Var4") DiagramDrawPath("Var3", "Var4") E = DiagramDrawPath("Other", "Var4") E.Value1 = 1
744
Amos 18 Programming Reference Guide E.ParameterFontSize = 14 'Draw the covariances DiagramDrawCovariance("var3", "var2") DiagramDrawCovariance("var2", "var1") DiagramDrawCovariance("var3", "var1")
'Improve the path diagram's appearance EditSelectAll() EditTouchUp("Var1") PathDiagrammer.Refresh() EditTouchUp("Var1") EditDeselectAll() EditFitToPage() End Function Public Function Name() As String Implements IPlugin.Name End Function Public Function Description() As String Implements IPlugin.Description End Function End Class
745
Imports Microsoft.VisualBasic Imports AmosGraphics Imports AmosEngineLib.AmosEngine.TMatrixID Public Class CustomCode Implements IPlugin Public Function Mainsub() As Integer Implements IPlugin.Mainsub Dim SelectedEx As New Collection Dim x As PDElement Dim i As Integer Dim j As Integer 'Construct the collection of selected, exogenous variables For Each x In PathDiagrammer.PDElements If x.IsSelected And x.IsExogenousVariable Then SelectedEx.Add(x) End If Next 'Draw the double-headed arrows For i = 1 To SelectedEx.Count For j = i + 1 To SelectedEx.Count x = PathDiagrammer.DiagramDrawCovariance(SelectedEx(i), SelectedEx(j)) x.IsSelected = True Next Next 'Try to improve the appearance of the path diagram If SelectedEx.Count > 0 Then PathDiagrammer.EditTouchUp(SelectedEx(1)) PathDiagrammer.EditTouchUp(SelectedEx(1)) End If 'The user will probably want to modify the curvature of the new 'double-headed arrows. PathDiagrammer.EditShapeOfObject() End Function Public Function Name() As String Implements IPlugin.Name End Function Public Function Description() As String Implements IPlugin.Description End Function End Class
746
Programming with Amos End If Next End Function Public Function Name() As String Implements IPlugin.Name End Function Public Function Description() As String Implements IPlugin.Description End Function End Class
747
748
Use the Amos Graphics classes to resize all rectangles in Amos Graphics
The following Amos Graphics plugin resizes each rectangle in the path diagram so that it is 1.4 times larger than the largest observed variable name. The Undraw (see "Undraw Method" on page 278) method hides each rectangle before the size changes, and the Draw (see "Draw Method" on page 255) method draws it after the change. The UndoToHere (see "UndoToHere Method" on page 175) / UndoResume (see "UndoResume Method" on page 174) method pair allows you to undo the changes by pressing
Imports AmosGraphics Imports AmosGraphics.PathDiagrammer Public Class CustomCode Implements IPlugin Public Function Mainsub() As Integer Implements IPlugin.Mainsub Dim x As PDElement Dim LargestWidth As Single, LargestHeight As Single LargestWidth = 0 LargestHeight = 0 For Each x In PDElements If x.IsObservedVariable Then If x.NameWidth > LargestWidth Then LargestWidth = x.NameWidth If x.NameHeight > LargestHeight Then LargestHeight = x.NameHeight End If Next LargestWidth = LargestWidth * 1.4 LargestHeight = LargestHeight * 1.4 UndoToHere() If LargestWidth > 0.2 And LargestHeight > 0.1 Then For Each x In PDElements If x.IsObservedVariable Then x.Width = LargestWidth x.Height = LargestHeight End If Next PathDiagrammer.Refresh() End If DiagramRedrawDiagram() UndoResume() End Function Public Function Name() As String Implements IPlugin.Name End Function Public Function Description() As String Implements IPlugin.Description End Function End Class
749
750
Examples using the AmosEngine class Use the AmosEngine class to evaluate derivatives numerically and display the results with the Amos Debug class
The following program fits the model of Example 8 and displays derivatives evaluated at the discrepancy function minimum. For purposes of comparison, approximate derivatives based on finite differences are also displayed.
Imports AmosEngineLib Module MainModule Dim Sem As New AmosEngine Dim ad As New AmosDebug.AmosDebug Sub Main() Dim Originalparameters() As Double Sem.BeginGroup(Sem.AmosDir & "Examples\UserGuide.xls", "Grnt_fem") Sem.AStructure("visperc = (1) spatial + (1) err_v") Sem.AStructure("cubes = (a) spatial + (1) err_c") Sem.AStructure("lozenges = (b) spatial + (1) err_l") Sem.AStructure("paragraph = (1) verbal + (1) err_p") Sem.AStructure("sentence = (c) verbal + (1) err_s") Sem.AStructure("wordmean = (d) verbal + (1) err_w") If (Sem.FitModel() = 0) Then 'Save parameter values so they can be restored Sem.ParameterVector(Originalparameters) TestDerivatives() 'Restore the parameter values and display them Sem.PutParameterVector(Originalparameters) ad.PrintX(Originalparameters, "Parameter values") End If Sem.Dispose() End Sub Sub TestDerivatives() Dim Ind As Integer, F As Double Dim G() As Double, GNumeric() As Double Dim H() As Double, HNumeric() As Double Sem.Evaluate2e(Ind, F, G, H) If Ind <> 0 Then Throw(New System.exception("Could not evaluate function and derivatives.")) End If NumericDerivatives(Sem, GNumeric, HNumeric) ad.DecimalPlaces = 8 ad.PrintX(G, "1st Derivatives") ad.PrintX(GNumeric, "Numerical 1st Derivatives") ad.PrintTriangle(H, "2nd Derivatives") ad.PrintTriangle(HNumeric, "Numerical 2nd Derivatives") End Sub
751
Sub NumericDerivatives(ByVal Sem As AmosEngine, ByRef GNumeric() As Double, ByRef HNumeric() As Double) Const Delta As Double = 0.0001 Dim NParams As Integer Dim FPlus As Double, FMinus As Double Dim FPP As Double, FMM As Double Dim FPM As Double, FMP As Double Dim i As Integer, j As Integer, k As Integer Dim DTempi As Double, DTempj As Double NParams = Sem.NumberOfParameters ReDim GNumeric(NParams - 1) ReDim HNumeric(NParams * (NParams + 1) \ 2 - 1) '1st Derivatives For i = 1 To NParams DTempi = Sem.ParameterValue(i) Sem.PutParameterValue(i, DTempi + Delta) FPlus = Evaluate() Sem.PutParameterValue(i, DTempi - Delta) FMinus = Evaluate() Sem.PutParameterValue(i, DTempi) GNumeric(i - 1) = (FPlus - FMinus) / (2 * Delta) Next '2nd Derivatives k=0 For i = 1 To NParams For j = 1 To i DTempi = Sem.ParameterValue(i) DTempj = Sem.ParameterValue(j) If i = j Then FPM = Evaluate() FMP = FPM Sem.PutParameterValue(i, DTempi + 2 * Delta) FPP = Evaluate() Sem.PutParameterValue(i, DTempi - 2 * Delta) FMM = Evaluate() Else Sem.PutParameterValue(i, DTempi + Delta) Sem.PutParameterValue(j, DTempj + Delta) FPP = Evaluate() Sem.PutParameterValue(j, DTempj - Delta) FPM = Evaluate() Sem.PutParameterValue(i, DTempi - Delta) FMM = Evaluate() Sem.PutParameterValue(j, DTempj + Delta) FMP = Evaluate() End If Sem.PutParameterValue(i, DTempi) Sem.PutParameterValue(j, DTempj) HNumeric(k) = (FPP + FMM - FPM - FMP) / (4 * Delta ^ 2) k=k+1 Next
752
Next End Sub Function Evaluate() As Double Dim Ind As Integer Dim F As Double Sem.Evaluate0(Ind, F) If Ind <> 0 Then Throw(New System.Exception("Could not evaluate function.")) End If Evaluate = F End Function End Module
753
754
Amos 18 Programming Reference Guide Sem.GetEstimates(SampleMeans, Means) 'Means() is now a 2-dimensional array with 1 row, 'but a 1-dimensional array of means is required. ReDim VectorMeans(NVariables - 1) For i = 0 To NVariables - 1 VectorMeans(i) = Means(0, i) Next End If 'Test for scale-invariance For i = 0 To NVariables - 1 ScaleOneVariable(Covariances, i, ScaleFactor) If Sem.IsModelingMeansAndIntercepts() Then Sem.PutSampleMoments(Covariances, VectorMeans) Else Sem.PutSampleCovariances(Covariances) End If If Math.Abs(MinimumDiscrepancy(Sem) - BaselineF) > Eps Then IsScaleSensitive = True Debug.WriteLine( _ "The model is probably sensitive to the scale of " & VariableNames(i)) End If ScaleOneVariable(Covariances, i, 1 / ScaleFactor) Next If Not IsScaleSensitive Then Debug.WriteLine("The model is probably scale-invariant.") End If
'Test for location-invariance If Sem.IsModelingMeansAndIntercepts() Then Dim DTemp As Double For i = 0 To NVariables - 1 DTemp = VectorMeans(i) VectorMeans(i) = VectorMeans(i) + LocationShift Sem.PutSampleMoments(Covariances, VectorMeans) If Math.Abs(MinimumDiscrepancy(Sem) - BaselineF) > Eps Then IsLocationSensitive = True Debug.WriteLine( _ "Model is probably sensitive to the location of " & VariableNames(i)) End If VectorMeans(i) = DTemp Next If Not IsLocationSensitive Then Debug.WriteLine("Model is probably location-invariant.") End If End If End Sub Sub ScaleOneVariable(ByVal ScaledCovariances(,) As Double, ByVal k As Integer, ByVal ScaleFactor As Double) Dim i As Integer Dim NVariables As Integer NVariables = UBound(ScaledCovariances, 1) + 1 For i = 0 To NVariables - 1 ScaledCovariances(i, k) = ScaledCovariances(i, k) * ScaleFactor
Programming with Amos ScaledCovariances(k, i) = ScaledCovariances(k, i) * ScaleFactor Next End Sub Function MinimumDiscrepancy(ByVal Sem As AmosEngine) As Double If Sem.FitModel() <> 0 Then Throw(New exception("Could not fit model.")) End If MinimumDiscrepancy = Sem.Cmin() End Function Sub SpecifyModel(ByVal Sem As AmosEngine) 'Example 8 Sem.BeginGroup(Sem.AmosDir & "Examples\UserGuide.xls", "Grnt_fem") Sem.AStructure("visperc = (1) spatial + (1) err_v") Sem.AStructure("cubes = (a) spatial + (1) err_c") Sem.AStructure("lozenges = (b) spatial + (1) err_l") Sem.AStructure("paragraph = (1) verbal + (1) err_p") Sem.AStructure("sentence = (c) verbal + (1) err_s") Sem.AStructure("wordmean = (d) verbal + (1) err_w") End Sub End Module
755
757
Index
A
AboutToShowMsgBox Event 2, 189 AboutToShowMsgBox Event Example 189, 190 Accuracy of the bootstrap 337 Additional Programming Examples 738 Adf Method 281, 293, 315, 322, 369, 374, 376, 402, 458, 491, 615, 638 Adf Method Example 294 Admissible Method 286, 295, 462, 593, 609, 621 Admissible Method Example 296 Advantages of the bootstrap 337 AllImpliedMoments Method 281, 297, 334, 362, 366, 462, 623 AllImpliedMoments Method Example 298 AllowUnidentified Method 281, 299, 534 AllowUnidentified Method Example 300 Amos Graphics Class Reference 32 AmosDebug Class Reference 667 AmosDir Property 34, 281, 284, 286, 290 AmosDir Property Example 291 AmosEngine Class Members 288 AmosEngine Class Reference 280 AmosMatrix Class Members 652 AmosMatrix Class Reference 420, 422, 437, 438, 447, 449, 455, 456, 651, 679, 681 AmosRanGen Class Members 688 AmosRanGen Class Reference 688 AmwFileName Method 44 AmwFileRead Event 191 AmwFileRead Event Example 191, 192 AmwFileWritten Event 193 AmwFileWritten Event Example 193, 194 AnalyzeBayesianEstimation Method 45 AnalyzeCalculateEstimates Method 46 AnalyzeDataImputation 47 AnalyzeDegreesOfFreedom Method 48 AnalyzeManageGroups Method 49 AnalyzeManageGroupsAdd Method 50 AnalyzeManageGroupsDelete Method 51 AnalyzeManageGroupsRename Method 52 AnalyzeManageModels Method 53 AnalyzeModelingLab Method 54 AnalyzeMultipleGroupAnalysis Method 55 AnalyzeSpecificationSearch Method 56 AnalyzeToggleObservedUnobserved Method 57 AnyMissingValues Method 286, 301, 470 AnyMissingValues Method Example 302 Arbuckle, J.L. 580 AStructure Method 284, 303, 372, 479, 494, 497, 499, 507, 575, 596, 642 AStructure Method Example 304
B
BeginGroup Method 284, 309, 312, 460 BeginGroup Method Example 310 BeginGroupEx Method 284, 309, 311, 382, 384, 460 BeginGroupEx Method Example 313 Bollen, K. A. 538 Bollen, K.A. 317, 319 BootAdf Method 281, 293, 314, 325, 328, 331, 334, 341, 611 BootAdf Method Example 316 BootBS Method 281, 317, 334, 611 BootBS Method Example 318 BootFactor Method 281, 321, 334 BootFactor Method Example 321, 323, 331 BootGls Method 281, 315, 324, 328, 331, 334, 341, 458, 611 BootGls Method Example 326 BootMl Method 281, 315, 325, 327, 331, 334, 341, 491, 611 BootMl Method Example 329 BootSls Method 281, 315, 325, 328, 330, 341, 611, 615 BootSls Method Example 332 Bootstrap 314, 321, 324, 327, 330, 340 sample 314, 321, 324, 327, 330, 340 Bootstrap error messages 339 Bootstrap Method 281, 315, 317, 321, 322, 325, 328, 331, 333, 339, 341, 343, 362, 366, 417, 422, 425, 444, 449, 452, 456, 504, 580, 611
758
Index
Bootstrap Method Example 336 Bootstrap Method Specifics 337 BootUls Method 281, 315, 325, 328, 331, 334, 340, 638 BootUls Method Example 342 BootVerify Method 281, 315, 317, 322, 325, 328, 331, 334, 341, 343, 611 BootVerify Method Example 344 BorderColor Property 214 Browne, M. W. 345 Browne, M.W. 293, 577, 754 BuildNumber Method 58 ButtonPressed Event 195 ButtonPressed Event Example 197, 198
C
Calculating Custom Estimands 12, 31 CAmosSeedManager Class Members 732 CAmosSeedManager Class Reference 732 CanRespond Method 59 CanRespond Method Example 59, 60 Changes in the drawing of path diagrams 2 Changes to the object model (for programmers) 2 Changes to the Program 3, 6 ChiCorrect Method 281, 345, 390 ChiCorrect Method Example 347 ChiSquareProbability Method 281, 284, 286, 348 ChiSquareProbability Method Example 349 CholeskyEpsilon Property 690, 707 CholeskyEpsilon Property Example 691 ChversInPlace Method 697 ChversInPlace Method Example 698 Class Reference 31 Clear Method 674 ClickMouse Method 61 Cmin Method 286, 346, 350, 408 Cmin Method Example 1 351 Cmin Method Example 2 352 ColumnName Property 653 ColumnName Property Example 654 ColumnNames Method 286, 353, 358, 422, 438, 449, 456 ColumnNames Method Example 355 ColumnNumber Property 655 ColumnNumber Property Example 656 ColumnNumbers Method 286, 354, 357, 422, 438, 449, 456 ColumnNumbers Method Example 359
Computational cost of the bootstrap 339 ConfidenceBC Method 281, 322, 334, 361, 366, 417, 422 ConfidenceBC Method Example 363 ConfidencePC Method 281, 322, 334, 362, 365, 444, 449 ConfidencePC Method Example 366, 367 Convert a path diagram to a Visual Basic program 1 Copy and paste path diagrams 1 CopyAnalysisPropertiesTo Method 62 Corest Method 281, 369, 374, 376 Corest Method Example 370 Cov Method 284, 303, 371, 373, 494, 496, 497, 576, 596, 643 Cov Method Example 373 Covariance 321, 466, 468 sample 321, 466, 468 Covariances 306 Covest Method 281, 369, 374, 376 Covest Method Example 375 Crdiff Method 281, 369, 374, 376 Crdiff Method Example 377 Crit1 Method 281, 338, 378, 380, 402, 483, 626, 632 Crit1 Method Example 379 Crit2 Method 281, 338, 378, 380, 402, 483, 626, 632 Crit2 Method Example 381 Cudeck, R. 577
D
Data sets 538 grnt_fem.amd 538 DataFileNCases Method 284, 382, 384 DataFileNCases Method Example 383 DataFileNVariables Method 284, 382, 384 DataFileNVariables Method Example 385 DecimalPlaces Property 669 DecimalPlaces Property Example 670 Df Method 286, 386, 541 Df Method Example 1 387 Df Method Example 2 388 DiagramDrawCovariance Method 63 DiagramDrawIndicatorVariable Method 64 DiagramDrawIndicatorVariable Method Example 37, 64, 65, 160 DiagramDrawObserved Method 66 DiagramDrawPath Method 67 DiagramDrawUniqueVariable Method 68
Index
759
DiagramDrawUniqueVariable Method Example 68, 69 DiagramDrawUnobserved Method 70 DiagramFigureCaption Method 71 DiagramLoupe Method 72 DiagramRedrawDiagram Method 73 DiagramScroll Method 74 DiagramScroll Method Example 74, 75, 118 DiagramZoom Method 76 DiagramZoom Method Example 76, 77, 235, 236 DiagramZoomIn Method 78 DiagramZoomIn Method Example 78, 79, 82 DiagramZoomOut Method 80 DiagramZoomOut Method Example 80, 81 DiagramZoomPage Method 82 Dir Property 290 Dir Property Example 291 Discussion of Example 503, 538, 582 Discussion of the example 319, 364, 366, 368, 496 DisplayInputPD Method 83, 84 DisplayOutputPD Method 83, 84 Dispose Method 286, 389 Divgi, D.R. 321 Dolker, M. 321 DoubleClickMouse Method 85 DragMouse Method 86 Draw Method 229, 239, 256, 740, 749
E
EditCopy Method 87 EditCopy Method Example 87, 88 EditDeselectAll Method 89 EditDragProperties Method 90 EditDuplicate Method 92 EditErase Method 93 EditFitToPage Method 94 EditLink Method 95 EditMove Method 96 EditMoveParameter Method 97 EditPaste Method 98 EditRedo Method 99 EditReflect Method 100 EditRotate Method 101 EditRotate Method Example 101, 102 EditSelect Method 104, 225 EditSelectAll Method 105, 225 EditShapeOfObject Method 106 EditSpaceHorizontally Method 107
EditSpaceVertically Method 108 EditTouchUp Method 109 EditUndo Method 99, 110 Efron, B. 333, 337, 365, 504, 512 Emulisrel6 Method 281, 345, 390 Emulisrel6 Method Example 391 EnableDisplay Method 281, 392 EnableUserInteraction Method 111 EnableUserInteraction2 Method 112 EnableUserInteraction2 Method Example 112, 113 Enhanced growth curve plugin 2 Estimate1 Property 215 Estimate2 Property 216 Evaluate0 and EvaluateEx0 Methods 286, 393 Evaluate1 and EvaluateEx1 Methods 286, 394 Evaluate2a and EvaluateEx2a Methods 286, 395, 650 Evaluate2a and EvaluateEx2a methods example 396, 650, 680 Evaluate2e and EvaluateEx2e Methods 286, 397, 650 Evaluate2e and EvaluateEx2e methods example 399 Events 12, 188 Examples using the Amos Graphics classes 738 Examples using the AmosEngine class 751 Extended explanation of the AStructure method 303, 305 Extended explanation of the Structure method 305
F
FactorScoreWeights Method 282, 334, 362, 366, 400 FactorScoreWeights Method Example 401 FieldWidth Property 671 FieldWidth Property Example 672 FileDataFiles Method 114 FileExit Method 115 FileNew Method 116 FileNewWithTemplate Method 117 FileOpen Method 118 FilePrint Method 119 FileRetrieveBackup Method 120 FileSave Method 121 FileSaveAs Method 122 FileSaveAsTemplate Method 123 FillColor Property 217, 218 FillStyle Property 2, 217, 218
760
Index
Fisher Method 282, 378, 380, 402, 483, 626, 632 Fisher Method Example 403 FitAllModels Method 286, 301, 404, 408 FitAllModels Method Example 405 FitMLMoments Method 282, 406, 410, 466, 468 FitMLMoments Method Example 407 FitModel Method 286, 301, 404, 408, 589, 590, 591, 592 FitModel Method Example 409 FitUnbiasedMoments Method 282, 406, 410, 466, 468, 609 FitUnbiasedMoments Method Example 411 Fixed Method 675 Fixed Method Example 676 Fox, J. 636 Fuller, W.A. 741
G
GenerateDefaultCovariances Method 282, 372, 412 GenerateDefaultCovariances Method Example 1 413 GenerateDefaultCovariances Method Example 2 414 GetBCLowerBounds, GetBCUpperBounds Methods 286, 334, 362, 366, 415, 422, 425, 514, 515 GetBCLowerBounds, GetBCUpperBounds Methods Example 418 GetBCLowerBoundsEx, GetBCUpperBoundsEx Methods 286, 420 GetBCLowerBoundsEx, GetBCUpperBoundsEx Methods Example 423 GetBootSampleEstimates Method 286, 334, 343, 417, 424, 518, 519 GetBootSampleEstimates Method Example 426 GetButton Method 124, 128, 161 GetCheckBox Example 1 126 GetCheckBox Example 2 127 GetCheckBox Method 125, 128, 161 GetControl Method 128 GetDataFile Method 284, 428 GetDataFile Method Example 430 GetDataFile Method Example (PathDiagrammer class) 129, 130 GetDataFile Method of the PathDiagrammer class 129 GetEstimate Method 431, 434
GetEstimates Method 286, 393, 394, 395, 397, 400, 408, 417, 425, 432, 433, 438, 452, 456, 522, 523, 559 GetEstimates Method Example 435 GetEstimatesEx Method 286, 393, 394, 395, 397, 432, 434, 437, 559 GetEstimatesEx Method Example 439 GetGroupName Method 284, 286, 440 GetGroupName Method Example 441 GetModels Method 131 GetModels Method Example 131, 132 GetNGroups Method 133 GetPCLowerBounds, GetPCUpperBounds Methods 286, 334, 417, 425, 442, 449, 526, 527 GetPCLowerBounds, GetPCUpperBounds Methods Example 445 GetPCLowerBoundsEx, GetPCUpperBoundsEx Methods 286, 447 GetPCLowerBoundsEx, GetPCUpperBoundsEx Methods Example 450 GetRadioButton Method 128, 134, 161 GetStandardErrors Method 286, 334, 417, 425, 432, 434, 438, 451, 456, 530, 531 GetStandardErrors Method Example 453 GetStandardErrorsEx Method 287, 452, 455 GetStandardErrorsEx Method Example 457 GetTextBox Method 128, 135, 161 Getting Started 2 GlobalGolden Method 168 GlobalMoveTools Method 167 GlobalOutline Method 170 GlobalShowMenu Method 136 GlobalShowTools Method 137 GlobalSmart Method 172 GlobalSquare Method 173 Gls Method 282, 293, 322, 325, 369, 374, 376, 402, 458, 491, 615, 638 Gls Method Example 459 grnt_fem.amd (data set) 538 Group 1 Declarative methods 210, 281 Group 2 Data and model specification methods 284 Group 3 Methods for retrieving results 209, 286 GroupName Method 284, 309, 312, 460 GroupName Method Example 461 GroupSelect Method 138
Index
761
H
Halperin, S. 321 Height Property 219 HelpAmosOnTheWeb Method 140 HelpContents Method 141 Hershberger, S. 582 Hide Method 677 HighlightArrows Method 142 Highlighted Property 224 HighlightNothing Method 143 Hill, I.D. 619 Hinkley, D.F. 512
I
Identifiability constraints and the bootstrap 339 Idle Event 199 ImpliedMoments Method 282, 297, 334, 362, 366, 462, 593, 609, 623 ImpliedMoments Method Example 463 Improvements in the drawing of path diagrams 1 Improvements to the Program Editor 1 Initial values for the bootstrap 338 Initialize Method (AmosEngine) 280, 288, 464, 628 Initialize Method (AmosRanGen) 699, 719, 720, 721, 722 Initialize Method Example 465, 700 InputMLMoments Method 282, 406, 410, 466, 468 InputMLMoments Method Example 467 InputUnbiasedMoments Method 282, 406, 410, 466, 468, 609 InputUnbiasedMoments Method Example 469 InputVariableHasMissingValues Method 284, 301, 470 InputVariableHasMissingValues Method Example 471 InputVariableIsNumeric Method 284, 472 InputVariableIsNumeric Method Example 473 InputVariableLabel Method 284, 474, 476 InputVariableLabel Method Example 475 InputVariableName Method 284, 474, 476 InputVariableName Method Example 477 InstantRandomVector Method 701, 703 InstantRandomVector Method Example 702 InstantRandomVectorEx Method 701, 703 InstantRandomVectorEx Method Example 704
InstantSolve Method 705 InstantSolve Method Example 706 InstantSqrt Method 690, 707 InstantSqrt Method Example 708 Intercept Method 284, 303, 372, 478, 479, 488, 489, 494, 497, 499, 507, 596 Intercept Method Example 480 InterfacePropertiesApplyClick Method 144 Interrupt Method 287, 481 InvalidateOutput Method 145 InvisibleName Property 220 InvisibleParameters Property 221 InvisiblePicture Property 222 InvisiblePicture Property Example 220, 221, 222, 223 IsCaption Method 257 IsCaption Property 257 IsCovariance Method 258 IsCovariance Method Example 41, 258, 259 IsCovariance Property 258 IsCovariance Property Example 259 IsDirtyAmp Method 146 IsDirtyAmw Method 147 IsEndogenousVariable Method 260 IsEndogenousVariable Method Example 260, 261 IsEndogenousVariable Property 260 IsEndogenousVariable Property Example 261 IsExogenousVariable Method 262 IsExogenousVariable Method Example 262, 263 IsExogenousVariable Property 262 IsExogenousVariable Property Example 263 IsHighlighted Property 2, 224 IsLatentVariable Method 264 IsLatentVariable Property 264 IsModelingMeansAndIntercepts Method 287, 482 IsObservedVariable Method 265 IsObservedVariable Method Example 73, 265, 266 IsObservedVariable Property 265 IsObservedVariable Property Example 266 IsPath Method 267 IsPath Method Example 267, 268 IsPath Property 267 IsPath Property Example 268 IsSelected Property 2, 225 IsUniqueVariable Method 269 IsUniqueVariable Method Example 269, 270
762
Index
IsUniqueVariable Property 269 IsUniqueVariable Property Example 270 IsUnobservedVariable Method 271 IsUnobservedVariable Method Example 271, 272 IsUnobservedVariable Property 271 IsUnobservedVariable Property Example 272 IsVariable Method 273 IsVariable Method Example 273, 274 IsVariable Property 273 IsVariable Property Example 274 Iterations Method 282, 378, 380, 402, 483, 626, 632 Iterations Method Example 484
J
Jreskog, K.G. 390, 496, 501, 581, 582, 586
K
Kaplan, D. 503 KeepOnTop Method 678 Kendall, M.G. 402
L
Lee, S. 582 LineLength Method 282, 485 LongLabel Property 226
M
MacCallum, R.C. 582 MahalanobisD2 Method 709 MahalanobisD2 Method Example 710 Mardia, K.V. 538 MaxDecimalPlaces Method 282, 486, 614 Mean level model 345 Mean Method 284, 303, 372, 479, 480, 487, 494, 497, 499, 507, 596 Mean Method Example 489 Means and intercept model 345 Means modeling 345 Methods 43, 255, 292, 673, 696, 733 MinDecimalPlaces Method 282, 490, 614 Mixture Modeling 5 Mixture Modeling, Clustering, and Discriminant Analysis 5 Ml Method 282, 293, 328, 369, 374, 376, 402, 458, 491, 615, 638 Ml Method Example 492 Model 345
mean level 345 Model Method 284, 350, 351, 352, 386, 387, 388, 404, 409, 493, 509, 510, 511, 541, 542, 543, 548, 556, 557, 558, 577, 578, 579, 595, 596, 598, 599, 600 Model Method Example 495 ModelAdd Method 148 ModelDelete Method 149 ModelFitCalculateEstimates Method 46 ModelFitDegreesOfFreedom Method 48 ModelFitManageGroups Method 49 ModelFitManageGroupsAdd Method 50 ModelFitManageGroupsDelete Method 51 ModelFitManageGroupsRename Method 52 ModelFitManageModels Method 53 ModelFitManageModelsDelete Method 149 ModelFitModelingLab Method 54 ModelFitToggleObservedUnobserved Method 57 ModelMeansAndIntercepts Method 282, 479, 488, 499, 507 ModelMeansAndIntercepts Method Example 500 ModelRedefine Method 150 ModelSelect Method 151 ModelSelect Method Example 149, 151, 152 Mods Method 282, 501 Mods Method Example 502 MonteCarlo Method 282, 334, 335, 362, 366, 504 MonteCarlo Method Example 505 MouseDown and MouseUp Events Example 203 MouseDown Event 200 MouseDown Event Example 201 MouseUp Event 202 MouseUp Event Example 115, 187, 200, 202, 203, 212, 257 Mstructure Method 506 MStructure Method 284, 303, 372, 488, 494, 497, 499, 506, 596 Mstructure Method Example 508 MStructure Method Example 508
N
NameColor Property 227 NameFontBold Property 228 NameFontBold Property Example 228, 229, 230 NameFontItalic Property 230 NameFontSize Property 231
Index
763
NameHeight Property 232 NameOrCaption Property 233 NameWidth Property 234 NColumns Property 657 NColumns Property Example 658 Ncp, NcpLo and NcpHi Methods Example 1 510 Ncp, NcpLo and NcpHi Methods Example 2 511 Ncp, NcpLo, NcpHi Methods 287, 509 NeedBCLowerBounds, NeedBCUpperBounds Methods 282, 362, 366, 416, 417, 421, 514 NeedBCLowerBounds, NeedBCUpperBounds Methods Example 516 NeedBootSampleEstimates Method 282, 343, 425, 518 NeedBootSampleEstimates Method Example 520 NeedEstimates Method 282, 354, 358, 400, 432, 434, 438, 522, 545, 551, 602, 606 NeedEstimates Method Example 524 NeedPCLowerBounds, NeedPCUpperBounds Methods 282, 443, 448, 526 NeedPCLowerBounds, NeedPCUpperBounds Methods Example 528 NeedStandardErrors Method 282, 452, 456, 530 NeedStandardErrors Method Example 532 New in Amos 16 5 New in Amos 17 1 New in Amos 18 1 New PathDiagrammer method, EditPaste 3 New PathDiagrammer method, ToolsWriteAProgram 3 NewObjectCreated Event 204 NextNormal Method 711 NextNormal Method Example 712 NextSeed Method 719, 720, 721, 722, 734 NextSeed Method Example 735 NextUniform Method 711, 713 NextUniform Method Example 714 NGroups Property 35 NGroups Property Example 35, 36 NonPositive Method 282, 299, 534 NonPositive Method Example 535 NormalityCheck Method 282, 536 NormalityCheck Method Example 537, 538 NotReady Property 37 Npar Method 287, 386, 541 Npar Method Example 1 542 Npar Method Example 2 543
NRows Property 659 NRows Property Example 660 NumberOfColumns Method 544 NumberOfGroups Method 287, 546 NumberOfGroups Method Example 547 NumberOfParameters Method 287, 548, 588 NumberOfParameters Method Example 549 NumberOfRows Method 550 NumberOfVariables Method 287, 552 NumberOfVariables Method Example 553
O
ObjectEntered Event 205 Observed variable 400, 538 ObservedInfo Method 282, 512 ObservedInfo Method Example 513 OpenWindowsUpdated Event 206 OriginX Property 86, 235 OriginY Property 86, 236 OutputIsInvalid Event 207 OVariableCount Method 284, 554, 640, 644 OVariableCount Method Example 555
P
P Method 287, 348, 556 P Method Example 1 557 P Method Example 2 558 PackSymmetricEstimates Method 282, 559 PageHeight Property 38 PageHeight Property Example 38, 39, 40 PageLength Method 283, 560 PageWidth Property 40 Paginate Method 283, 561 Parameter 321 estimate 321 ParameterColor Property 237 ParameterCovariance Method 287, 562 ParameterCovariance Method Example 563 ParameterFontBold Property 238 ParameterFontBold Property Example 238, 239, 240 ParameterFontItalic Property 240 ParameterFontSize Property 241 ParameterFormat Property 242 ParameterFormat Property Example 243, 244 ParameterInfo Method 287, 565 ParameterInfo Method Example 566 ParameterName Method 287, 562, 565, 568, 572 ParameterName Method Example 569
764
Index
ParameterNumber Method 287, 562, 565, 568, 570, 572 ParameterNumber Method Example 571 ParameterOrientation Property 245 ParameterOrientation Property Example 245, 246 ParameterValue Method 287, 393, 394, 395, 398, 562, 565, 572 ParameterValue Method Example 573 ParameterVector Method 287, 393, 394, 395, 398, 574 Path Method 284, 303, 372, 373, 480, 489, 494, 496, 497, 575, 596, 643 Path Method Example 576 PathDiagrammer Class Members 32 Pclose Method 287, 577 Pclose Method Example 1 578 Pclose Method Example 2 579 PDChanged Event 208 PDE Method 153 PDE Method Example 153, 154 PDElement Class Members 212 PDElements Property 41 Penwidth Property 247 Permute Method 283, 580, 585, 611 Permute Method Example 581 PermuteDetail Method 283, 580, 584, 585 PermuteDetail Method Example 586 PersistFile Method 736 PersistFile Method Example 737 PluginsPlugins Method 155 PopAllButtons Method 156 Population 466, 468, 538 covariance 466, 468, 538 PostFitResults Event 209 PreFitOptions Event 210 PrintTranspose Method 679 PrintTriangle Method 680 PrintX Method 681 PrintX, PrintTranspose, PrintTriangle Methods Example 679, 680, 682 Programming Tools 2 Programming with Amos 1 ProjectName Property 42 Properties 33, 213, 289, 652, 668, 689 PropertyGet Method 157, 159, 275, 277, 278, 741 PropertyRemove Method 158, 276 PropertyRemove Method Example 276, 277 PropertySave Method 157, 159, 275, 278, 741
Providing initial values 307 PutParameterValue Method 287, 393, 394, 395, 398, 587 PutParameterVector Method 287, 393, 394, 395, 398, 588 PutSampleCovariances Method 287, 589, 590 PutSampleCovariancesPacked Method 287, 590 PutSampleMoments Method 287, 589, 591 PutSampleMomentsPacked Method 287, 590, 592
Q
QueryUnload Event Method 211 Quitting Event 212
R
RandomMoments Method 694, 715, 723 RandomMoments Method Example 716 RandomVector Method 701, 703, 717, 723 RandomVector Method Example 718 Rank Property 692, 723 Rank Property Example 693 Refresh Method 160 Regression equations 305 Regression weights 305 Regression Weights 305 ResidualMoments Method 283, 297, 462, 593, 609 ResidualMoments Method Example 594 RestoreState Method 719 RestoreStateFromFile Method 720 ReviseModel Method 287, 595 ReviseModel Method Example 597 Rmsea, RmseaLo and RmseaHi Methods Example 1 599 Rmsea, RmseaLo and RmseaHi Methods Example 2 600 Rmsea, RmseaLo, RmseaHi Methods 287, 408, 598 RowName Property 661 RowName Property Example 662 RowNames Method 287, 354, 358, 422, 438, 449, 456, 601 RowNames Method Example 603 RowNumber Property 663 RowNumber Property Example 664 RowNumbers Method 287, 354, 358, 422, 438, 449, 456, 605 RowNumbers Method Example 607
Index
765
S
Sample 321, 466, 468 covariance 321, 466, 468 SampleMoments Method 283, 297, 334, 362, 366, 462, 593, 609, 623 SampleMoments Method Example 610 Saris, W.E. 503 Satorra, A. 503 SaveState Method 721 SaveStateToFile Method 722 Scientific Method 684 Scientific Method Example 685 SecondMomentsType Property 694, 715, 716 SecondMomentsType Property Example 695 Seed Method 283, 315, 317, 322, 325, 328, 331, 335, 341, 343, 504, 611 Seed Method Example 612 Selected Property 225 SetControl Method 161 SetDataFile Method 162 SetDataFile Method Example 163, 164 Show Method 686 Shutdown Method 288, 464, 613 SignificantFigures Method 283, 614 Sls Method 283, 293, 331, 337, 402, 458, 491, 615, 638 Sls Method Example 616 Smc Method 283, 334, 362, 366, 617 Smc Method Example 618 Srbom, D. 390, 496, 501, 503, 581, 582, 586 Special Case 288 Specify a default value for the 'All groups' check box 2 SpecifyModel Method 165 SpecifyModel Method Example 165, 166 SpecifyPopulation Method 690, 692, 715, 717, 723, 725, 727 SpecifyPopulation Method Example 724 Specran Method 283, 619 Specran Method Example 620 SqrDeterminant Method 723, 725 SqrDeterminant Method Example 726 Sqrt Method 723, 727 Sqrt Method Example 728 Stable Method 288, 295, 621 Stable Method Example 622 Standardized Method 283, 297, 334, 362, 366, 462, 623, 636 Standardized Method Example 624
Stelzl, I. 582 Stine, R.A. 317, 319 Structure Method 303 Structure Method Example 304 Stuart, A. 402 SVMult Method 729 SVMult Method Example 730 Swain, A. J. 345
T
TableOutput Method 283, 625 Technical Method 283, 378, 380, 402, 483, 626, 632 Technical Method Example 627 TermX Property 248 TermY Property 249 TextOutput Method 283, 284, 288, 297, 464, 465, 625, 628, 630, 634 TextOutput Method Example 629 TextOutputFileName Method 283, 464, 630 TextOutputFileName Method Example 631 TextOutputFileNameMethod Example 631 Tibshirani, R.J. 504 Time Method 283, 378, 380, 402, 483, 626, 632 Time Method Example 633 Timing is Everything 209, 210, 280 TimingTest Method 731 TimingTest Method Example 731 Title Method 283, 634 Title Method Example 635 ToolsCustomize 136, 137, 167 ToolsGolden Method 168 ToolsListFont Method 169 ToolsOutline Method 170 ToolsSeedManager Method 171 ToolsSmart Method 172 ToolsSquare Method 173 ToolsWriteAProgram Method 174 TotalEffects Method 283, 334, 362, 366, 623, 636 TotalEffects Method Example 637
U
Uls Method 283, 293, 337, 341, 402, 458, 491, 615, 638 Uls Method Example 639 UndoResume Method 154, 175, 176, 223, 229, 239, 246, 259, 261, 263, 266, 268, 270, 272, 274, 740, 749
766
Index
UndoToHere Method 154, 175, 176, 223, 229, 239, 246, 259, 261, 263, 266, 268, 270, 272, 274, 740, 749 Undraw Method 229, 239, 279, 740, 749 Unload Method 687 Unobserved variable 400 Use the Amos Graphics classes to calculate a new fit measure 2, 209, 210, 738 Use the Amos Graphics classes to change the appearance of latent variables 2, 175, 176, 214, 217, 227, 237, 247, 256, 264, 279, 740 Use the Amos Graphics classes to create user-defined properties 275, 278, 741 Use the Amos Graphics classes to draw a path diagram 2, 63, 66, 67, 70, 89, 94, 105, 109, 116, 231, 233, 241, 250, 743 Use the Amos Graphics classes to draw double-headed arrows 2, 106, 225, 746 Use the Amos Graphics classes to name unobserved variables 2, 747 Use the Amos Graphics classes to resize all rectangles in Amos Graphics 2, 219, 232, 234, 254, 749 Use the AmosEngine class to evaluate derivatives numerically and display the results with the Amos Debug class 393, 394, 398, 574, 587, 588, 751 Use the AmosEngine class to test for scale- and location-invariance 482, 589, 591, 754 UVariableCount Method 284, 554, 640, 644 UVariableCount Method Example 641
ViewAnalysisProperties Method 177 ViewFullScreen Method 178 ViewInterfaceProperties Method 179 ViewMatrixRepresentation Method 180 ViewObjectProperties Method 181 ViewParameters Method 182 ViewTextOutput Method 183 ViewVariablesInDataset Method 184 ViewVariablesInModel Method 185
W
Warren, R.D. 741 WasInverted Method 288, 397, 650 Wheaton, B. 496, 581, 586 White, J.K. 741 Wichman, B.A. 619 Width Property 254 Window Method 2, 186 Wothke, W. 534 Writing a Main Program that Uses Amos 1, 3 Writing a Main Program with Amos's Built-in Editor 3 Writing a Main Program with Visual Studio 2003 3, 4 Writing a Plugin for Amos Graphics 12 Writing a Plugin with Amos's Built-in Editor 13 Writing a Plugin with Visual Studio 2003 3, 22 Writing Classes that are Used by Amos 1, 12
X
X Property 665 X Property Example 666 XYObject Method 187
V
Value1 Property 250 Value2 Property 251 Var Method 284, 303, 372, 373, 494, 496, 497, 576, 596, 642 Var Method Example 643 Variable 400, 538 observed 400, 538 unobserved 400 Variable1 Property 252 Variable2 Property 253 VariableCount Method 285, 554, 640, 644 VariableCount Method Example 645 VariableName Method 288, 565, 646 VariableName Method Example 647 VariableNumber Method 288, 648 VariableNumber Method Example 649 Variances 307