On Wed, Jun 16, 2010 at 8:30 PM, Jeremy Miles
<jeremy.mi...@gmail.com>wrote:
It's possible to use the ordinal regression model if your data are
ordered categories. The standard non-parametric test is the
Friedman
test.
?friedman.test
Jeremy
On 16 June 2010 10:22, Tal Galili <tal.gal...@gmail.com> wrote:
Hello Prof. Harrell and dear R-help mailing list,
I wish to perform a non-parametric repeated measures anova.
If what I read online is true, this could be achieved using a mixed
Ordinal
Regression model (a.k.a: Proportional Odds Model).
I found two packages that seems relevant, but couldn't find any
vignette
on
the subject:
http://cran.r-project.org/web/packages/repolr/
http://cran.r-project.org/web/packages/ordinal/
So being new to the subject matter, I was hoping for some
directions from
people here.
Are there any tutorials/suggested-reading on the subject? Even
better,
can
someone suggest a simple example code for how to run and analyse
this in
R
(e.g: "non-parametric repeated measures anova") ?
I waited a week to repost this question. If I should have waited
longer,
or
not repost this at all - then I am truly sorry.
Thanks for any help,
Tal
--
Jeremy Miles
Psychology Research Methods Wiki:
www.researchmethodsinpsychology.com
David Winsemius, MD
West Hartford, CT
------------------------------
Message: 118
Date: Thu, 17 Jun 2010 18:32:33 -0700
From: "Rex C. Eastbourne" <rex.eastbou...@gmail.com>
To: r-help@r-project.org
Subject: [R] Drawing paths through a grid
Message-ID:
<aanlktimbitr_efpyalgjxpgbjl2sswj6yfenacv89...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
I would like to draw a set of points that are equally spaced in a 2-D
grid. Then I would like to draw lines that illustrate different
directed paths through subsets of points. Imagine that the points
correspond to booths in a conference center, and I want to show the
various paths people took to visit the booths (using color to
highlight different types of paths). An example path might be: [(1,1),
(1,3), (3, 3)].
Note: I would like to also make the size of the points in the grid
variable (they correspond to the sizes of the booth).
Can anyone suggest a way to do this in R? (Or to suggest another
software package.)
Thanks,
Rex
------------------------------
Message: 119
Date: Thu, 17 Jun 2010 18:06:05 -0500
From: David LeBauer <dleba...@illinois.edu>
To: r-help@r-project.org
Subject: [R] is there a function to find the quantile of the mean of a
vector?
Message-ID:
<aanlktikfoycypesexyvn2kwxh1wuhjaxc9b_y2q8m...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Hello,
I am interested in finding the quantile of the mean of a vector,
something analogous to using the pnorm(), but for an mcmc chain
instead of a distribution with known parameters.
One approach would be to write a function that finds the index of x_i
that minimizes (x-mean(x))^2
I suspect there is a function available to do this, but I can't find
it?
Thank you,
David
------------------------------
Message: 120
Date: Thu, 17 Jun 2010 23:15:31 -0400
From: Jorge Ivan Velez <jorgeivanve...@gmail.com>
To: David LeBauer <dleba...@illinois.edu>
Cc: r-help@r-project.org
Subject: Re: [R] is there a function to find the quantile of the mean
of a vector?
Message-ID:
<aanlktinnoj5zxzfpea_eb5zwc--mgux31950ou0bi...@mail.gmail.com>
Content-Type: text/plain
Hi David,
You might try:
set.seed(1)
x <- runif(10, 3, 7)
x
[1] 4.062035 4.488496 5.291413 6.632831 3.806728 6.593559 6.778701
5.643191
5.516456 3.247145
(x-mean(x))^2
[1] 1.308783661 0.514892188 0.007285983 2.035688832 1.958118177
1.925165288
2.473214156
[8] 0.191087609 0.096348590 3.837329960
which.min((x-mean(x))^2)
[1] 3
x[which.min((x-mean(x))^2)]
[1] 5.291413
which.min(scale(x, scale = FALSE)**2)
[1] 3
See ?which.min and ?scale for more information.
HTH,
Jorge
On Thu, Jun 17, 2010 at 7:06 PM, David LeBauer <> wrote:
Hello,
I am interested in finding the quantile of the mean of a vector,
something analogous to using the pnorm(), but for an mcmc chain
instead of a distribution with known parameters.
One approach would be to write a function that finds the index of x_i
that minimizes (x-mean(x))^2
I suspect there is a function available to do this, but I can't
find it?
Thank you,
David
------------------------------
Message: 121
Date: Fri, 18 Jun 2010 00:03:18 -0400
From: David Winsemius <dwinsem...@comcast.net>
To: weller <weller.emm...@gmail.com>
Cc: r-help@r-project.org
Subject: Re: [R] Multiple ecdf plots?
Message-ID: <a5d54844-67b3-43e1-b1c6-dc437d248...@comcast.net>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
On Jun 17, 2010, at 4:46 PM, weller wrote:
I have a csv file that has approximately 50k rows. In the first
value of
each row, a file name is listed, and there are 162 different file
names. At
the end of each row, there is a number value. What I would like to
be able
to do is for the 162 different files (or we could call them
categories), is
compute the ecdf for the values within that category. Then plot
the ecdf
for each file on the same graph. Essentially, it would look
something like
http://www-stat.stanford.edu/~jtaylo/courses/stats202/R/chap3_data_exploration/iris_ecdf.png
,
but instead of the 3 lines, it would show 162. They don't have to be
different colors, and the number of records in each file category
changes.
I was considering using a matrix and adding to it via a loop, but
couldn't
quite get it to work. This is what I have right now.
thwop <- read.csv("real_unmod_estimated_pI.csv", header=TRUE)
filelist <- levels(thwop$Source)
rig=matrix(nrows=162)
for (i in filelist)
{
thug <- subset(thwop, == i)
rig[i,length(ecdf(thug$Estimated.pI))]=ecdf(thug$Source)
}
rig
Perhaps:
plot(x=0, y=min(thwop$estimated.pI), xlim=c(min(thwop$estimated.pI),
max(thwop$estimated.pI) ), ylim=c(0.0, 1.0), xlab="", ylab="")
tapply(thwop$estimated.pI, thwop$Source, function(x) { par(new=TRUE) ;
plot(ecdf(x), verticals=TRUE, xlim=c(min(thwop$estimated.pI),
max(thwop
$estimated.pI, xaxt=FALSE) )) })
(It is going to be a mess.)
Any help would be appreciated
------------------------------
Message: 122
Date: Thu, 17 Jun 2010 23:09:00 -0500
From: Frank E Harrell Jr <f.harr...@vanderbilt.edu>
To: David Winsemius <dwinsem...@comcast.net>
Cc: r-help@r-project.org
Subject: Re: [R] Is there a non-parametric repeated-measures Anova in
R ?
Message-ID: <4c1af15c.40...@vanderbilt.edu>
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
On 06/17/2010 07:12 PM, David Winsemius wrote:
On Jun 16, 2010, at 1:43 PM, Tal Galili wrote:
Hello Jeremy,
Thank you for replying.
I came across friedman test (I even wrote and published R code to
easily
perform a post-hoc analysis of friedman
test<http://www.r-statistics.com/2010/02/post-hoc-analysis-for-friedmans-test-r-code/
>
).
But what I am after is *multi-way* repeated-measures anova. Thank
you for
your reply which allowed me to clarify my intentions.
Many years ago I remember reading advice in Conover and Iman's
"Practical Non-Parametric Statistics" that one could apply a rank
transformation to the dependent and independent variables and then
run a
typical anova test. This is probably inferior in many ways to doing
quantile regression (don't know if this has a repeated measures
extension) or to the use of robust standard errors for examining
inferential issues in regression models, but it certainly
represents a
useful consistency check when all you are worried about is
influential
points in a skew distributions. I cannot comment on how it would
theoretically behave in a repeated-measures analysis, but I suspect
that
there are readers of this list who can comment with greater
authority,
and I invite them to do so.
David - the rank transform method doesn't handle interactions
properly,
among other problems. The proportional odds model is the logical
extension of the Wilcoxon-Kruskal-Wallis approach. It relies only on
the rank of Y and reduces to the regular nonparametric tests as
special
cases.
Frank
--
Frank E Harrell Jr Professor and Chairman School of Medicine
Department of Biostatistics Vanderbilt
University
------------------------------
Message: 123
Date: Fri, 18 Jun 2010 16:02:35 +1200
From: John Williams <john.willi...@otago.ac.nz>
To: <deschamps.al...@yahoo.fr>
Cc: R Help <r-help@r-project.org>
Subject: Re: [R] Design of experiments for Choice-Based Conjoint
Analysis (CBC)
Message-ID: <4c1aefdb.7070...@otago.ac.nz>
Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
Hi,
You might find the attached article useful. I am facing the same
problems that you appear to be facing, and I found this article to
be a
great help.
I've also attached a small script I wrote to replicate the analyses
presented in the paper. I can't reproduce the second analysis though,
and I can't figure out what's wrong with my code.
HTH,
John.
P.S. Is anyone else lurking interested in Discrete Choice Experiments
and/or MaxDiff (Best/Worst) scaling. Perhaps we could form a wee SIG?
Cheers,
John
P.S. While there is no single function to do CBC/DCE in R, it doesn't
seem too hard. The only step for which there is no single function is
aggregating the design matrix and data. I've named my script/function
MktRoll after the SAS macro that does that same job (among many other
things, I'm sure). It's just a quick hack, though!
While it seems to be relatively straightforward in R, I have yet to
actually implement a design and gather and analyse the data
though ... ;-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DCE with R.pdf
Type: application/pdf
Size: 934195 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20100618/a8d2f366/attachment.pdf
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: MktRoll.R
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20100618/a8d2f366/attachment.pl
>
------------------------------