Re: [R] R-help Digest, Vol 35, Issue 23
summary.aov(aovRes, split=list(interval = list(i1 vs i2 = 1, i2 vs i3 = 2, i3 vs i4 = 3, i4 vs i5 = 4, i5 vs i6 = 5))) try class(aovRes) #- aovlist ! summary.aovlist(aovRes, spit=...) or simply summary(aovRes, spit=...) Hoping this helps, Herwig -- Dr. Herwig Meschke Wissenschaftliche Beratung Hagsbucher Weg 27 D-89150 Laichingen phone +49 7333 210 417 / fax +49 7333 210 418 email [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] dendrogram branches with different lty
On 16 Dec 2005 at 17:40, Patrick Kuss wrote: Dear r-list, I am trying to visually seperate the two main clusters of a dendrogram. The idea is to use: 'edgePar=list(lty=3)' for 'dend1[[1]]' and 'edgePar=list(lty=1)' for 'dend1[[2]]' I have not found a way to solve this. Any suggestions? Patrick hc - hclust(dist(USArrests), ave) (dend1 - as.dendrogram(hc)) par(mfrow=c(2,2)) plot(dend1) plot(dend1[[1]],edgePar=list(lty=3)) plot(dend1[[2]],edgePar=list(lty=1)) try dend1[[1]] - dendrapply(dend1[[1]], function(e) { attr(e, edgePar) - list(lty=3); e }) plot(dend1) Regards, Herwig -- Dr. Herwig Meschke Wissenschaftliche Beratung Hagsbucher Weg 27 D-89150 Laichingen phone +49 7333 210 417 / fax +49 7333 210 418 email [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] dendrogram: how to obtain leaf height
try height.of.leafs - dendrapply(hcd, function(e) attr(e, height)) unlist(height.of.leafs) Regards Herwig -- Dr. Herwig Meschke Wissenschaftliche Beratung Hagsbucher Weg 27 D-89150 Laichingen phone +49 7333 210 417 / fax +49 7333 210 418 email [EMAIL PROTECTED] On 12 Dec 2005 at 21:15, Diaz.Ramon wrote: Dear All, How can the height of a leaf be extracted from a dendrogram? Sure, I can print it, but I am not able to, say, store it in an object. I think I understand that the height is a property of the split, not the leaf itself, but the printing functions display a height or h (which changes with hang) and that is what I want. Obviously, the info is there (e.g., str(dendrogram)), I just don't see how to obtain it as I want. hc - hclust(dist(USArrests), ave) hcd - as.dendrogram(hc, hang = 0.001) dendrapply(rev(hcd), hnode) ## None of the following work as I want hnode - function(x) { ## nothing if (is.leaf(x)) print(x$height) } hnode - function(x) { ## just prints if (is.leaf(x)) print(x) else NULL } hnode - function(x) { ## doesn't work either if (is.leaf(x)) strsplit(as.character(x), )[6] else NULL } hnode - function(x) { ## prints; no storing if (is.leaf(x)) print(x) else NULL } hnode - function(x) { ## prints; no storing if (is.leaf(x)) x else NULL } Thanks, R. -- Ramon Diaz-Uriarte Bioinformatics Unit Spanish National Cancer Centre (CNIO) http://ligarto.org/rdiaz **NOTA DE CONFIDENCIALIDAD** Este correo electrónico, y en s...{{dropped}} __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] R: pp plot
To construct a nonparametric (1-alpha) confidence set for an arbitrary CDF F, you can use the Dvoretzky-Kiefer-Wolfowitz (DKW) inequality (e.g., see Wasserman, L. (2005). All of Statistics. 2nd, corr. printing. NY: Springer, p. 99). With n=sample size and eps=sqrt(log(2/alpha)/(2*n)), the lower and upper limits are pmax(F-eps ,0) and pmin(F+eps, 1). Disadvantage: the sample size must be large. Herwig -- Dr. Herwig Meschke Wissenschaftliche Beratung Hagsbucher Weg 27 D-89150 Laichingen phone +49 7333 210 417 / fax +49 7333 210 418 email [EMAIL PROTECTED] hi all i would like to know if anyone has a reference on how one would place the bands on the pp plot. i want to test whether or not a certain data set comes from a particular distribution (not normal). i've already plotted F(X(j)) vs j/(n+1) where F(x) is the cum dist function, X(j) is the j'th order statistic and n is the sample size. a goole search gave arb references and thought some one one the list should definitely know how to solve this problem. thanking you in advance allan __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] non-linear binning? power-law in R
__ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] non-linear binning? power-law in R
Why not try to avoid binning (and density plot) at all? An alternative could be a qqplot (as a log-log-plot), e.g. plot(ppoints(length(x4)), x4[order(x4)], log=xy) abline(lm(log(x4[order(x4)])~log(ppoints(length(x4, col=red) If the assumptions of uniform distribution and power transformation y=a*x**b are true, the coefficient of lm estimates the exponent b. Herwig -- Dr. Herwig Meschke Wissenschaftliche Beratung Hagsbucher Weg 27 D-89150 Laichingen phone +49 7333 210 417 / fax +49 7333 210 418 email [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html