Learn R Programming

BAGS (version 2.12.0)

Gibbs5: Function obtains the MCMC chains for the parameters of interest that will form their posterior distribution.

Description

This function provides the MCMC chains for the parameters of interest that will form their posterior distribution. This function is to obtain the gene sets that are differentially expressed among five phenotypes of interest, taking into account one as baseline.

Usage

Gibbs5(noRow,noCol,iter,GrpSzs,YMu,L0,V0,L0A,V0A,MM,AAPi,ApriDiffExp,result1,result2,result3,result4)

Arguments

noRow
Number of row of the dataset
noCol
Total number of subjects considered.
iter
Number of iterations for the Gibbs sampler.
GrpSzs
Vector with the sizes of the gene sets considered. Output from the function DataGeneSets.
YMu
Output y.mu from the MCMCDataSet
L0
Vector with the prior parameters.
V0
Vector with the prior parameters.
L0A
Vector with the prior parameters.
V0A
Vector with the prior parameters.
MM
Parameter of the prior.
AAPi
Parameter of the prior.
ApriDiffExp
Number of differentially expressed gene sets apriori
result1
Matrix for the MCMC chains for the parameter that identifies the difference in gene set expression from phenotype 1 in comparison with the phenotype chosen as baseline. The rows are for the gene sets and the columns for the number of iterations.
result2
Matrix for the MCMC chains for the parameter that identifies the difference in gene set expression from phenotype 2 in comparison with the phenotype chosen as baseline. The rows are for the gene sets and the columns for the number of iterations.
result3
Matrix for the MCMC chains for the parameter that identifies the difference in gene set expression from phenotype 3 in comparison with the phenotype chosen as baseline. The rows are for the gene sets and the columns for the number of iterations.
result4
Matrix for the MCMC chains for the parameter that identifies the difference in gene set expression from phenotype 4 in comparison with the phenotype chosen as baseline. The rows are for the gene sets and the columns for the number of iterations.

Value

This function returns a list with four items
alfa.1
A list with the MCMC chains for the estimation of the posterior distribution for the parameter associated with the comparison of phenotype 1 with respect to the reference phenotype.
alfa.2
A list with the MCMC chains for the estimation of the posterior distribution for the parameter associated with the comparison of phenotype 2 with respect to the reference phenotype.
alfa.3
A list with the MCMC chains for the estimation of the posterior distribution for the parameter associated with the comparison of phenotype 3 with respect to the reference phenotype.
alfa.4
A list with the MCMC chains for the estimation of the posterior distribution for the parameter associated with the comparison of phenotype 4 with respect to the reference phenotype.

Details

This function provides the MCMC chains for the estimation of the posterior distribution for the parameters of interest for each gene set.

See Also

See the BAGS Vignette for examples on how to use function Gibbs2. This function can also be used when the gene expression data has a time series experimental design. In this case, there will be five time points on the time course sampling. The assumption is that measurements between time points are independent. This assumption is reasonable when there is irregular and sparse time course sampling.

Examples

Run this code
# Similar to the example on Gibbs2, but in this case there are five different phenotypes of interest.  The user has to define which if the three is the reference group in order to obtain the gene groups that are differentially expressed.

Run the code above in your browser using DataLab