Computes marginal, conditional, and information-theoretic summaries for a binary outcome `y` against one or more predictors in `x`. Performs either Fisher's exact test or a generalized linear mixed model (GLMM) for inference.
probstat(y, x, test = "Fisher", ri, nfolds, seed = 10101)A data frame with one row per evaluated predictor (or pair) and the following columns:
Marginal probability of \(X=1\).
Marginal probability of \(Y=1\).
Conditional probability \(P(Y=1 \mid X=1)\).
Conditional probability \(P(X=1 \mid Y=1)\).
Inverse conditional probability \(P(Y=1 \mid X=0)\).
Difference \(P(Y=1 \mid X=1) - P(Y=1)\).
Percent difference relative to \(P(Y=1)\).
Entropy of \(X\).
Entropy of \(Y\).
Conditional entropy of \(Y \mid X\).
Difference between marginal and conditional entropy of \(Y\).
Percent difference in entropy.
p-value from Fisher's exact test or the GLMM (as applicable).
A binary outcome vector (logical or numeric coded as 0/1). Length `n`.
A data frame of predictors (typically the expanded data returned by [pairmi()]). Must have `n` rows; columns are treated as candidate predictors.
Character string selecting the inferential method; one of `c("fisher", "glmm")`. Defaults to `"fisher"` if missing.
Optional vector/factor giving the grouping variable for a random intercept in the GLMM. Must be length `n`. Ignored if `test = "fisher"`.
Integer; number of folds used for cross-validation.
Integer seed for fold randomization.
pairmiresult = pairmi(misimdata[,2:6])
probstat(misimdata$y,pairmiresult$expanded.data,nfolds=5)
Run the code above in your browser using DataLab