data
), (ii) a model formula (formula
), (iii) a subject identifier variable (id
) and (iv) a vector that identifies the order of observations within each subject (repeated
). Note that data
must contain id
, repeated
and any variable present in formula
.
Options for the marginal model in ordLORgee include cumulative link models or an adjacent category logit model, determined by the argument link
. A marginal baseline category logit model is offered in nomLORgee. See the help files of nomLORgee and ordLORgee for the form of the linear predictor.
The association structure among the correlated multinomial responses is expressed via local odds ratios (Touloumis, Agresti and Kateri, 2012). The estimating procedure for the local odds ratios can be summarized as follows: For each level pair of the repeated
variable, the responses are aggregated across subjects to form a square marginalized contingency table.
Treating these tables as independent, the argument LORem
indicates whether a model for counts is fitted either seperately to each marginalized contingency table ("2way
") or simultaneously to the full marginalized contingency table ("3way
"). The model applied to the counts is the RC-G model proposed by Becker and Clogg (1989) and it belongs to the family of association models developed by Goodman (1981).
The argument LORstr
determines the form of the local odds ratios structure.
If the underlying association pattern does not change dramatically across the level pairs of repeated
then a simple form for the local odds ratios should be a sufficient approximation for the association structure. To assess this, one might compare the intrinsic parameters of an RC-G model. See the utility function intrinsic.pars for more details.
Alternatively a user-defined local odds ratios structure can be provided if LORstr
is "fixed
". In this case, the utility function matrixLOR is useful in constructing the required LORterm
.data(arthritis)
data <- arthritis
fitord <- ordLORgee(y~factor(trt)+factor(time)+factor(baseline),
id="id",repeated="time",data=data)
summary(fitord)
data(housing)
data <- housing
fitnom <- nomLORgee(y~factor(time)*sec, id="id",repeated="time",data=data)
summary(fitnom)
Run the code above in your browser using DataLab