@ R2ABQ10.CMD -- Random A-B probit model with two random parameters: catch and FCA, and deterministic multiplicative differentials for each of the parameters for fish species and FCA levels. Quadrature is used for approximation. Sept. 29, 1999 @ @ Standard deviations of catch and FCA parameters vary in proportion to their means @ @ TEN evaluation points @ new; library maxlik; clear xdif; output file = R2ABQ10.OUT reset; "R2ABQ10.CMD. This is the random A-B probit model with two random variables, the catch & FCA parameters. For different species and FCA levels, a deterministic multiplicative component is used, resulting in standard deviations that vary in proportion to the means for the random parameters. Quadrature is used for approximation using TEN evaluation points. Sept. 29, 1999."; /* Model Selection: choice of explanatory variables */ let kvec = 1 2 3 4 5 6 7 8 9 10 11 12 13; /* 1-4 are the catch rates for four species: perch, salmonids, walleye, bass; 5-12 are the FCA dummies for categories 2-9; 13 is the launch fee */ /* Choose which parameter(s) to make random. rvec should be the same length as kvec. All elements with a one will have the same random component. Then the random parameters will be scaled up or down by a deterministic multiplicative component */ let rvec1 = 1 1 1 1 0 0 0 0 0 0 0 0 0; let rvec2 = 0 0 0 0 1 1 1 1 1 1 1 1 0; /* Choose the number of quadrature points (2-10) */ npoints = 10; /* Choose the starting values */ @ if strtflag eq 0; start with adjusted NRAB parameters @ @ if strtflag eq 1; start with nonrandom probit @ strtflag = 1; /* Z is an n x 9 matrix. Its rows are the individuals. The first eight columns are the results of the paired comparisons (1 or 2). If the respondent did not choose, then a 0 is entered. The ninth row contains the version number (1-10). Z is used to form Xdif, or the differences in characteristics. */ loadm Z[647, 9] = Z.dat; n = rows(Z); Xdif = zeros(8*n,rows(kvec)); y1 = zeros(10,9); y2 = zeros(10,9); w1 = zeros(10,9); w2 = zeros(10,9); /* X is a 160 x 13 matrix of characteristics of the choices. Its rows are arranged by version (1-10), then choice pair (1-8), then choice (A or B). Its columns are the four fish catch rates; the FCA dummies (eight dummies for categories 2-9); and the launch fee. There are 16 lines for each version. The first two lines of the 16 are pair 1 alternative A and pair 1 alternative B; the next two lines are for pair 2, the next two are for pair 3, and so on... */ loadm X[160, 13] = X.dat; " Estimation uses X.dat."; /* The following loop creates the matrix Xdif, dimension 8n x 13, where n is the number of individuals, and there are 13 explanatory variables in the model. */ ll=0; i=0; do while i