Re: [R] Suppressing scientific notation on plot axis tick labels

2010-02-02 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
Strange, the following works reproducibly on my machine (Windows 2000 Pro): options(scipen = 50, digits = 5) x = c(1e7, 2e7) ?barplot barplot(x) while I also get scientific with your code. After I called ?barplot once, I'm incapable of getting the scientific notation again, though... But I

Re: [R] Explanation w.r.t. rbind, please!

2010-01-29 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Uwe Dippel Sent: Freitag, 29. Januar 2010 11:57 To: r-help@r-project.org Subject: [R] Explanation w.r.t. rbind, please! This is what I tried: num.vec -

Re: [R] exact wilcox test and Bonferroni correction

2010-01-22 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
?p.adjust Apply that to a vector containing all p values you get from wilcox.exact. Alternatively, multiply each p value by the number of comparisons you perform, see any textbook for that. You might want to consider a less conservative correction, though. HTH, Michael -Original Message-

Re: [R] exact wilcox test and Bonferroni correction

2010-01-22 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
(i) you EITHER correct the p value (by multiplying by 8 in your case) OR you use the Bonferroni-threshold of 0.05/8, not both. If you correct the p values, your threshold remains 0.05. If you use 0.05/8, you use the original p values. (ii) Yes, if the p value is 0.15, then the corrected one for 8

Re: [R] permutations from vectors out of a matrix

2010-01-20 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
Etienne, I don't see the point in avoiding some 'special' packages. If you are willing to change your mind in this regard, try something like library() -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Etienne Stockhausen

Re: [R] permutations from vectors out of a matrix

2010-01-20 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
Sorry, wrong button. Below a hopefully more helpful solution... Etienne, I don't see the point in avoiding some 'special' packages. If you are willing to change your mind in this regard, try one of the following solutions that work for me: library(combinat) apply(mat, 2, function(x)

Re: [R] permutations from vectors out of a matrix

2010-01-20 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
Well, seems it's an assignment, so you should REALLY get them on your own and not enquire the list. Foolish me... M. -Original Message- From: einohr2...@web.de [mailto:einohr2...@web.de] Sent: Mittwoch, 20. Januar 2010 19:32 To: Meyners,Michael,LAUSANNE,AppliedMathematics; r-help@r

Re: [R] Quantreg - 'could not find functionrq'

2010-01-07 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
Are you sure you called library(Quantreg) before calling any function? M. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Gough Lauren Sent: Donnerstag, 7. Januar 2010 13:44 To: r-help@r-project.org Subject: [R] Quantreg -

Re: [R] Quantreg - 'could not find functionrq'

2010-01-07 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
(asdf) with asdf replaced by the correct package name, and mind the spelling! Michael -Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Donnerstag, 7. Januar 2010 14:22 To: Meyners,Michael,LAUSANNE,AppliedMathematics Cc: Gough Lauren; r-help@r-project.org

Re: [R] updating arguments of formulae

2009-12-10 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
Moreno, I leave the discussion on the mixed models to others (you might consider the SIG group on mixed models as well for this), but try a few hints to make your code more accessible: * The . in updating a formula is substituted with the respective old formula (depending on the side), but is

Re: [R] by function ??

2009-12-09 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
Or, more general (if you need to include more than just one variable from TestData), something like by(TestData, LEAID, function(x) median(x$RATIO)) Agreed, this is less appealing for the given example than Ista's code, but might help to better understand by and to generalize its use to other

Re: [R] csimtest function in multcomp package

2009-12-04 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
Daniel, quick guess: There has been a major change in the package some time ago, with quite a few functions vanishing and others added. So I guess your recycled code was based on an older version of multcomp. My current version (1.1-0) does not have csimtest anymore either. I guess you want to

Re: [R] Learning R

2009-11-29 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
Julia, see http://www.r-project.org/ - Documentation - Manuals (- An introduction to R) (or use: http://cran.r-project.org/manuals.html) for a starting point. In addition, you might want to check the annotated list of books to see which one might best fit your needs:

Re: [R] unexpected results in comparison (x == y)

2009-11-04 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
FAQ 7.31: http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-the se-numbers-are-equal_003f -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Peter Tillmann Sent: Mittwoch, 4. November 2009 13:50 To:

Re: [R] fixed color scale for a series of contour plots

2009-11-03 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
You don't tell us which function you use, but fixing the zlim argument in image or related functions should do the trick. M. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Marion Dumas Sent: Dienstag, 3. November 2009 14:38

Re: [R] loop and plot

