data(IlluminaMethylation)
## Not run:
# heatmap(IllumBeta, scale="n",
# col=colorRampPalette(c("yellow","black","blue"),space="Lab")(128))
# ## End(Not run)
# Fit Gaussian RPMM
rpmm <- glcTree(IllumBeta, verbose=0)
rpmm
# Get weight matrix and show first few rows
rpmmWeightMatrix <- glcTreeLeafMatrix(rpmm)
rpmmWeightMatrix[1:3,]
# Get class assignments and compare with tissue
rpmmClass <- glcTreeLeafClasses(rpmm)
table(rpmmClass,tissue)
## Not run:
# # Plot fit
# par(mfrow=c(2,2))
# plot(rpmm) ; title("Image of RPMM Profile")
# plotTree.glcTree(rpmm) ; title("Dendrogram with Labels")
# plotTree.glcTree(rpmm,
# labelFunction=function(u,digits) table(as.character(tissue[u$index])))
# title("Dendrogram with Tissue Counts")
#
# # Alternate initialization
# rpmm2 <- glcTree(IllumBeta, verbose=0,
# initFunctions=list(glcInitializeSplitEigen(),
# glcInitializeSplitFanny(nu=2.5)))
# rpmm2
#
# # Alternate split criterion
# rpmm3 <- glcTree(IllumBeta, verbose=0, maxlev=3,
# splitCriterion=glcSplitCriterionLevelWtdBIC)
# rpmm3
#
# rpmm4 <- glcTree(IllumBeta, verbose=0, maxlev=3,
# splitCriterion=glcSplitCriterionJustRecordEverything)
# rpmm4$rLL$splitInfo$llike1
# rpmm4$rLL$splitInfo$llike2
# ## End(Not run)
Run the code above in your browser using DataLab