Questions tagged [pairwise]

273 questions
1
vote
1 answer

Python: Pairwise computation of acceleration using for loop

Here's a sample dataset with observations from 4 different trips (there are 4 unique trip IDs): trip_id time_interval speed 0 8a8449635c10cc4b8e7841e517f27e2652c57ea3 873.96 0.062410 1 …
Joehat
  • 979
  • 1
  • 9
  • 36
1
vote
0 answers

Pairwise adonis, incorrect p-values

I'm performing a pairwise adonis on my data set. I use a function that I found on research gate written by Pedro Martinez Arbizu https://www.researchgate.net/post/How_can_I_do_PerMANOVA_pairwise_contrasts_in_R. It works on some parts of my data, but…
Thije Zuidewind
  • 87
  • 1
  • 1
  • 7
1
vote
2 answers

Why does stat_compare_means only show pairwise comparisons in one facet?

I'm trying to do a pairwise comparison of grouped data. I've used stat_compare_means to do this successfully before, but for some reason this time it is only showing the comparison bars in one of the facet panels. I've tried, but can't seem to make…
Mike
  • 921
  • 7
  • 26
1
vote
1 answer

R - pairwise_t_test Test Statistics Unchanged When Switching Between Pooled Standard Deviation and non-Pooled Stardard Deviation

While reviewing pairwise t-tests as a post hoc for one way repeated measures ANOVA I noticed an oddity. The test statistic for pair_t_test in the rstatix library does not change when I pool the standard deviation -- in fact none of the output…
Englishman Bob
  • 377
  • 2
  • 13
1
vote
1 answer

R, pair-wise product of unknown number of vectors/matrices

I want to make pair-wise products of variable numbers of matrices/vectors in base R. I only have this ugly solution (ugly is <<-) but intuitively think a nicer - maybe recursive - way exists, or perhaps even a function. I need a pair-wise version…
user3375672
  • 3,728
  • 9
  • 41
  • 70
1
vote
1 answer

Problem with running emmeans (error in assign '.Last.ref_grid')

I have been having trouble with running emmeans function (from the emmeans package) whenever I try to follow up a two way between groups ANOVA with estimated marginal means. A simple example: library(emmeans) library(tidyverse) df <- tibble(fct1 =…
Caban
  • 25
  • 4
1
vote
1 answer

Create an array from pairwiseDifference function

this is my code: $arry = (10,20,30,40,50) function pairwiseDifference($arry, $n) { $diff = 0; for ($i = 0; $i < $n - 1; $i++) { // absolute difference between // consecutive numbers $diff =…
GINO GINI
  • 35
  • 6
1
vote
0 answers

Semi Global Alignment using BioPython

Can we change global alignment using Pairwise2 in BioPython into semi-global alignment using arguments? If so, can you give an example?
1
vote
1 answer

Need help for a loop with random permuted numbers and feed the permutated values to a perl code

I have a well-written perl code (not authored by me), I want to use it for some analysis and need it to iterate over 1000 times with different set of input parameters. I will explain: perl cmh-test.pl --input C1_E1_C2_E2_C3_E3_C4_E4_java.sync…
cryptodice
  • 23
  • 3
1
vote
2 answers

What is the more efficient way to create a pairwise 2D array for a 1D numpy array?

Given 2 numPy arrays of length N, I would like to create a pairwise 2D array (N x N) based on a custom function. import numpy as np import pandas as pd A = np.array(A) # size N B = np.array(B) # size N Fij = f(A[i], B[i],…
hyp
  • 13
  • 2
1
vote
1 answer

Compact Letter Display from a matrix of significancies or by hand

I am running a multiple pairwise comparison in R. I'm using the survival package survminer. I'm using the function: pairwise_survdiff {survminer} It gives the pairwise comparisons with significance as expected, but doesn't seem to have a way to give…
Colin ISU
  • 13
  • 2
1
vote
1 answer

Compute pairwise element of two 1D array

Here is my problem : let's say my two array are : import numpy as np first = np.array(["hello", "hello", "hellllo"]) second = np.array(["hlo", "halo", "alle"]) Now I want to get the matrix of distance between each element of the two arrays so for…
1
vote
1 answer

How to produce a pairwise plot of Kmeans clustering plots in R?

I performing k mean clustering analysis on the Iris dataset in R. I am trying to produce a pairwise plot of all the different combinations of attributes (Sepal.Length, Sepal.Width, Petal.Length and Petal.Width) clustered using kmeans with a center…
daisybeats
  • 217
  • 1
  • 6
1
vote
1 answer

Pheatmap: change annotation relating to colData()

I am trying to create a pheatmap from the pairwise comparisions of a DESEq object, but I want that the labels of rows and columns are related to the metadata, not to be sample names. Experiment set-up: I simply have 3 different cell types with 3…
Paula
  • 107
  • 6
1
vote
1 answer

Compute distance between multiple sets of coordinates

I have a dataset of coordinates that are merged by time into one dataframe, with the individual IDs in the header. For example: > Date_time<-c("2015/03/04 01:00:00","2015/03/04 02:00:00","2015/03/04 03:00:00","2015/03/04 04:00:00") >…
CED
  • 25
  • 5