|
Chapter Contents |
Previous |
Next |
| The LOGISTIC Procedure |
The following sections summarize the unconditional and conditional analyses, discuss the network algorithm used in the computations and the necessary computational resources, and provide details on the statistics displayed in the output tables.
Consider N independent Bernoulli random variables Y1,...,YN
having observed values y0 = (y01,...,y0N)'. For each
observation i=1,...,N, let xi = (xi1,...,xim,xi,m+1,...,xi,m+n)' be an m+n=s vector of
explanatory variables, and denote X = (x1,...,xN)'. Let
be the event probability
for each i=1,...,N, and denote p = (p1,...,pN)'. Then
the logistic regression model is
, or

Unconditional likelihood inference is based on maximizing the likelihood function:
![L({\beta})=\prod_{i=1}^N p_i^{y_{0i}}(1-p_i)^{1-y_{0i}}=\frac{\exp(y_0'X{\beta})}{\prod_{i=1}^N[1+\exp(x_i'{\beta})]}](images/lgseq5.gif)
To perform conditional inference, first observe that the sufficient
statistics for the
in the unconditional likelihood
function are the corresponding
,where yi is a realization of Yi. To create the probability
density function (pdf) for T = (T1,...,Ts)', sum over
all binary sequences y that generate an observable
t:
![\Pr(T=t)=\frac{C(t)\exp(t'{\beta})}{\prod_{i=1}^N[1+\exp(x_i'{\beta})]}](images/lgseq8.gif)

Conditional asymptotic inference is performed by maximizing the conditional likelihood and producing conditional statistics similar to those for the unconditional likelihood case.
Conditional exact inference is based on generating the conditional
distribution for the parameters of interest. This distribution is
called the permutation or exact conditional
distribution. The conditional pdf
is denoted as
.
PROC LOGISTIC employs a network algorithm developed by Hirji, Mehta,
and Patel (1987) to generate and count the y vectors. The
algorithm is based on the following observation: given any
y = (y1,...,yN)' and a design X = (x1,...,xN)', let
y(i) = (y1,...,yi)' and
be the first i
rows of each matrix. Write the sufficient statistic based on these
i rows as t'(i) = y(i)'X(i). A recursion
relation results: t(i+1) = t(i) + yi+1xi+1. Combining this relation with a method of
determining which y vectors produce the t0 margins
makes the generation of the permutation distribution feasible.
The bulk of the computation time and memory is consumed by the creation of the exact joint distribution. After the joint distribution for a set of effects is created, the computational effort required to produce hypothesis tests and parameter estimates for any subset of the effects is (relatively) trivial.
A formula does not exist that can predict the amount of time and memory necessary to generate the permutation distributions for a particular problem. The time and memory required depend on several factors, including the total sample size, the number of parameters of interest, the number of nuisance parameters, and the order in which the parameters are processed. If you run out of memory, refer to the SAS Companion for your system to see how to allocate more.
You can use the MAXTIME= option in the EXACTOPTIONS option to limit the total amount of time PROC LOGISTIC uses to derive all of the exact distributions. If PROC LOGISTIC does not finish within that time, the procedure terminates. If you need to derive several distributions, it may be more feasible to request one distribution at a time.
At any time while PROC LOGISTIC is deriving the distributions, you can terminate the computations by pressing the system interrupt key sequence (refer to the SAS Companion for your system) and choosing to stop computations.

For the exact conditional scores test, the conditional mean
and variance matrix
of the T1 (conditional
on T0 = t0) are calculated, and the score statistic for
the observed value,



The mid-p statistic was originally proposed by Lancaster (1961) to compensate for the discreteness of the distribution. Hirji, Tsiatis, and Mehta (1989) recommend its use with small or sparse data sets; Vollset, Hirji, and Afifi (1991) suggest the statistic for matched case-control studies; and Hirji and Tang (1998) recommend the statistic for tests of trend. The mid-p is defined as


The maximum exact conditional likelihood estimate is the quantity
which maximizes the conditional pdf. A
Newton-Raphson algorithm is used to perform this search. However,
if the observed ti attains either its minimum or maximum value in
the permutation distribution (that is, either
or
), then the
conditional pdf is monotonically increasing in
and cannot
be maximized. In this case, a median unbiased estimate (Hirji,
Tsiatis, and Mehta 1989; Hirji and Tang 1998)
is
produced that satisfies
, where the sum is over all possible values of
Ti, and a Newton-Raphson-type algorithm is used to perform the
search.
Likelihood ratio tests based on the conditional pdf are used to test
the null
against various alternatives. For
testing against the alternative
, the critical
region for the UMP test consists of the upper tail of values for
Ti in the permutation distribution. Thus, the one-sided
significance level pG(ti;0) is the probability of a more extreme
(greater) value:


An upper
% confidence limit for
corresponding to the observed ti is the solution
of
, while the lower confidence
limit is the solution
of
. A Newton-Raphson procedure is used to
search for the solutions.
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 2000 by SAS Institute Inc., Cary, NC, USA. All rights reserved.