Displaying 20 results from an estimated 20000 matches similar to: "Permutation of a sequence to without changing local distribution"
2006 Jul 20
3
Permutation Distribution
Hallo
Is there an elegant way to do the following:
Dataset consists of 2 variables: var1: some measurements, and var2: a grouping variable with two values, 1 and 2.
There are (say) 10 measurements from group 1 and 15 measurements from group 2.
The idea is to study the permutation distribution of mean(group 1) * mean(group2).
One way would be to permute 1s and 2s and select the corresponding
2018 May 23
0
find the permutation function of a sorting
> On May 22, 2018, at 10:57 PM, John <miaojpm at gmail.com> wrote:
>
> Thanks, David.
> I got the answer from the web.
> Is there any easy way to permute a set (e.g., a set of characters) by the permutation it returns? Thanks,
>
>
> > x <- c(10,7,4,3,8,2)
> > sort(x, index.return=TRUE)
> $x
> [1] 2 3 4 7 8 10
>
> $ix
> [1] 6 4 3 2
2018 May 23
3
find the permutation function of a sorting
Thanks, David.
I got the answer from the web.
Is there any easy way to permute a set (e.g., a set of characters) by the
permutation it returns? Thanks,
> x <- c(10,7,4,3,8,2)
> sort(x, index.return=TRUE)
$x
[1] 2 3 4 7 8 10
$ix
[1] 6 4 3 2 5 1
2018-05-23 10:49 GMT+08:00 David Winsemius <dwinsemius at comcast.net>:
>
>
> > On May 22, 2018, at 10:06 PM, John
2018 May 23
0
find the permutation function of a sorting
Hello,
Like David said, what you are trying to do with sort() can be done with
order() in a much easier way.
First, your code
x <- sort(c("bc","ac","dd"), index.return=TRUE)
Now, with function order()
i <- order(c("bc", "ac", "dd"))
y <- c("D","E", "F")[i]
y
#[1] "E" "D"
2018 May 23
3
find the permutation function of a sorting
> sort(c("bc","ac","dd"), index.return=TRUE)
$x
[1] "ac" "bc" "dd"
$ix
[1] 2 1 3
We have the permutation, namely 1-->2, 2-->1, 3-->3.
How can I apply the permutation function to a new set
c("D","E", "F")?
so that the result is
c("E","D", "F").
2018-05-23 11:06
2018 May 23
2
find the permutation function of a sorting
Hi,
Is there any way to find the permutation function of the sorting and 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
2018 May 23
0
find the permutation function of a sorting
> On May 22, 2018, at 10:06 PM, John <miaojpm at gmail.com> wrote:
>
> Hi,
>
> Is there any way to find the permutation function of the sorting and 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)
>
>>
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
2012 Jun 09
2
Help with permutation function from Turner et al. 2010 (Ecology)
Hello,
I'm using R code that includes a residual permutation that was written as a supplement to the paper:
Turner et al. 2010. A general hypothesis-testing framework for stable isotopes ratios in ecological studies. Ecology 91:2227-2233.
The supplemental code is available at: http://www.esapubs.org/archive/ecol/E091/157/suppl-1.htm
When I execute the function, no warnings are given
2012 Apr 28
3
Writing a Permutation Function
Hi everyone,
I am somewhat new to R and I am trying to write a permutation function such
that it inputs a character vector and from an arbitrary length "n" which is
the length of the combinations for the character vector. I know there are R
packages for permutation but this is for an assignment.
So far this is what I have:
alphabet =
2009 May 20
1
Comparing spatial distributions - permutation test implementation
Hello everyone,
I am looking at the joint spatial distribution of 2 kinds of organisms
(estimated on a grid of points) and want to test for significant
association or dissociation.
My first question is: do you know a nice technique to do that,
considering that I have a limited number of points (36) but that they
are repeated (4 times)? I did GLMs to test for correlations between
the
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
2006 May 03
1
Permutation test of marked point pattern
Dear R users,
I am trying to perform a hypothesis test on a marked point pattern. I
would like to calculate the mean of the absolute value of the
difference of marks between nearest neigbours, randomize the marks
among points, then calculate this mean again. Ideally, I would test
whether random mean values smaller than the observed mean value occur
less than 5% of the time. I suppose 1000
2005 Nov 29
2
permutation test for linear models with continuous covariates
Hi I was wondering if there is a permutation test available in R for linear
models with continuous dependent covariates. I want to do a test like the
one shown here.
bmi<-rnorm(100,25)
x<-c(rep(0,75),rep(1,25))
y<-rnorm(100)+bmi^(1/2)+rnorm(100,2)*x+bmi*x
H0<-lm(y~1+x+bmi)
H1<-lm(y~1+x+bmi+x*bmi)
anova(H0,H1)
summary(lm(y~1+x+bmi))
But I want to use permutation testing to
2008 Dec 12
0
Help with a permutation test
Hello List and thanks in advance for all of your help,
I am trying implement a permutation test of a multinomial logistic
regression ('multinom' within the nnet package). In the end I want to
compare the parameter estimate from my data to the distribution of
randomized parameter estimates.
I have figured out how to permute my dependent variable (MNNUM) x number of
times, apply
2011 Dec 20
1
column permutation of sparse matrix
Hi,
I'm very new to working with sparse matrices and would like to know how I
can column permute a sparse matrix. Here is a small example:
> M1 <-
> spMatrix(nrow=5,ncol=6,i=sample(5,15,replace=TRUE),j=sample(6,15,replace=TRUE),x=round_any(rnorm(15,2),0.001))
> M1
5 x 6 sparse Matrix of class "dgTMatrix"
[1,] 2.983 . 1.656 5.003 . .
[2,] .
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
2007 Oct 02
1
permutations of a binary matrix with fixed margins
J?r?me,
As a first attempt, how about the function below. It works (or not) by
randomly sorting the rows and columns, then searching the table for
"squares" with the corners = matrix(c(1,0,0,1),ncol=2) and subtracting them
from 1 to give matrix(c(0,1,1,0),ncol=2) (and vice versa). Randomized
matrices can be produced as a chain where each permutation is seeded with
the previous one.
2009 Nov 15
1
how to permute, simulate Markov chain
Hi all,
I am new to R. Can someone please give me some hints in how to do the
following things:
1- Get ONE permutation of a set. I have looked at the gregmisc package's
permutations() method, but I just want to get one permutation at a time.
2- Simulate a Markov chain in R. For instance, I want to simulate the simple
random walk problem, in which a person can walk randomly around 4 places.
2011 Oct 14
2
non-parametric permutation and signed paired-difference distributions
Hi all
Consider the classic data below from Darwin on the heights of 15 pairs
of zea mays (corn) plants
either cross-fertilized or self-fertilized, where the goal is to see if
it makes a difference.
> head(ZeaMays)
pair pot cross self diff
1 1 1 23.500 17.375 6.125
2 2 1 12.000 20.375 -8.375
3 3 1 21.000 20.000 1.000
4 4 2 22.000 20.000 2.000
5 5 2 19.125