clogistCalc: Conditional Logistic Regression fit

clogistCalcR Documentation

Conditional Logistic Regression fit

Description

Perform conditional logistic regression with output formatted for input into saws which will give confidence intervals and p-values.

Usage

clogistCalc(n, m, x, set, initb = NA, h = 1e-04, maxitr = 15,
     epsilon = 1e-08, conf.level = 0.95)
clogistLoglike(n, m, x, beta)
clogistInfo(n, m, x, beta, h)

Arguments

n

vector of number at risk

m

vector of number of events

x

matrix of covariates

set

vector of denoting clusters

initb

vector of initial parameter estimates, initb=NA uses unconditional logistic regression for initial estimate

h

small value for numeric integration

maxitr

maximum number of iterations

epsilon

convergence criteria (see details)

conf.level

confidence level for confidence intervals

beta

vector of current parameter estimate

Details

The main program is clogistCalc. It calls clogistLoglike and clogistInfo which are not to be called explicitly. The function clogistLoglike finds the loglikelihood using recursive methods, and clogistInfo calculates score vector and information matrix using numerical methods. Both methods are described in Gail, Lubin and Rubinstein (1981), and the h value is the same as is defined in that paper.

The algorithm stops when the largest absolute relative change in either the loglikelihood or in any parameter is less than epsilon. For parameters close to zero (i.e., less than 0.01 in absolute value) the relative change is defined as change/0.01.

Value

A list for input into the saws function, containing the following elements (K=number of clusters, p=number of parameters):

coefficients

p by 1 vector of parameter estimates

u

K by p matrix of scores or estimating equations

omega

K by p by p array of -1*information

Author(s)

Michael Fay, modeled after a Fortran program by Doug Midthune

References

Gail, Lubin and Rubinstein (1981) Biometrika, 703-707

See Also

See also saws

Examples


data(micefat)
cout<-clogistCalc(micefat$N,micefat$NTUM,micefat[,c("fatCal","totalCal")],micefat$cluster)
## usual model based variance
saws(cout,method="dm")
## sandwich based variance with small sample correction
s3<-saws(cout,method="d3")
s3
print.default(s3)

saws documentation built on June 24, 2022, 1:07 a.m.