qch.fit {qch}R Documentation

Infer posterior probabilities of H_0/H_1 configurations.

Description

For each item, estimate the posterior probability for each configuration. This function use either the model accounting for the dependence structure through a Gaussian copula function (copula=="gaussian") or assuming the conditional independence (copula=="indep"). Utilizes parallel computing, when available. For package documentation, see qch-package.

Usage

qch.fit(
  pValMat,
  EffectMat = NULL,
  Hconfig,
  copula = "indep",
  threads_nb = 0,
  plotting = FALSE,
  Precision = 1e-06
)

Arguments

pValMat

A matrix of p-values, each column corresponding to a p-value serie.

EffectMat

A matrix of estimated effects corresponding to the p-values contained in pValMat. If specified, the procedure will account for the direction of the effect. (optional, default is NULL)

Hconfig

A list of all possible combination of H_0 and H_1 hypotheses generated by the GetHconfig() function.

copula

A string specifying the form of copula to use. Possible values are "indep"and "gaussian". Default is "indep" corresponding to the independent case.

threads_nb

The number of threads to use. The number of thread will set to the number of core available by default.

plotting

A boolean. Should some diagnostic graphs be plotted ? Default is FALSE.

Precision

The precision for EM algorithm to infer the parameters. Default is 1e-6.

Value

A list with the following elements:

prior vector of estimated prior probabilities for each of the H-configurations.
Rcopula the estimated correlation matrix of the Gaussian copula. (if applicable)
Hconfig the list of all configurations.

The elements of interest are the posterior probabilities matrix, posterior, the estimated proportion of observations belonging to each configuration, prior, and the estimated correlation matrix of the Gaussian copula, Rcopula. The remaining elements are returned primarily for use by other functions.

Examples

data(PvalSets_cor)
PvalMat <- as.matrix(PvalSets_cor[,-3])
## Build the Hconfig objects
Q <- 2
Hconfig <- GetHconfig(Q)

## Run the function
res.fit <- qch.fit(pValMat = PvalMat,Hconfig = Hconfig,copula="gaussian")

## Display the prior of each class of items
res.fit$prior

## Display the correlation estimate of the gaussian copula
res.fit$Rcopula

## Display the first posteriors
head(res.fit$posterior)

[Package qch version 2.0.0 Index]