Last data update: 2014.03.03

R: Accessor for the tau2 parameter in the hierarchical mixture...
tau2R Documentation

Accessor for the tau2 parameter in the hierarchical mixture model

Description

The interpretation of tau2 depends on whether object is a MarginalModel or a BatchModel. For BatchModel, tau2 is a vector with length equal to the number of components. Each element of the tau2 vector can be interpreted as the within-component variance of the batch means (theta). For objects of class MarginalModel (assumes no batch effect), tau2 is a length-one vector that describes the variance of the component means between batches. The hyperparameters of tau2 are eta.0 and m2.0. See the following examples for setting the hyperparameters, accessing the current value of tau2 from a MixtureModel-derived object, and for plotting the chain of tau2 values.

Usage

tau2(object)

## S4 method for signature 'BatchModel'
tau2(object)

## S4 method for signature 'MarginalModel'
tau2(object)

## S4 method for signature 'McmcChains'
tau2(object)

Arguments

object

see showMethods(tau2)

Value

A vector of variances

See Also

Hyperparameters

Examples

k(BatchModelExample)
tau2(BatchModelExample)
plot.ts(tau2(chains(BatchModelExample)))

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(CNPBayes)
Loading required package: GenomicRanges
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

Loading required package: S4Vectors
Loading required package: stats4

Attaching package: 'S4Vectors'

The following objects are masked from 'package:base':

    colMeans, colSums, expand.grid, rowMeans, rowSums

Loading required package: IRanges
Loading required package: GenomeInfoDb

Attaching package: 'CNPBayes'

The following object is masked from 'package:stats':

    sigma

> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/CNPBayes/tau2-method.Rd_%03d_medium.png", width=480, height=480)
> ### Name: tau2
> ### Title: Accessor for the tau2 parameter in the hierarchical mixture
> ###   model
> ### Aliases: tau2 tau2,BatchModel-method tau2,MarginalModel-method
> ###   tau2,McmcChains-method
> 
> ### ** Examples
> 
> k(BatchModelExample)
[1] 3
> tau2(BatchModelExample)
[1] 0.01738101 0.01687355 0.01773349
> plot.ts(tau2(chains(BatchModelExample)))
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>