444
Example 29
The skeleton program contains a subroutine and a function. You have no control over
when the subroutine and the function are called. They are called by Amos.
Amos calls your DeclareEstimands subroutine once to find out how many new
quantities (estimands) you want to estimate and what you want to call them.
Amos calls your CalculateEstimands function repeatedly. Each time your
CalculateEstimands function is called, Amos has to calculate the value of your
custom estimands for a given set of parameter values.
Only the first line of the
DeclareEstimands subroutine is shown initially.
E To display all of the lines, double-click Sub DeclareEstimands or click the + sign in the
little box at the beginning of the line.
You need to replace the placeholder
‘TODO: Your code goes here with lines that specify
how many new quantities you want to estimate and what you want to call them. For
this example, we want to estimate the difference between the direct effect of ses on
71_alienation and the corresponding indirect effect. We will also write code for