clogistCalc | R Documentation |
Perform conditional logistic regression with output formatted for input into saws
which
will give confidence intervals and p-values.
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)
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 |
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.
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 |
Michael Fay, modeled after a Fortran program by Doug Midthune
Gail, Lubin and Rubinstein (1981) Biometrika, 703-707
See also saws
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.