Displaying 20 results from an estimated 9000 matches similar to: "Exact Permutation test"
2008 Feb 21
1
Permutation Test
Dear R users,
i am fairly new to R and am having trouble creating code to solve a problem.
I've searched the list, combed Crawley's 'R book' and several others, but
can't quite find what i want.
I want to generate permutations of various 'blocks' of 14 numbers. Each
number within a block is a character state for a particular biological
taxon. In the example below, for
2004 Jul 16
0
Permutations (summary)
Dear R users,
This is a second summary of the permutation problem I previously posted.
This summary restates the problem as well as the solution.
First of all 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
2004 Apr 17
0
nlme - sum of squares - permutation test
Hi,
1/ I wonder why a anova.lme on a single lme object does not print the sum of squares (as expected from the help: "a data frame with the sums of squares, numerator degrees of freedom, denominator
degrees of freedom, F-values, and P-values").
Example:
> fm2 <- lme(distance ~ age + Sex, data = Orthodont, random = ~ 1)
> anova(fm2)
numDF denDF F-value p-value
2008 Nov 14
1
Generating unique permutations of a vector
Hi all,
I try to generate sets of strategies that contain probability
distributions for a defined number of elements, e.g. imagine an
animal that can produce 5 different types of offspring and I want to
figure out which percentage of each type it should produce in order to
maximize its fitness. In order to do so, I need to calculate the fitness
for all potential strategies. As an example, if I
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
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,] .
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
2006 Aug 21
0
Fw: Permutations with replacement
My apologies, I forgot to CC: to the list on my previous communication
with Daniel.
Jesse
----- Forwarded by Jesse Albert Canchola/EMVL/DIAG/US/BAYER on 08/21/2006
10:50 AM -----
Jesse Albert Canchola/EMVL/DIAG/US/BAYER
08/21/2006 09:36 AM
To
"Daniel Nordlund" <res90sx5 at verizon.net>
cc
Subject
RE: [R] Permutations with replacement
Thanks, Daniel. I need to enumerate
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
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
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.
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
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)
>
>>
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
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
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
2008 Apr 06
3
Multiset Permutations
Dear R users,
I want to perform an exact permutation of multisets. I have looked at the
coin package, but it doesn't seem to offer what I am looking for. I want to
perform permutations (exact - without duplications) on multisets of scalars
(e.g., the multiset 0,0,1,2,2). I want to output all the possible
permutations into a data frame so that each multiset permutation occupies a
row (or
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
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
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