.- help for ^coding^ (STB-58: sxd2) .- Orders the strata formed by different levels of dependent variable and first stage covariates ------------------------------------------------------------------------- ^coding^ depvar [first stage vars] Description ------------ The @coding@ function orders the strata formed by different levels of the dependent variable and first stage covariates. This is the order in which the vector of first stage sample sizes or prevalences must be entered before calling @msnprev@, @optfixn@, @optbud@ and @optprec@. The @coding@ function creates a variable called ^grp_yz^ which contains the distinct groups formed by different levels of the dependent variable (Y) and first stage covariates (Z). A list is returned by @coding@ indicating the definition of each stratum. For calls to @msnprev@, @optfixn@, @optbud@ and @optprec@, the first-stage sample sizes or prevalences must be entered following the order of ^grp_yz^. Example -------- As an illustration, we provide the pilot data described in Table 1 of Reilly (Am. J. Epi, 143, 92-100, 1996): . ^use pilotcas^ . ^coding mort sex^ [get the different strata formed by levels of dependent variable (mort) and first stage covariates (sex)] gives the output: ============OUTPUT OF CODING FUNCTION============ grp_yz mort sex grp_z nobs 1 0 0 1 25 2 0 1 2 25 3 1 0 1 25 4 1 1 2 25 for functions requiring first stage sample sizes/prevalences enter these in the order of grp_yz ============END OF CODING FUNCTION=============== Author ------ Marie Reilly, Dept. of Epidemiology & Public Health and Agus Salim, Dept. of Statistics, University College Cork, Cork, Ireland marie.reilly@@ucc.ie Also see -------- STB: STB-58: sxd2 Manual: [R] logit, glm On-line: help for @logit@, @glm@, @msnprev@, @optfixn@, @optbud@, @optprec@