15.0 MLOGLIN Command The MLOGLIN program can solve a system of up to 69 endogenous variables, each of which can have up to 20 (unordered) categories. If your model contains one dichotomous endogenous variable, use the PROBIT command. If your model has one endogenous variable with up to 10 ordered categories, use the MPROBIT command. If your model has up to 4 dichotomous variables, use the LOGLIN command. While the MLOGLIN command could be used in many of the above cases, it would be more expensive. The MLOGLIN program currently runs only the XLOGLIN program which is an improved version of MLOGLIN. References for MLOGLIN and XLOGLIN are: - Nerlove and Press "Univariate and Multivariate Log-Linear Models, 1973, Rand - Nerlove and Press "Multivriate Log-Linear Probability Models for the Analysis of Qualitative Data," Discussion paper number 1, 1976, Northwestern University - Kawasaki, Seiichi, "Manual to accompany LOGLIN 31". unpublished manuscript, Northwestern University 1978. - Kawasaki, Seiichi, "Applications of Log-Linear Probability Models in Econometrics", Unpublished PhD Dissertation, 1979, Northwestern University. - Klein, Ruben and Klein, Telma, "XLOGLIN, An Improved Program for Multivariate Logistic Regression," unpublished manuscript Department of Statistics University of California Riverside 1988. - Klein, Telma, " Manual for XLOGLIN," Department of Statistics, University of California Riverside 1988. Form of MLOGLIN command. B34SEXEC MLOGLIN options parameters $ MODEL Yvar1 Yvar2 Yvar3 = Xvar1 Xvar2 Xvar3 Xvar4 $ LEVEL Yvar1(name1,name2, ) Yvar2(name1,name2,..) Yvar3(name1,..)$ INITB=(value1,value2,... ) $ VALUES X1(value) X2(value) $ ELAST VALUES(n1) EVARS(Xvark) $ BASISSUP=n1 SIZE = n2 $ GSUPP TYPE=key INDEX=n1 START=n2 SIZE= n3 $ SCALE X1(value) X2(value) $ B34SEEND $ The MODEL and LEVEL sentences are required. There can be more than one VALUES, ELAST, BASISSUP and GSUPP sentences. The scale sentence is only valid for XLOGLIN. If MLOGLIN is run, this sentence is ignored. Options on MLOGLIN sentence. OUTOFCORE - Runs MLOGLIN out of core to save space. The OUTOFCORE option is not recommended unless space is a problem. LISTIT - Lists iterations. ISKIP - Suspend the automatic termination of iteration by convergence criterion. IZER - Suppress analytical convergence calculation when initial values are all zero. Parameters on MLOGLIN sentence BASIS = key If key = DCBASIS, the Deviation-Contrast Basis is used. If key = ZBASIS, the 0-1 basis is used. This is the default. COV = key If key = DPF, the D-P-F Covariance calculation is used. If key = ANAL, the analytical covariance calculation is used. This is the default. If key = NUMERIC, the numerical covariance calculation is used. If key = INFORMATION, the information matrix covariance calculation is used. LIMIT=n1 - Sets the maximum number of iterations. Default = 25. IP=n2 - If n2 = 0, the endogenous variable is coded 1,2,3. If n2 = 1, the endogenous variable is coded 0,1,2. The default is n2=0. IS2=key If key = SUPPALL, all exogenous effects on interactions are suppressed. This is the default. If key = ONLYLOWER(n3), n3 = the size of extra lower order interactions to be estimated. All higher order (above n3) interactions will be suppressed. If key = NOSUPP, there is no systematic suppression of exogenous effects on interactions. ICOV=key If key = SUPP, suppress printing of covariance matrix. This is the default. If key = PRINT, the covariance matrix will be printed. IBEGIN=n3 Sets first observation for data analysis. Default=1. IEND=n4 Sets last observation for data analysis. Default=NOOB. MODEL sentence. MODEL Y1 Y2 Y3 = X1 X2 X3 $ For MLOGLIN the number of exogenous and endogenous variables must sum to LE 69. The MODEL sentence is required. LEVEL sentence. LEVEL Y1(name1,name2,..) Y2(name1,name2) $ The LEVEL sentence stores the names of the categories of the Y variables. If Y1 has 5 categories, then 5-1 = 4 names must be supplied. Each name has a maximum of 8 characters. The last level for each endogenous variable is not specified. The LEVEL sentence is required. INITB sentence. INITB=(value1,value2,.. ) $ The INITB sentence allows the user to specify initial values for the parameters. It is usually not needed. MLOGLIN has a max of 110 parameters. VALUES sentence. VALUES X1(value) X2(value) $ The VALUES sentence specifies the exogenous variables for which values are to be specified. There can be up to 30 VALUES sentences in a MLOGLIN paragraph. The MLOGLIN VALUES sentence is implemented differently than the MEANS sentence in the PROBIT command. If there were 7 exogonenous variables the following commands VALUES X1(5.0) X5(110.0) $ VALUES X3(4.0) X6(66.0) $ would calculate expected values of the Y variables for two cases. In the first X2, X3, X4, X6, X7 would take on mean values and X1 = 5.0 and X5 = 110.0. In the second case X1, X2, X4, X5, X7 take on mean values while X3=4.0 and X6=66.0 . P(i)(X1=5.0,X2=X2BAR,X3=X3BAR,X4=X4BAR,X5=110.0,X6=X6BAR,X7=X7BAR) P(i)(X1=X1BAR,X2=X2BAR,X3=4.0,X4=X4BAR,X5=X5BAR,X6=66.0,X7=X7BAR) ELAST sentence. ELAST VALUES(n1) EVARS(Xvar1,Xvar2) $ The ELAST sentence can only be used if the VALUES sentence is used. The ELAST sentence allows elasticities of P(i) to be calculated with respect to the desired variables, at the values specified in the VALUES sentence. There can be up to 30 ELAST sentences. VALUES(n1) sets the VALUES sentence number for which elasticity is to be calculated. EVARS(Xvar1..) sets the X variables to use to calculate the elasticities. A max of 10 can be set. For example, given the above VALUES sentences n1 can take on the values 1 or 2. ELAST VALUES(1) EVARS(X1) $ ELAST VALUES(2) EVARS(X3,X4) $ calculates (dP(i)/dX1)(X1/P(i)) f(1) (dP(i)/dX3)(X3/P(i)) f(2) (dP(i)/dX4)(X4/P(i)) f(2) where f(1) =(X1=5.0,X2=X2BAR,X3=X3BAR,X4=X4BAR,X5=110.0,X6=X6BAR,X7=X7BAR) f(2) =(X1=X1BAR,X2=X2BAR,X3=4.0,X4=X4BAR,X5=X5BAR,X6=66.0,X7=X7BAR) BASISSUP sentence. BASISSUP=n1 SIZE=n2 $ The BASISSUP sentence allows suppression of basis - vector groups. There is a maximum of 10 BASISSUP sentences. n1 = index of the starting point of the group. n2 = size of the group to be suppressed. Assume three endogenous variables (A,B,C) of a 2 x 2 x 2 design. If it is desired to suppress the effects A1, (A1-B1), (A1-C1) and (A1-B1-C1), then three BASISSUP sentences are needed. BASISSUP=1 SIZE=1 $ BASISSUP=4 SIZE=2 $ BASISSUP=7 SIZE=1 $ Given that the order of the basis in MLOGIT is: A1, B1, C1, (A1-B1), (A1-C1), (B1-C1), (A1-B1-C1) the first BASISSUP sentence suppresses A1, the second (A1-B1) and (A1-C1) and the third (A1-B1-C1). GSUPP sentence. GSUPP TYPE=key INDEX=n1 START=n2 SIZE=n3 $ The GSUPP sentence allows group suppression. There can be up to 15 GSUPP sentences in the MLOGLIN paragraph. TYPE = key If key = COL, will suppress part of column. If key = ROW, will suppress part of row. INDEX=n1 The integer n1 sets the index of the column/row that is suppressed. START=n2 The integer n2 sets the index of the starting point of the row/column. SIZE=n3 The integer n3 sets the size of the group suppressed. Note: Assume two endogenous variables, A and B, with three exogenous variables. Given that one basis vector (A1-B1) has been suppressed with a BASISSUP sentence, if there are two GSUPP sentences of the form: GSUPP TYPE=ROW INDEX=2 START=1 SIZE=2 $ GSUPP TYPE=COL INDEX=4 START=3 SIZE=2 $ the interactions respesented by the X's in the table below will be suppressed. A1 A2 B1 A2-B1 CONSTANT X1 XXXXXXXXXXXXXXXXXXX X2 XXXXXXX X3 XXXXXXX SCALE sentence. SCALE X1(value) X2(value) $ The SCALE sentence allows scaling of the exogenous variables in XLOGLIN. If the SCALE sentence is present, not all exogenous variables have to be supplied. When the SCALE sentence is used, all results are in terms of the scaled variables. Note: It is important not to try to scale the endogenous variables. The purpose of the SCALE sentence is to avoid computer round off problems associated with exogenous variables that are markedly different in size. The sentence SCALE X(.2) $ would multiply X1 by .2 . Scaling the data in the SAS Data step or the B34S data step is probably a better idea than using the SCALE sentence. Sample job where Y1 has 2 categories and Y2 has three categories. b34sexec mloglin ip=0 icov=print$ model y1 y2 = x1 x2 x3 x4 $ level y1(female) y2(lowy,middley) $ b34seend$