Description Usage Arguments Details Value Author(s) Examples

View source: R/assign.covergence.R

The assign.convergence checks the convergence of the MCMC chain of the model parameters generated by the Gibbs sampling algorithm.

1 2 3 4 5 6 7 8 9 | ```
assign.convergence(
test,
burn_in = 0,
iter = 2000,
parameter = c("B", "S", "Delta", "beta", "kappa", "gamma", "sigma"),
whichGene,
whichSample,
whichPath
)
``` |

`test` |
The list object returned from the assign.mcmc function. The list components are the MCMC chains of the B, S, Delta, beta, gamma, and sigma. |

`burn_in` |
The number of burn-in iterations. These iterations are discarded when computing the posterior means of the model parameters. The default is 0. |

`iter` |
The number of total iterations. The default is 2000. |

`parameter` |
A character string indicating which model parameter is to be checked for convergence. This must be one of "B", "S", "Delta", "beta", "kappa", "gamma", and "sigma". |

`whichGene` |
A numerical value indicating which gene is to be checked for convergence. The value has to be in the range between 1 and G. |

`whichSample` |
A numerical value indicating which test sample is to be checked for convergence. The value has to be in the range between 1 and N. |

`whichPath` |
A numerical value indicating which pathway is to be checked for convergence. The value has to be in the range between 1 and K. |

To compute the convergence of the gth gene in B, set whichGene=g, whichSample=NA, whichPath=NA.

To compute the convergence of the gth gene in the kth pathway within the signature matrix (S), set whichGene=g, whichSample=NA, whichPath=NA.

To compute the convergence of the kth pathway in the jth test sample within the pathway activation matrix (A), set whichGene=NA, whichSample=n, whichPath=k.

The assign.convergence function returns the a vector of the estimated values from each Gibbs sampling iteration of the model parameter to be checked, and a trace plot of this parameter.

Ying Shen

1 2 3 4 5 6 7 | ```
## Not run:
# check the 10th gene in the 1st pathway for the convergence
trace.plot <- assign.convergence(test=mcmc.chain, burn_in=0, iter=2000,
parameter="S", whichGene=10, whichSample=NA,
whichPath=1)
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.