nomLORgee(formula = formula, data = data, id = id, repeated = repeated,
bstart = NULL, LORstr = "time.exch", LORem = "3way", LORterm = NULL,
add = 0, homogeneous = TRUE, control = LORgee.control(),
ipfp.ctrl = ipfp.control(), IM = "solve")formula, id and repeated arguments.independence", "time.exch", "RC" or "fixed".3way") or seperately at each level pair of repeated ("2way").LORstr is "fixed".LORstr is "time.exch" or "RC".ipfp function.solve", "qr.solve" or "cholesky".data must be provided in a subject level or equivalently in `long' format. See details about the `long' format in the reshape function.
A term of the form offset(expression) is allowed in the formula.
The id and the repeated do not need to be pre-sorted. Instead the function reshapes data in an ascending order of id and repeated.
The default set for the response categories is $1,\ldots,I$, where $I>2$ is the maximum observed response category. If otherwise, the function recodes the observed response categories onto this set.
The default set for the levels of repeated is $1,\ldots,T$, where $T$ is the number of observed levels. If otherwise, the function recodes the observed levels onto this set.
The $I$-th response category is treated as baseline.
The linear predictor is of the form
$$\beta_{0j} +\beta^{'}_j x_{it}$$
where $\beta_{0j}$ is the $j$-th intercept, $\beta_j$ is the $j$-th response category specific parameter vector and $x_{it}$ is the covariate vector for the $i$-th subject at the $t$-th level of repeated.
The LORterm argument must be an $L$ x $I^2$ matrix, where $L$ is the number of level pairs of repeated. These are ordered as $(1,2), (1,3), ...,(1,T), (2,3),...,(T-1,T)$ and the rows of LORterm are supposed to preserve this order. Each row is assumed to contain the vectorized form of a probability table that satisfies the desired local odds ratios structure.data(housing)
data <- housing
fitmod <- nomLORgee(y~factor(time)*sec, id="id",repeated="time",data=data)
summary(fitmod)
coef(fitmod)Run the code above in your browser using DataLab