Displaying 20 results from an estimated 1252 matches for "permutations".
2013 May 11
1
How to repeat 2 functions in succession for 400 times? (microarray data)
Hi,
May be this helps:
?set.seed(24)
?mydata4<- as.data.frame(matrix(sample(1:100,10*38,replace=TRUE),ncol=38))
?dim(mydata4)
#[1] 10 38
?library(matrixStats)
res<-do.call(cbind,lapply(1:400, function(i) {permutation<-sample(mydata4); (rowMeans(permutation[,1:27])-rowMeans(permutation[,28:38]))/(rowSds(permutation[,1:27])+rowSds(permutation[,28:38]))} ))
?dim(res)
#[1]? 10 400
A.K.
2004 Jul 16
0
Permutations (summary)
...l thanks to everyone including Erich, Robin, Gabor, Christian,
Ingmar and others for your suggestions.
With the help of an off-list discussion with Gabor I?m going to summarize.
THE PROBLEM
We have 12 elements in blocks of 3 :
1 2 3 | 4 5 6 | 7 8 9 | 10 11 12
and we want to generate random permutations of these 12 elements such that
no permutation so generated can be obtained solely through intra-block
permutations of some previously generated permutation.
In the last sentence intra-block permutations are those permutations which
shuffle the first three numbers among themselves, the second th...
2004 Jul 13
12
Permutations
Dear R users,
I?m a beginner user of R and I?ve a problem with permutations that I don?t
know how to solve. I?ve 12 elements in blocks of 3 elements and I want only
to make permutations inter-blocks (no intra-blocks) (sorry if the
terminology is not accurate), something similar to:
1 2 3 | 4 5 6 | 7 8 9 | 10 11 12 ----------1st permutation
1 3 2 | 4 5 6 | 7 8 9 | 10...
2004 Mar 10
3
aperm() and as.list() args to "["
Hi everyone.
I'm playing with aperm():
a <- 1:24
dim(a) <- c(2,3,2,2)
permutation <- c(1,2,4,3)
b <- aperm(a,permutation)
So if my understanding is right,
a[1,3,2,1] == b[c(1,3,2,1)[permutation] ]
but this isn't what I want because the RHS evaluates to a vector, and
I am trying to identify a single element of b.
How do I modify the RHS to give what I want?
Following
2018 May 23
3
find the permutation function of a sorting
...gt; > matrix form is
> > c(1,2,3), c(2,1,3)
> >
> >> sort(c("bc","ac","dd"))
> > [1] "ac" "bc" "dd"
> >
>
> I think you are asking for the `order` function.
>
> > I try to find it in the permutations/permute package, but I can't find
> it
> >
> > John
> >
> > [[alternative HTML version deleted]]
>
>
[[alternative HTML version deleted]]
2007 Nov 16
4
Permutation of a distance matrix
Hi there,
I would like to find a more efficient way of permuting the rows and columns of a symmetrical matrix that represents ecological or actual distances between objects in space. The permutation is of the type used in a Mantel test.
Specifically, the permutation has to accomplish something like this:
Original matrix addresses:
a11 a12 a13
a21 a22 a23
a31 a32 a33
Example
2018 May 23
3
find the permutation function of a sorting
...3), c(2,1,3)
> > >
> > >> sort(c("bc","ac","dd"))
> > > [1] "ac" "bc" "dd"
> > >
> >
> > I think you are asking for the `order` function.
> >
> > > I try to find it in the permutations/permute package, but I can't
> find it
> > >
> > > John
> > >
> > > [[alternative HTML version deleted]]
> >
> >
>
>
[[alternative HTML version deleted]]
2008 Mar 18
6
[PATCH] permute with 2MB chunk
The memory permutation cause a slow down in case of a save/restore (bug
1143). It works better when the mixing is done with 2MB chunks.
Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
2018 May 23
0
find the permutation function of a sorting
...> matrix form is
> > c(1,2,3), c(2,1,3)
> >
> >> sort(c("bc","ac","dd"))
> > [1] "ac" "bc" "dd"
> >
>
> I think you are asking for the `order` function.
>
> > I try to find it in the permutations/permute package, but I can't find it
> >
> > John
> >
> > [[alternative HTML version deleted]]
>
>
2008 Apr 15
1
sign(<permutation>) in R ?
I am looking for an algorithm (written in R (preferably) or C,
but even pseudo-code in a text book maybe fine)
to determine the sign of a permutation.
What is that? Well, a permutation is either even or odd, the
sign is +1 or -1, respectively, see, e.g.,
http://en.wikipedia.org/wiki/Signature_of_a_permutation
which also says
>> In practice, in order to determine whether a given
2006 Oct 23
1
Lmer, heteroscedasticity and permutation, need help please
Hi everybody,
I'm trying to analyse a set of data with a non-normal response, 2 fixed
effects and 1 nested random effect with strong heteroscedasticity in the
model.
I planned to use the function lmer : lmer(resp~var1*var2 + (1|rand)) and
then use permutations based on the t-statistic given by lmer to get
p-values.
1/ Is it a correct way to obtain p-values for my variables ? (see below)
2/ I read somewhere that lme is more adequate when heteroscedasticity is
strong. Do I have to use lme instead of lmer ?
3/ It is possible to fit a glm in lmer using...
2009 Mar 14
2
permutations in R
Hi. Does anyone know of a function which will take as input a number n (or a
set of n letters) and will give out, one at a time, the permutations of n
(or of those n letters) as a vector?
So that I can use the permutations one at a time. And such that it will
exhaust all the permutations with no repeats.
For example if n is 3, I would want a function which I could use in a loop
and the first time I use it in the loop it may give the vector...
2009 Dec 18
2
Generating permutations that always include one specific element
Dear R community,
I am trying to create a matrix of permutations of a vector:
bands <- c("AL", "B", "DB", "DG", "G", "K", "LB", "LG", "MG", "O", "P",
"PI", "PK", "PU", "R", "V", "W", "Y&...
2008 Apr 02
0
Exact Permutation test
R users,
Is it possible to do 'exact' permutation tests in R? If I run a perm.test or
permutation.test.discrete on a data set that has, for example, 720 possible
permutations, will that test permute ALL of those possible permutations, or
will it just permute 720 random permutations (thus allowing some
possibilities to repeat and some not to be permuted at all)?
I'm a little confused by how to code for a permutation test where I will
have several subsets within the...
2011 Jan 24
2
Masking commands - Permutation in gregmisc and e1071
I am using the function permutations from the package *gregmisc*. However, I
am also making use of the package *e1071*, which also contains a function
called permutations. I want to use the function permutations from the *
gregmisc* package, however, the other package is masking this function. This
happens both when I load the *e1071*...
2018 May 23
2
find the permutation function of a sorting
...nd to
apply the function (or its inverse) elsewhere?
For example, the following permutation function from the sorting in the
matrix form is
c(1,2,3), c(2,1,3)
> sort(c("bc","ac","dd"))
[1] "ac" "bc" "dd"
I try to find it in the permutations/permute package, but I can't find it
John
[[alternative HTML version deleted]]
2010 Jan 28
2
Constrained vector permutation
Hello,
I'm trying to permute a vector of positive integers > 0 with the constraint
that each element must be <= twice the element before it (i.e. for some
vector x, x[i] <= 2*x[i-1]), assuming the "0th" element is 1. Hence the
first element of the vector must always be 1 or 2 (by assuming the "0th"
element is 1). Similarly, the 2nd must always be below/= 4, the
2008 Nov 14
1
Generating unique permutations of a vector
...are
identical, e.g. permute(c(1,0,0)) gives:
[,1] [,2] [,3]
[1,] 1 0 0
[2,] 1 0 0
[3,] 0 1 0
[4,] 0 0 1
[5,] 0 1 0
[6,] 0 0 1
In my above example, this means that permuting the first column of P,
> P[,1]
[1] 5 0 0 0 0
gives 5! = 120 permutations, although there are in fact only 5
unique ones, namely:
5 0 0 0 0
0 5 0 0 0
0 0 5 0 0
0 0 0 5 0
0 0 0 0 5
On my computer (Windows XP SP3, Pentium(R) 4 CPU 2.40GHz, 504 MB RAM -
but I've also tried it on another computer with 1 GB RAM) this leads to
the problem that as soon as the vector to be...
2009 Aug 14
1
Permutation test and R2 problem
Hi,
I have optimized the shrinkage parameter (GCV)for ridge and got my r2
value is 70% . to check the sensitivity of the result, I did permutation
test. I permuted the response vector and run for 1000 times and draw a
distribution. But now, I get r2 values highest 98% and some of them more
than 70 %. Is it expected from such type of test?
*I was under impression that, r2 with real data set
2002 Jan 16
2
exhaustive permutations
...f trying to write a permutation test
procedure for looking at differences between groups with a multivariate
data set (something equivalent to ANOSIM - analaysis of similarities for
those familiar with this test). As with other permutation tests, for
cases where there are large numbers of possible permutations, randomly
sampling from these is appropriate, and can be done simply using
sample(vector_x) to create each random permutation.
However, where sample sizes are small, it is more appropriate (I think)
to exhaustively calculate all possible permutations. This is equivalent
to determining all possi...