Learn R Programming

multgee (version 1.0)

matrixLOR: Creating A Probability Matrix With Specified Local Odds Ratios

Description

Utility function to create a square probability matrix with a specified local odds ratios structure.

Usage

matrixLOR(x)

Arguments

x
a square matrix with positive entries that describes the desired local odds ratios matrix.

Value

  • Returns a square probability matrix that satisfies the local odds ratios structure described by x.

Warning

Caution is needed for local odds ratios close to zero.

Details

This function is designed to ease the construction of a fixed local odds ratios structure in the functions nomLORgee or ordLORgee. See also the example.

See Also

nomLORgee and ordLORgee.

Examples

Run this code
Illustrating the construction of a "fixed" local odds ratio 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)
data(arthritis)
fitmod.fixed <- ordLORgee(y~factor(trt)+factor(time)+factor(baseline), id="id",
                 repeated="time", data=arthritis, LORstr="fixed", LORterm=lorterm)
fitmod.fixed

Run the code above in your browser using DataLab