[R] multicomp plotting

Nair, Murlidharan T mnair at iusb.edu
Fri Sep 25 16:29:13 CEST 2009


I have been trying using the following

require(multcomp)
tmp <- list(confint=sig.data)
attr(tmp, "type") <- "none"
old.oma <- par(oma=c(0,1,0,0))
multcomp:::plot.confint.glht(tmp)
par(old.oma)

I have not been able to get it to work. I would greatly appreciate some suggestion. 
Thanks .../Murli





________________________________________
From: r-help-bounces at r-project.org [r-help-bounces at r-project.org] On Behalf Of Nair, Murlidharan T [mnair at iusb.edu]
Sent: Thursday, September 24, 2009 2:06 PM
To: r-help at r-project.org
Subject: [R] multicomp plotting

I am trying to plot my multiple comparison data. Can anyone give me some input of the error I am getting. The data and code is appended below.
Thanks ../Murli





library(multcomp)
sig.data<-structure(list(X = 1:63, Cell.lines = structure(c(1L, 6L, 13L,
25L, 33L, 42L, 2L, 7L, 14L, 26L, 34L, 43L, 3L, 4L, 5L, 18L, 22L,
52L, 58L, 8L, 27L, 35L, 45L, 9L, 36L, 46L, 10L, 15L, 28L, 37L,
47L, 11L, 16L, 29L, 38L, 44L, 12L, 17L, 30L, 39L, 48L, 19L, 23L,
53L, 59L, 20L, 21L, 24L, 54L, 60L, 31L, 40L, 49L, 50L, 32L, 41L,
51L, 55L, 61L, 56L, 62L, 57L, 63L), .Label = c("DU145-Caki-2",
"DU145-Calu1", "HCE-7-DU145", "HCT116-DU145", "HT29-DU145", "LAPC4-Caki-2",
"LAPC4-Calu1", "LAPC4-EC-17", "LAPC4-Fet", "LAPC4-HCE-7", "LAPC4-HCT116",
"LAPC4-HT29", "LNCaP-Caki-2", "LNCaP-Calu1", "LNCaP-HCE-7", "LNCaP-HCT116",
"LNCaP-HT29", "LS174-DU145", "LS174-LAPC4", "LS174-LNCaP", "MCF7-LNCaP",
"MDA-MB-468-DU145", "MDA-MB-468-LAPC4", "MDA-MB-468-LNCaP", "PC3-Caki-2",
"PC3-Calu1", "PC3-EC-17", "PC3-HCE-7", "PC3-HCT116-2", "PC3-HT29",
"PC3-LS174", "PC3-MDA-MB-468", "RWPE1-Caki-2", "RWPE1-Calu1",
"RWPE1-EC-17", "RWPE1-Fet", "RWPE1-HCE-7", "RWPE1-HCT116", "RWPE1-HT29",
"RWPE1-LS174", "RWPE1-MDA-MB-468", "RWPE2-Caki-2", "RWPE2-Calu1",
"RWPE2-E-HCT116", "RWPE2-EC-17", "RWPE2-Fet", "RWPE2-HCE-7",
"RWPE2-HT29", "RWPE2-LS174", "RWPE2-MCF7", "RWPE2-MDA-MB-468",
"SW480-DU145", "SW480-LAPC4", "SW480-LNCaP", "SW480-PC3", "SW480-RWPE1",
"SW480-RWPE2", "TE3-DU145", "TE3-LAPC4", "TE3-LNCaP", "TE3-PC3",
"TE3-RWPE1", "TE3-RWPE2"), class = "factor"), estimate = c(-2759.302703,
-3690.072718, -2607.150854, -3282.218985, -3635.312686, -3786.281227,
-1189.109264, -2119.879279, -1036.957415, -1712.025546, -2065.119246,
-2216.087787, 1253.075395, 1009.183561, 808.413018, 2038.189972,
788.61518, 1453.525701, 1001.526663, -1135.02519, -727.171457,
-1080.265157, -1231.233698, -682.040377, -627.280345, -778.248885,
-2183.84541, -1100.923546, -1775.991677, -2129.085377, -2280.053918,
-1939.953576, -857.031712, -1532.099843, -1885.193544, -2036.162085,
-1739.183033, -656.261169, -1331.3293, -1684.423001, -1835.391542,
2968.959987, 1719.385195, 2384.295716, 1932.296678, 1886.038123,
-578.466846, 636.463331, 1301.373852, 849.374814, -2561.106254,
-2914.199954, -3065.168495, -600.663526, -1311.531462, -1664.625162,
-1815.593703, 1976.441983, 1524.442945, 2329.535683, 1877.536646,
2480.504224, 2028.505187), lower = c(-3326.68652, -4257.45653,
-3174.53467, -3849.6028, -4202.6965, -4353.66504, -1756.49308,
-2687.26309, -1604.34123, -2279.40936, -2632.50306, -2783.4716,
685.69158, 441.79975, 241.02921, 1470.80616, 221.23137, 886.14189,
434.14285, -1702.409, -1294.55527, -1647.64897, -1798.61751,
-1249.42419, -1194.66416, -1345.6327, -2751.22922, -1668.30736,
-2343.37549, -2696.46919, -2847.43773, -2507.33739, -1424.41552,
-2099.48366, -2452.57736, -2603.5459, -2306.56685, -1223.64498,
-1898.71311, -2251.80681, -2402.77535, 2401.57617, 1152.00138,
1816.9119, 1364.91287, 1318.65431, -1145.85066, 69.07952, 733.99004,
281.991, -3128.49007, -3481.58377, -3632.55231, -1168.04734,
-1878.91527, -2232.00897, -2382.97752, 1409.05817, 957.05913,
1762.15187, 1310.15283, 1913.12041, 1461.12137), upper = c(-2191.918891,
-3122.688906, -2039.767042, -2714.835173, -3067.928873, -3218.897414,
-621.725451, -1552.495466, -469.573602, -1144.641733, -1497.735434,
-1648.703975, 1820.459207, 1576.567374, 1375.796831, 2605.573784,
1355.998992, 2020.909513, 1568.910476, -567.641377, -159.787644,
-512.881345, -663.849886, -114.656565, -59.896532, -210.865073,
-1616.461597, -533.539733, -1208.607864, -1561.701565, -1712.670106,
-1372.569764, -289.6479, -964.716031, -1317.809731, -1468.778272,
-1171.799221, -88.877357, -763.945488, -1117.039188, -1268.007729,
3536.343799, 2286.769007, 2951.679528, 2499.680491, 2453.421935,
-11.083033, 1203.847143, 1868.757664, 1416.758627, -1993.722441,
-2346.816142, -2497.784683, -33.279714, -744.147649, -1097.24135,
-1248.209891, 2543.825795, 2091.826758, 2896.919496, 2444.920458,
3047.888037, 2595.888999), p.val.raw = c(2.22e-15, 0, 8.22e-15,
0, 0, 0, 6.2e-08, 7.41e-13, 6.07e-07, 6.36e-11, 1.29e-12, 2.85e-13,
2.47e-08, 9.33e-07, 2.3e-05, 1.71e-12, 3.18e-05, 1.59e-09, 1.05e-06,
1.37e-07, 8.74e-05, 3.13e-07, 3.37e-08, 0.000184, 0.000452, 3.77e-05,
3.91e-13, 2.29e-07, 3.02e-11, 6.75e-13, 1.54e-13, 4.84e-12, 1.05e-05,
5.77e-10, 8.81e-12, 1.75e-12, 4.62e-11, 0.000281, 8.24e-09, 8.83e-11,
1.53e-11, 4.44e-16, 5.83e-11, 5.82e-14, 5.26e-12, 8.73e-12, 0.001,
0.000389, 1.25e-08, 1.18e-05, 1.2e-14, 6.66e-16, 2.22e-16, 0.000698,
1.08e-08, 1.12e-10, 1.92e-11, 3.28e-12, 6.36e-10, 9.66e-14, 9.58e-12,
2.44e-14, 1.89e-12), p.val.bon = c(3.4e-13, 0, 1.26e-12, 0, 0,
0, 9.48e-06, 1.13e-10, 9.28e-05, 9.73e-09, 1.98e-10, 4.37e-11,
3.77e-06, 0.000143, 0.00352, 2.62e-10, 0.00487, 2.43e-07, 0.000161,
2.1e-05, 0.0134, 4.79e-05, 5.15e-06, 0.0281, 0.0691, 0.00577,
5.99e-11, 3.5e-05, 4.61e-09, 1.03e-10, 2.36e-11, 7.41e-10, 0.0016,
8.83e-08, 1.35e-09, 2.67e-10, 7.07e-09, 0.043, 1.26e-06, 1.35e-08,
2.35e-09, 6.79e-14, 8.92e-09, 8.9e-12, 8.05e-10, 1.34e-09, 0.153,
0.0595, 1.91e-06, 0.00181, 1.83e-12, 1.02e-13, 3.4e-14, 0.107,
1.66e-06, 1.71e-08, 2.93e-09, 5.01e-10, 9.73e-08, 1.48e-11, 1.47e-09,
3.74e-12, 2.89e-10), p.val.adj = c(0, 0, 0, 0, 0, 0, 5.36e-08,
0, 5.92e-08, 0, 0, 0, 2.02e-12, 1.96e-06, 6.42e-05, 0, 0.000196,
3.73e-14, 2.15e-06, 5.57e-07, 0.00234, 4.7e-09, 8.88e-08, 0.00581,
0.0168, 8.99e-05, 0, 3.38e-07, 1.08e-14, 0, 0, 0, 6.26e-05, 1.98e-14,
0, 0, 1.11e-16, 0.00876, 2.85e-12, 2.9e-12, 0, 0, 0, 0, 0, 7.77e-16,
0.0492, 0.00579, 6.52e-08, 0.000106, 0, 0, 0, 0.0339, 3.05e-11,
1.55e-15, 0, 0, 2.92e-13, 0, 0, 0, 0)), .Names = c("X", "Cell.lines",
"estimate", "lower", "upper", "p.val.raw", "p.val.bon", "p.val.adj"
), class = "data.frame", row.names = c("DU145-Caki-2", "LAPC4-Caki-2",
"LNCaP-Caki-2", "PC3-Caki-2", "RWPE1-Caki-2", "RWPE2-Caki-2",
"DU145-Calu1", "LAPC4-Calu1", "LNCaP-Calu1", "PC3-Calu1", "RWPE1-Calu1",
"RWPE2-Calu1", "HCE-7-DU145", "HCT116-DU145", "HT29-DU145", "LS174-DU145",
"MDA-MB-468-DU145", "SW480-DU145", "TE3-DU145", "LAPC4-EC-17",
"PC3-EC-17", "RWPE1-EC-17", "RWPE2-EC-17", "LAPC4-Fet", "RWPE1-Fet",
"RWPE2-Fet", "LAPC4-HCE-7", "LNCaP-HCE-7", "PC3-HCE-7", "RWPE1-HCE-7",
"RWPE2-HCE-7", "LAPC4-HCT116", "LNCaP-HCT116", "PC3-HCT116-2",
"RWPE1-HCT116", "RWPE2-E-HCT116", "LAPC4-HT29", "LNCaP-HT29",
"PC3-HT29", "RWPE1-HT29", "RWPE2-HT29", "LS174-LAPC4", "MDA-MB-468-LAPC4",
"SW480-LAPC4", "TE3-LAPC4", "LS174-LNCaP", "MCF7-LNCaP", "MDA-MB-468-LNCaP",
"SW480-LNCaP", "TE3-LNCaP", "PC3-LS174", "RWPE1-LS174", "RWPE2-LS174",
"RWPE2-MCF7", "PC3-MDA-MB-468", "RWPE1-MDA-MB-468", "RWPE2-MDA-MB-468",
"SW480-PC3", "TE3-PC3", "SW480-RWPE1", "TE3-RWPE1", "SW480-RWPE2",
"TE3-RWPE2"))

#########################################################
#Plotting code below
#########################################################

rownames(sig.data)<-sig.data[,2]
my.hmtest <- structure(list(
  estimate = t(t(structure(sig.data[,"estimate"], .Names = rownames(sig.data)))),
  conf.int = sig.data[,4:5],
  ctype = "ABCC4-2007"),
  class = "hmtest")
par(mex=0.5) #This helps to accomodate the margins when text is getting cut off
plot(my.hmtest, cex.axis=0.7)

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list