2009-10-19 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
Or you open a new graphics window / device as part of the loop, see, e.g., ?windows. Alternatively, you may write the content of the graphics device to a file for each iteration, see, e.g., ?savePlot (but you'd want to make sure that you have a different filename in each iteration, otherwise,

Re: [R] calculating p-values by row for data frames

2009-10-16 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Christoph Heuck Sent: Donnerstag, 15. Oktober 2009 17:51 To: r-help@r-project.org Subject: [R] calculating p-values by row for data frames Hello R-users, I am looking for

Re: [R] reference on permutation test

2009-10-14 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
It's always worthwhile to look at the articles by Pitman (and maybe the textbook by Fisher, if you have access to it); Welch is a nice paper, too, but might be pretty technical to learn about the area. I don't know any of the textbooks except Edgington (which is in its 4th edition now with

Re: [R] post-hoc test with kruskal.test()

2009-10-14 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
Robert, you can do the corresponding paired comparisons using wilcox.test. As far as I know, there is no such general correction as Tukey's HSD for the Kruskal-Wallis-Test. However, if you have indeed only 3 groups (resulting in 3 paired comparisons), the intersection-union principle and the

Re: [R] post-hoc test with kruskal.test()

2009-10-14 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
Message- From: Robert Kalicki Sent: Mittwoch, 14. Oktober 2009 14:11 To: Meyners,Michael,LAUSANNE,AppliedMathematics Subject: RE: [R] post-hoc test with kruskal.test() Hi Michael, Thank you very much for your clear and prompt answer. Is it still valid if I use an unpaired comparison

Re: [R] Probability of data values form DENSITY function

2009-09-30 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
a local statistician to clarify these issues. HTH, Michael From: Lina Rusyte [mailto:liner...@yahoo.co.uk] Sent: Dienstag, 29. September 2009 18:03 To: Meyners,Michael,LAUSANNE,AppliedMathematics Subject: RE: [R] Probability of data

Re: [R] How do I do simple string concatenation in R?

2009-09-30 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
?paste -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Dr. Arie Ben David Sent: Mittwoch, 30. September 2009 10:22 To: r-help@r-project.org Subject: [R] How do I do simple string concatenation in R? Dear R gurus How do I

Re: [R] Probability of data values form DENSITY function

2009-09-29 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
Lina, check whether something like data.frame(density(rnorm(10))[1:2]) contains the information you want. Otherwise, try to be (much) more specific in what you want so that we do not need to guess (and of course provide minimal, self-contained, reproducible code). That has a higher chance to

Re: [R] A stat related question

2009-09-18 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
Let's assume you have just three observations, and x-- = 1:3 for your observations. Predictor 1:y = x^2 Predictor 2:y = 1 if x=1 y = 4 if x=2 y = 9 if x=3 y = 0 elsewhere These predictors are obviously not the same,

Re: [R] Equivalence of Mann-Whitney test and Kruskal-Wallis test with k=2

2009-09-08 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
See the respective help files. The continuity correction only affects the normal approximation in wilcox.test. With this small samples sizes, the default evaluation is exact, so it doesn't change anything. In contrast, kruskal.test is incapable to compute exact values but always uses the

Re: [R] Unexpected behavior in friedman.test and ks.test

2009-09-08 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
Alex, It's mainly speculation, as I cannot check the Excel add-in nor Vassar, but I'll give it a try. For the Friedman-test: Results of R coincide with those reported by Hollander Wolfe, which I'd take as a point in favor of R. In any case, my guess is that ties are handled differently

Re: [R] biplot graphical options?

2009-09-02 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
Taking the example from ?biplot.princomp with reproducible code (hint, hint): biplot(princomp(USArrests)) biplot(princomp(USArrests), col=c(2,3), cex=c(1/2, 2)) clearly changes the color and font size on my system. For changing the point symbols (which are text by default), try setting xlabs

Re: [R] Permutation test and R2 problem

2009-08-14 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Alex Roy Sent: Freitag, 14. August 2009 12:05 To: r-help@r-project.org Subject: [R] Permutation test and R2 problem Hi, I have optimized the shrinkage parameter

Re: [R] Chi-squared approximation may be incorrect

2009-08-11 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
Nancy (?), see ?chisq.test (in particular the examples and the comment on expected frequency there). A rule of thumb (see any basic text book) for the chisquared approximation being okay is that the expected value in each cell is at least 5. The warning tells you that this does not hold true for

Re: [R] Conditional randomization of groups

2009-08-07 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
Hi unknown, As a quick patch, try something like mydata$Set - 1 mydata$Set[c(sample(mydata$ID[mydata$Type==A], ifelse(runif(1)1/2,2,3)), sample(mydata$ID[mydata$Type==B], 3) )[1:5] ] - 2 HTH, Michael -Original Message- From: r-help-boun...@r-project.org

Re: [R] rnorm() converted to daily

2009-04-17 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
SD in y is more than 15 times (!!!) larger than in x and z, respectively, and hence SD of the mean y is also larger. 100,000 values are not enough to stabilize this. You could have obtained 0.09 or even larger as well. Try y with different seeds, y varies much more than x and z do. Or check the

Re: [R] Genstat into R - Randomisation test

2009-04-16 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
Robert, Tom, Peter and all, If I remember correctly (don't have my copy at hand right now), Edgington and Onghena differentiate between randomization tests and permutation tests along the following lines: Randomization test: Apply only to randomized experiments, for which we consider the

Re: [R] OT: A test with dependent samples.

2009-02-11 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
Rolf, as you explicitly asked for a comment on your proposal: It is generally equivalent to McNemar's test and maybe even more appropriate because of the asymptotics involved in the chi-squared distribution, which might not be too good with n=12. In some more detail: McNemar's test basically