------------------------------------------------------------------------------- help forrc2John Hendrickx -------------------------------------------------------------------------------

Goodman's row and column model 2

Syntax

rc2varlist[ifexp] [inrange] [weight],row(varname)colvarname)[muby(varlist)muby3(string)eqnormniter(#)rctol(#)debug

Description

rc2estimates Goodman's log-multiplicative Row and Columns model 2.This model is a variation on a regular loglinear model. Asigmascale is estimated for the row variable, aphiscale is estimated for the column variable, and amuparameter indicates the scaled association between the two variables.

Options

rowthe row variable(required)

colthe column variable(required)

mubya list of factors by which themuparameter will vary

muby3specify an interaction between the mu parameter and other variables using the xi3 command. The xi3 command must be installed first; xi3 is available from the ssc archives.muby3must specify the dummies that are to interact withmuusing validxi3syntax, e.g.muby3("e.groupvar")Themubyoption is ignored ifmuyb3is used.

eqspecifies an equality constraint onsigmaandphi. This option requires that the row and column variable both have the same number of categories. The default is noeq.

normThe optionnonormsuppresses printing of the normalizedphiandsigmascales (mean 0, sum of squares 1). The default isnorm.

niterspecifies the maximum number of iterations for estimating the model. The default is 20.

rctolspecifies the convergence criterion for estimating the model. The default is .0001.

debugprints intermediate results to assist in debugging. The default isnodebug.

UsageYou must estimate a baseline loglinear model using either poisson or glm with a log link and the poission family before running

rc2. Usually the baseline model will be either an independence model or a quasi- independence model. The dummies in the baseline model can be created using xi, xi3, desmat or any other method.Goodman's rc2 model has the following form:

log(F[ij]) = <baseline model> + sigma[i]*mu*phi[j]

Where

F[ij]indicates the expected frequencies of the model,iindexes the categories of the row variable, andjindexes the categories of the column variable.sigma[i]indicates the estimated scale values for the row variable,phi[j]indicates the estimated scale values for the column variable.muindicates the scaled association between the row and column variable.Two values of

sigma[i]andphi[j]must be fixed to identify the model.rc2fixes the first category to 0 and the highest category to 1 while estimating the model. For the final model, thesigmaandphiscales are also reported using the restriction that they sum to 0 and have a sum of squares of 1. Printing of these normalized scale values can be suppressed using thenonormoption.The rc2 model contains both linear and multiplicative parameters. Therefore, it cannot be estimated in a straightforward fashion. However, given scale values for

sigma, the model simplifies to a regular loglinear model and values for mu*phi[j] can be estimated. Likewise, given scale values forphi, values for mu*sigma[i] can be estimated.

rc2estimates the model in this fashion, takingsigmaas given and estimatingphi, then taking the updated values ofphias given and estimatingsigma. This continues until the improvement in fit between subsequent loglinear models is less thanrctol(default .0001) or the number of iterations exceedsniter(default 10).Note that due to the estimation procedure used, the standard errors for coefficients are conditional on the

sigmaandphiscale values. In addition, the degrees of freedom reported bypoissonare not correct, since they do not take the estimatedsigmaandphicoefficients into account. Refer to theModelsummaryat the end of the output for the correct degrees of freedom and other goodness of fit statistics.

ExampleThis example is taken from Hout (1983: 56-65).

/* Table in Hout (1983: 11). Original source: page 49 of */ /* Featherman D.L., R.M. Hauser. (1978) "Opportunity and Change." */ /* New York: Academic. */ #delimit ; tabi 1414 521 302 643 40 \ 724 524 254 703 48 \ 798 648 856 1676 108 \ 756 914 771 3325 237 \ 409 357 441 1611 1832 ,replace; #delimit cr

rename row father rename col son rename pop freq

label var father "Father's occupation" label var son "Son's occupation" #delimit ; label def occ 1 "Upper nonmanual" 2 "Lower nonmanual" 3 "Upper manual" 4 "Lower manual" 5 "Farm"; #delimit cr label val father occ label val son occ

xi: glm freq i.father i.son, family(poisson) link(log) rc2 , row(father) col(son) rc2 , row(father) col(son) eq

gen diag=(father==son)*father xi: poisson freq i.father i.son i.diag rc2 , row(father) col(son) rc2 , row(father) col(son) eq

RemarksThe rc2 model can also be estimated as a multinomial logistic regression model using mclest. The mcl package is available from the ssc archives.

mclestwill be somewhat faster thanrc2for large tables because it does not have to estimate the main effects of the row variable or interactions of the row variable with group variables. If these effects are not of interest, thenmclestcould be used instead ofrc2. Note thatmclestalso works for non-aggregated data. The example above can be estimated withmclestas follows:mclgen son xi: mclest i.son [fw=freq],rc2(father) xi: mclest i.son [fw=freq],eqrc2(father) gen diag=(father==son)*father xi: mclest i.son i.diag [fw=freq],rc2(father) xi: mclest i.son i.diag [fw=freq],eqrc2(father)

The unidiff program by Maurizio Pisati, University of Trento, Italy, can estimate uniform layer effect models. Use findit unidiff to obtain the program.

LEMis a standalone program for Windows computers by Jeroen Vermunt, Tilburg University, the Netherlands. LEM is a fast and flexible tool for estimating rc2 models (as well as latent class and a wide array of other models).LEMis available at http://www.uvt.nl/faculteiten/fsw/organisatie/departementen/mto/software2.html

Saved resultsIn addition to the results saved by poisson,

rc2saves the following matrices:

e(sig)the sigma scale with the first category fixed to 0, the last to 1

e(phi)the phi scale with the first category fixed to 0, the last to 1

e(sig_n)the sigma scale with mean 0 and sum of squares 1

e(phi_n)the phi scale with mean 0 and sum of squares 1

e(df_m)the model degrees of freedom adjusted for the sigma and phi parameters

e(deviance)the deviance as calculated by poisgof

e(df)the residual degrees of freedom, also adjusted for the sigma and phi parameters

e(ll_b)the log likelihood of the baseline model

e(df_b)the model degrees of freedom of the baseline model

e(model)"rc2" or "eqrc2", depending on theeqoption

e(b)ande(V)contain the estimates and variance- covariance for the normalized solution, unless thenonormoption was used. The values for the model using the zero-one constraints can be obtained using "estimates unhold c0_1".

rc2defines the following global macros that persist between runs ofrc2:

$RC_depvarThe dependent variable of the baseline model

$RC_baseThe independent variables of the baseline model

ReferencesGoodman, Leo A. (1979). Multiplicative models for the analysis of occupational mobility tables and other kinds of cross-classification tables.

AmericanJournal of Sociology84: 804-819.Goodman, Leo A. (1984).

The analysis of cross-classified data having orderedcategories. Cambridge, Mass.: Harvard University Press.Hout, Michael. (1983).

Mobility Tables. Sage Publication 07-031.Xie, Yu (2003). Association Model. In the

Encyclopedia of Social ScienceResearch Methods, edited by Michael Lewis-Beck, Alan Bryman and Tim Futing Liao. Thousand Oaks, Ca: Sage (2003).http://www-personal.umich.edu/~yuxie/Research/Assoc-program.html

Also seeDirect comments to: John Hendrickx

rc2 is available from the ssc archives. Use findit

rc2to locate the latest version.The packages mcl, desmat, xi3, are also available from the ssc archives. Use findit unidiff to obtain

unidiff.On-line: help for poisson, poisgof, glm, mclgen, mclest, unidiff, desmat, desrep, xi, xi3