network {PHInfiniteEstimates}R Documentation

This function enumerates conditional sample spaces associated with logistic regression,

Description

This function uses a network algorithm to enumerate conditional sample spaces associated with logistic regression, using a minimal version of the algorithm of Hirji et al. (1987).

Usage

network(
  dm,
  n = NULL,
  resp = NULL,
  conditionon = NULL,
  sst = NULL,
  addint = TRUE,
  verbose = FALSE,
  data.name = "Test data"
)

Arguments

dm

matrix of covariates

n

Vector of number of trials. If null, make them all ones.

resp

vector of successes. Used only to calculate the sufficient statistics, unless sufficient statistics are entered directly. Either resp or sst must be provided.

conditionon

indices of covariate matrix indicating sufficient statistics to be conditioned on.

sst

sufficient statistic vector, if input directly. Otherwise, recomputed from resp.

addint

logical, true if a column of 1s must be added to the covariate matrix.

verbose

logical; if true, print intermediate results.

data.name

Name of the data set.

Details

Examples apply this to data from Hirji et al. (1987), citing Goorin et al. (1987).

Value

For a successful run, a list with components:

For an unsuccessful run (because of input inconsistencies) NA

References

Hirji KF, Mehta CR, Patel NR (1987). “Computing Distributions for Exact Logistic Regression.” Journal of the American Statistical Association, 82(400), pp. 1110-1117. ISSN 01621459, doi:10.2307/2289388.

Goorin AM, Perez–Atayde A, Gebhardt M, Andersen J (1987). “Weekly High–Dose Methotrexate and Doxorubicin for Osteosarcoma: The Dana–Farber Cancer Institute/The Children's Hospital – Study III.” Journal of Clinical Oncology. doi:10.1200/JCO.1987.5.8.1178.

Examples

#Columns in table are:
# Lymphocytic Infiltration (1=low, 0=high)
# Sex (1=male, 0=female)
# Any Ostioid Pathology (1=yes, 0=no)
# Number in LI-Sex-AOP group
# Number in LI-Sex-AOP group with disease free interval greater than 3 y
goorin<-data.frame(LI=c(0,0,0,0,1,1,1,1),Sex=c(0,0,1,1,0,0,1,1),
   AOP=c(0,1,0,1,0,1,0,1),N=c(3,2,4,1,5,5,9,17),Y=c(3,2,4,1,5,3,5,6))

out<-network(goorin[,1:3],goorin[,4],conditionon=1:3,resp=goorin[,5])
inference(out)


[Package PHInfiniteEstimates version 2.9.5 Index]