[R] Re Randomization test for interaction effect
Dear Pedro, How to test for an interaction--or, even, how to pose the question of an interaction--in randomization-based inference is not at all obvious. And, in the permutation test context reliance has been placed on the exchangeability of (estimated) residuals under an additive, homoscedastic model. Where estimated, the residuals are not exactly exchangeable. A reference you might find useful is Pesarin, F (2001) Multivariate permutations tests. Wiley: Chichester, UK. His method of synchronized permutations may be applied to test for interactions under some limited circumstances. Pedro de Barros writes, in part: Dear All, I am trying to build a randomization test for interaction The problem is as follows: I have a set of stations where the occurrence and biomass of each species being investigated was recorded. snip I would really appreciate any pointer to a solution of this problem. I believe it is not complicated (and probably quite obvious) but the solution keeps out of reach, even though I have been searching for over a week. Thanks, Pedro ** Cliff Lunneborg, Professor Emeritus, Statistics Psychology, University of Washington, Seattle [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] nonparametric manova
Vera Hofer asks: Dear colleagues, has anyone an idea how to carry out a nonparametric manova for comparing 3 groups? Thank you for your help. Vera One approach would be to carry out a permutation test, randomly reassigning the vector observations among groups under the null hypothesis that the three multivariate distributions sampled are identical. The 'work' could be carried out using the boot function (in package boot) but would require writing a not very involved function to compute the manova test statistic. ** Cliff Lunneborg, Professor Emeritus, Statistics Psychology, University of Washington, Seattle [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
[R] Re:[ R] Wilcoxon test for mixed deisgn
Marco Chirandini writes: is there any extension of the pairwise Wilcoxon test to a dependent samples layout with replicates (or, in other terms, a one-way layout with blocking and replicates)? The Wilcoxon method with matched pairs works for the case of dependent samples with one observation per block, while the Mann-Whitney test works for independent samples, thus one single block and replicated observations. Is there a method which mixes this two cases considering a depedent sample design in which each block has more than one observation? I know it exists a Friedman test for this case but in the Friedman test ranks are constructed considering all subjects jointly, while in Wilcoxon only the pair of subject currently considered are ranked, thus resulting in a more powerful test. It is my understanding that the Friedman test ranks responses within each block, independently from block to block. friedman.test() is an R function. ** Cliff Lunneborg, Professor Emeritus, Statistics Psychology, University of Washington, Seattle [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] The hidden costs of GPL software?
Could I voice my support for the sixth point raised by John Fox? Many users would find such a development to be enormously useful. (6) As has been pointed out, e.g., by Duncan Murdoch, solving the function-locating problem is best done by a method or methods that automatically accommodate the growing and changing set of contributed packages on CRAN. Why not, as previously has been proposed, replace the current static (and, in my view, not very useful) set of keywords in R documentation with the requirement that package authors supply their own keywords for each documented object? I believe that this is the intent of the concept entries in Rd files, but their use certainly is not required or even actively encouraged. (They're just mentioned in passing in the Writing R Extensions manual.) ** Cliff Lunneborg, Professor Emeritus, Statistics Psychology, University of Washington, Seattle [EMAIL PROTECTED] __ [EMAIL PROTECTED] 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] Bootstrapping with weighted data sample
Salvatore Barbaro writes, in part: Consider a sample, x, like this: # x- matrix(rbind(4,8,0,2, 25,30,5,32), ncol=2) # Weight Income 425 830 05 232 Here the Weight assigns the weight of each observation. P.S. I am using library(bootstrap) with bcanon() to obtain boostrap confidence intervals. You may want to use functions from the boot package instead. The boot function accommodates weighted observations in drawing new samples. ** Cliff Lunneborg, Professor Emeritus, Statistics Psychology, University of Washington, Seattle [EMAIL PROTECTED] __ [EMAIL PROTECTED] 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] detection of outliers
Dimitris Rizopoulos writes, in part: Hi Philippe, you could consider using the Windsorized mean, winds.mean - function(x, k=2){ FYI, the shrinking of tails process of Winsorization was brought to the attention of the statistical community by John Tukey. It is named after its originator, Charley Winsor, and not after the House of Windsor. ** Cliff Lunneborg, Professor Emeritus, Statistics Psychology, University of Washington, Seattle [EMAIL PROTECTED] __ [EMAIL PROTECTED] 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] t-test problem
Kan Liu wrote: Hello, I got two sets of data x=(124738, 128233, 85901, 33806, ...) y=(25292, 21877, 45498, 63973, ) When I did a t test, I got two tail p-value = 0.117, which is not significantly different. If I changed x, y to log scale, and re-do the t test, I got two tail p-value = 0.042, which is significantly different. Now I got confused which one is correct. Any help would be very appreciated. If you are unsure about the metric of the attribute being measured, it would be preferable to use a rank test, the Wilcoxon-Mann-Whitney, rather than the parametric t-test. ** Cliff Lunneborg, Professor Emeritus, Statistics Psychology, University of Washington, Seattle [EMAIL PROTECTED] __ [EMAIL PROTECTED] 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]...Why social scientists don't use R
Berton Gunter has written in part: A few comments: First, your remarks are interesting and, I would say, mainly well founded. However, I think they are in many respects irrelevant, although they do point to the much bigger underlying issue, which Roger Peng also hinted at in his reply. I think they are sensible because R IS difficult; the documentation is often challenging, which is not surprising given (a) the inherent complexity of R; (b) the difficulty in writing good documentation, especially when many of the functions being documented are inherently technical, so subject matter knowledge (CS, statistics, numerical analysis ,...) must be assumed; My experience has been that the real challenge is not understanding the documentation, but finding it. Once I know the names of one or more candidate functions I am happily on my way. One of the delights of reading r-help is that one keeps discovering useful functions. In the best of all possible worlds I could ask an intelligent agent to summon up the k-nearest neighbor functions that would do X. Not likely. Years ago StatSci Europe published a handy little Complete Listing of S-PLUS Functions, categorized in some way. I found it useful. Something similar for R would not go amiss. I know, it would want to be 420 pages rather than 42. ** Cliff Lunneborg, Professor Emeritus, Statistics Psychology, University of Washington, Seattle [EMAIL PROTECTED] __ [EMAIL PROTECTED] 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] More on global environment
You may want to look at the notes on and functions for workspace management that guide me. They can be downloaded from http://faculty.washington.edu/lunnebor/Stat342/ by checking on Exercises. I use the .GlobalEnv (position 1 on search path) solely for scratch and have project work attached further down the path. The two functions move() and rm.sv() contributed by my colleague John Miyamoto and described in the above make this easy to do. Michael Prager wrote: : Date: Thu, 15 Jul 2004 14:45:41 -0400 : From: Mike Prager [EMAIL PROTECTED] : Subject: [R] More on global environment : To: R Help list [EMAIL PROTECTED] : Message-ID: [EMAIL PROTECTED] : Content-Type: text/plain; charset=us-ascii; format=flowed : : To follow up on my previous question, suppose a user R session wants to : unload one workspace and load another within an R session. Is the : following the correct sequence? : (snip) : Michael Prager, Ph.D. : NOAA Center for Coastal Fisheries and Habitat Research : Beaufort, North Carolina 28516 : http://shrimp.ccfhrb.noaa.gov/~mprager/ ** Cliff Lunneborg, Professor Emeritus, Statistics Psychology, University of Washington, Seattle [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
RE: [R] Changing workspace from within an R session
I have found a pair of functions, move and rm.sv, written by my colleague John Miyamoto very useful in managing one's workspace. They may be inspected and downloaded from http://faculty.washington.edu/jmiyamot/psych500.htm ** Cliff Lunneborg, Professor Emeritus, Statistics Psychology, University of Washington, Seattle [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
[R] Point and click
The following query raises the question: What is it that students learn from point and click dialogs? Date: Fri, 03 Oct 2003 16:57:42 -0400 From: To: [EMAIL PROTECTED] Subject: Splus question Message-ID: [EMAIL PROTECTED] I don't know if this is the right list to post this question. If not, please let me know where I should post this. I have a dataframe with 3 variables: ID, Y, Group Group is either 1, 2, 3. I am trying to run a t-test to compare the three groups on outcome Y. I know how to do this using the point and click dialogs. But can't get it to work on the command line. When I type: t.test(y, group) it just compares y and group as though they represent the two samples. I tried doing something with tapply(y, group) but don't know how that works. If someone knows, please email me. Thanks. ** Cliff Lunneborg, Professor Emeritus, Statistics Psychology, University of Washington, Seattle [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] getAnyhwhere behavior
I would have expected the function getAnywhere to have behaved differently in the following: search() [1] .GlobalEnv file:C:/R/Rdata/miya/.Rdata [3] package:bootpackage:methods [5] package:ctest package:mva [7] package:modreg package:nls [9] package:ts Autoloads [11] package:base getAnywhere(basic.ci) Error in getAnywhere(basic.ci) : Object basic.ci not found basic.ci-get(basic.ci,environment(boot)) getAnywhere(basic.ci) A single object matching `basic.ci' was found It was found in the following places .GlobalEnv registered S3 method for basic from namespace boot namespace:boot with value function (t0, t, conf = 0.95, hinv = function(t) t) { qq - norm.inter(t, (1 + c(conf, -conf))/2) out - cbind(conf, matrix(qq[, 1], ncol = 2), matrix(hinv(2 * t0 - qq[, 2]), ncol = 2)) out } environment: namespace:boot Why did getAnywhere not see basic.ci in the environment from which I got it? ** Cliff Lunneborg, Professor Emeritus, Statistics Psychology, University of Washington, Seattle [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] Resizing R console window (was BSOD with ESS[R]...)
Simon Gatehouse writes: Like many, I fiddle while thinking. Part of my fiddling has been to rapidly resize the R console window back and forth by dragging with the mouse on the bottom right hand corner. I resize the window by a small amount rapidly and continually . After about 5 seconds of such movement R crashes with the pop up Rgui.exe has generated errors... This has happened ever since 1.3, I think. It is unrelated to any other programs I may be running at the time. I currently run W2000 and latest R1.6.2. The 1.7.0 development version has same behaviour. Here I am running R 1.6.2 (binary distribution) under W2000 and have noticed the same behavior. After resizing the window I commonly cannot return control to the R console and have to shut down R. ** Cliff Lunneborg, Professor Emeritus, Statistics Psychology, University of Washington, Seattle [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] How to solve A'A=S for A
It is not clear to me that one can. If the singular value decomposition of A is the triple product P d Q', then the singular value decomposition of A'A=S is Q d^2 Q'. The information about the orthonormal matrix P is lost, is it not? ** Cliff Lunneborg, Professor Emeritus, Statistics Psychology, University of Washington, Seattle Visiting: Melbourne, Feb-May 1999, Brisbane, Jun-Aug 1999, Sydney, Sep-Nov 1999, Perth, Dec 1999-Feb 2000 [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help