# load data
data(pollackCN16)
data(pollackGE16)
# select features belonging to a region
ids <- getSegFeatures(20, pollackCN16)
# extract segmented log2 ratios of the region
X <- t(segmented(pollackCN16)[ids[1], , drop=FALSE])
# extract segmented log2 ratios of the region
Y <- exprs(pollackGE16)[ids,]
# center the expression data (row-wise)
Y <- t(Y - apply(Y, 1, mean))
# specify the linear constraint matrix
R <- matrix(1, nrow=1)
# fit the random coefficients model to the random data
RCMresults <- RCMestimation(Y, X, R)
# draw random data
Yrandom <- RCMrandom(RCMresults)
Run the code above in your browser using DataLab