matrixLOR: Creating A Probability Matrix With Specified Local Odds...

Description Usage Arguments Details Value Warning Author(s) See Also Examples

View source: R/matrixLOR.R

Description

Utility function to create a square probability matrix that satisfies the specified local odds ratios structure.

Usage

1

Arguments

x

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

Details

This function is designed to ease the construction of the LORterm argument in the functions nomLORgee and ordLORgee.

Value

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

Warning

Caution is needed for local odds ratios close to zero.

Author(s)

Anestis Touloumis

See Also

nomLORgee and ordLORgee.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## 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.fixed <- ordLORgee(y~factor(trt)+factor(time)+factor(baseline),data=arthritis,
                id=id,repeated=time,LORstr="fixed",LORterm=lorterm)
fitmod.fixed

multgee documentation built on July 12, 2017, 1:02 a.m.

Search within the multgee package
Search all R packages, documentation and source code