matrixLOR {multgee} | R Documentation |
Utility function to create a square probability matrix that satisfies the specified local odds ratios structure.
matrixLOR(x)
x |
a square matrix with positive entries that describes the desired local odds ratios matrix. |
It is designed to ease the construction of the argument LORterm
in the nomLORgee and ordLORgee functions.
Returns a square probability matrix that satisfies the local odds
ratios structure defined by x
.
Caution is needed for local odds ratios close to zero.
Anestis Touloumis
## Illustrating the construction of a "fixed" local odds ratios structure ## using the arthritis dataset. Here, we assume a uniform local odds ratios ## structure equal to 2 for each time pair. ## Create the uniform local odds ratios structure. lorterm <- matrixLOR(matrix(2, 4, 4)) ## Create the LORterm argument. lorterm <- c(lorterm) lorterm <- matrix(c(lorterm), 3, 25, TRUE) ## Fit the marginal model. data(arthritis) fitmod <- ordLORgee(y ~ factor(trt) + factor(time) + factor(baseline), data = arthritis, id = id, repeated = time, LORstr = "fixed", LORterm = lorterm) fitmod