Description Usage Arguments Details Value Author(s) References See Also Examples
Computes the posterior probability that a new sample belongs to each group and classifies it into the group with highest probability.
1 | classpred(gg.fit, xnew, x, groups, prgroups, ngene=100)
|
gg.fit |
GaGa or MiGaGa fit (object of type |
xnew |
Expression levels of the sample to be classified. Only the subset of the genes indicated by ngene is used. |
x |
|
groups |
If |
prgroups |
Vector specifying prior probabilities for each group. Defaults to equally probable groups. |
ngene |
Number of genes to use to build the classifier. Genes with smaller probability of being equally expressed are selected first. |
The classifier weights each gene according to the posterior
probability that it is differentially expressed. Hence, adding genes
that are unlikely to be differentially expressed does not affect the
performance of the classifier, but it does increase the computational
cost.
All computations are performed by fixing the hyper-parameters to their
estimated value (posterior mean if model was fit with
method=='Bayes'
or maximum likelihood estimate is model was fit
with method=='EBayes'
).
List with the following elements:
d |
Numeric value indicating the group that the new sample is
classified into, i.e. where the maximum in |
posgroups |
Vector giving the posterior probability that the
|
David Rossell
Rossell D. GaGa: a simple and flexible hierarchical model for microarray data analysis. http://rosselldavid.googlepages.com.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #Not run. Example from the help manual
#library(gaga)
#set.seed(10)
#n <- 100; m <- c(6,6)
#a0 <- 25.5; nu <- 0.109
#balpha <- 1.183; nualpha <- 1683
#probpat <- c(.95,.05)
#xsim <- simGG(n,m,p.de=probpat[2],a0,nu,balpha,nualpha)
#
#ggfit <- fitGG(xsim$x[,c(-6,-12)],groups,patterns=patterns,nclust=1)
#ggfit <- parest(ggfit,x=xsim$x[,c(-6,-12)],groups,burnin=100,alpha=.05)
#
#pred1 <- classpred(ggfit,xnew=xsim$x[,6],x=xsim$x[,c(-6,-12)],groups)
#pred2 <- classpred(ggfit,xnew=xsim$x[,12],x=xsim$x[,c(-6,-12)],groups)
#pred1
#pred2
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.