inference {PHInfiniteEstimates} | R Documentation |
Perform inference on conditional sample space.
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 Hirji et al. (1987), citing Goorin et al. (1987).
Usage
inference(
netout,
alpha = 0.05,
rng = c(-5, 5),
alternative = c("two.sided", "less", "greater")
)
Arguments
netout |
List of the sort provided by network. |
alpha |
Test level, or 1- confidence level. |
rng |
Range of possible parameter values. |
alternative |
String indicating two- or one-sided alternative, and, if one-sided, direction. |
Value
List of outputs, including
ospv Observed one-sided p values
tspv Observed two-sided p value.
ci confidence interval.
estimate Maximum conditional likelihood estimator.
null.value Value of parameter under null hypothesis.
data.name Name of data set
method Method used to generate test.
statistic sufficient statistic value for inference variable.
p.value p.value
conf.int confidence interval.
alternative String indicating two- or one-sided alternative, and, if one-sided, direction.
and including standard stats:::orint.htest components, and of class htest.
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))
netout<-network(goorin[,1:3],goorin[,4],conditionon=1:3,resp=goorin[,5])
inference(netout)