Writing bootstrap sample values to a file
You can create a user-defined estimand that has the side effect of writing results to a file for each bootstrap sample. You can, for example, write a file that contains the sample correlation between two variables for each bootstrap sample.
Another possibility is to write parameter estimates for each
bootstrap sample. For example, the file
Write
Bootstrap Samples.AmosEstimandVB
defines an estimand that has the side effect of creating a file
called bootstrapsamplevalues.txt in the Documents folder. The file
contains the following three values for each bootstrap sample.
- The value of the parameter named A.
- The value of the parameter named B.
- The value of the parameter named A times the value of the parameter named B.
In order to use this estimand:
- Download the file "Write Bootstrap Samples.AmosEstimandVB" to any folder.
- Open Amos Graphics.
- Draw a path diagram or open an existing path diagram.
- Make sure that the path diagram has a parameter named A and a parameter named B.
- Click the status bar at the bottom of the path diagram window. A menu will pop up.
- On the pop-up menu, click Select an estimand.
- In the Open an existing user-defined estimand window, select the file Write Bootstrap Samples.AmosEstimandVB.
- Notice that the status bar at the bottom of the path diagram window displays Estimating Write Bootstrap Samples.
- Put a check mark next to View->Analysis Properties->Bootstrap->Perform bootstrap.
- If your data file contains sample moments (not raw data), put a check mark next to View->Analysis Properties->Bootstrap->Monte Carlo.
- On the Amos Graphics menu, click Analyze->Calculate Estimates.
- Open the Documents folder and view the output in the file bootstrapsamplevalues.txt.
Hint:
When you view the file Write Bootstrap Samples.AmosEstimandVB in Amos's Program Editor, an important part of the file is initially hidden. To see the hidden part, click the "+" symbol next to "Advanced" as shown in the following figure.