inference: Perform inference on conditional sample space.

Description Usage Arguments Value References Examples

View source: R/inference.R

Description

This function performs classical frequentist statistical inference to a discrete multivariate canonical exponential family. It produces the maximum likelihood estimator, one- and two-sided p-values for the test that model parameters are zero, and providing confidence intervals for the parameters. The discrete probability model is given by a set of possible values of the random vectors, and null weights for these vectors. Such a discrete probability model arises in logistic regression, and this function is envisioned to be applied to the results of a network algorithm for conditional logistic regression. Examples apply this to data from \insertCitemehtapatel;textualPHInfiniteEstimates, citing \insertCitegoorinetal87;textualPHInfiniteEstimates.

Usage

1
inference(out, alpha = 0.05, rng = c(-5, 5))

Arguments

out

List of the sort provided by network.

  • possible matrix with vectors of possible unconditioned values of the sufficient statistic.

  • count count of entries in the conditional distribution.

  • obsd Observed value of unconditioned sufficient statistics.

alpha

Test level, or 1- confidence level.

rng

Range of possible parameter values.

Value

List with components:

References

\insertRef

mehtapatelPHInfiniteEstimates

\insertRef

goorinetal87PHInfiniteEstimates

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#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)

PHInfiniteEstimates documentation built on July 24, 2021, 1:07 a.m.