| aML Code | Function | Comments |
|---|---|---|
| dsn = pdrcov . dat ; | Reads data formatted for aML | The steps for creating data in the apropriate format are described in the aML manual |
|
define regressor set Beta ; var = 1 (site==2) (site==3) (site==4) race (cohort==2) (cohort==3) (year - 4) ; define regressor set Gamma ; var = 1 . . . (year - 4) ; |
Specifies a set of regression coefficients corresponding to each variable listed | There are two vectors of coefficients corresponding to Equations 1 and 2 in the text aML uses the convention “(X==x)” to create a dummy variable for each value of the variable X |
|
define regressor set Beta1 ; var = 1 ; define regressor set Gamma1 ; var = 1 ; |
Specifies coefficients for treatment status | These are not included in the vectors beta and gamma for clarity (separate parameters are also required for the multigroup framework as described below) |
|
define normal distribution ; dim=1 ; name=epsC ; define normal distribution ; dim=1 ; name=epsT ; define normal distribution ; dim= 1 ; number of integration points=10 ; name=muC ; define normal distribution ; dim= 1 ; number of integration points=10 ; name=muT ; |
Specifies the error distributions used in Equations 1 and 2 | Epsilon and mu are specified twice, once each for the treatment and control groups— doing so allows for heteroscedasticity between the two groups The “dim” option specifies the dimension of the distribution; the errors are all univariate |
|
define parameter lambdaC ; define parameter lambdaT ; |
Specifies the selection parameters | |
|
continuous model ; keep if (male==0) and (miss==0) and (trt==0) ; outcome = pdr ; model = regset Beta + intres (draw=_id, ref=muC) + res (draw=_iid, ref=epsC) ; |
Specifies Equation 1 for the control group The “keep” command subsets the data |
This model is for girls (male==0) Only those cases with nonmissing data (miss=0) contribute to the likelihood function for the outcome variable This portion of the likelihood pertains to the comparison group (trt==0) The “draw” parameter specifies that muC and epsC are person-specific and time-varying errors, respectively |
|
probit model ; keep if (ma1e==0) and (trt== 0) ; outcome=(miss==0) ; model = regset Gamma + par lambdaC * intres (draw=_id, ref= muC) ; |
Specifies Equation 2 for the control group | The model is a probit as described in the text; the outcome is participation (miss==0) One can see that participation depends on muC as described in the text; because this model is for the control group, only one of the lambda terms appears The N(0, 1) error is implicit and included by aML without explicit specification |
|
continuous model ; keep if (male==0) and (miss==0) and (trt==1) ; outcome = pdr ; model = regset Beta + regset Beta1 + intres (draw=_id, ref=muT) + res(draw=_iid, ref=epsT) ; probit model ; keep if (male==0) and (trt==1) ; outcome=(miss==0) ; model = regset Gamma + regset Gamma1 + par lambdaC * intres (draw=_id, ref=muT)+ par lambdaT * intres (draw=_id, ref= muT) ; |
Specifies Equations 1 and 2 for the treatment group (trt==1) | One can see that both lambda terms appear in the second equation Beta1 and Gamma1 appear only in the equations for the treatment group; they capture the impact of treatment in the outcome and participation equations (in effect, these coefficients represent constants in the multigroup model and so capture the impact of group membership) |
| starting values ; . . . . . ; | Specifies starting values |
NOTE: The program code is specified in three sections. After reading in the data, the first specifies the model components (regression coefficients, error distributions, and any additional parameters). The second specifies the equations used to calculate the likelihood function. The third section specifies starting values.