Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6947501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:42:03+00:00 2026-05-27T13:42:03+00:00

I am trying do the Fisher Exact Test for more than 400 dates. The

  • 0

I am trying do the Fisher Exact Test for more than 400 dates. The Fisher Exact Test works 2×2 possibilities. This test is to many used in molecular markers and genetics studies.
So, if I have to many dates, became impossible make all possibilities one to one combination of markers.

Analysis code in R:

alelo1<-data[,1]
alelo2<-data[,2]
fisher.test(alelo1,alelo2)$p.valeu

I tried do using the:

(for i in)

But I did not had success. How could I do it automatically using R??

Tnks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T13:42:04+00:00Added an answer on May 27, 2026 at 1:42 pm

    Is a bit hard to tell from the question what you want, but if I was able to decipher something I think you want to create 2X2 matrix combinations from the columns of a 2X400 matrix.

    So you would have 79800 combinations? I think.

    choose(400,2) = 79800
    

    I guess for the fisher.test i,j is the same as j,i and that i=j doesn’t make much sense, so

    I would start by doing a function:

    alelos = function(i,j){
    alleys= matrix(c(df[,i],df[,j]),nrow=2,byrow=F)
    #df is the 2X400 matrix, called data in the question
    return(fisher.test(alleys)$p.value)
    }
    

    Then try the loops with for (i in 1:400) and a while perhaps? or something that makes a triangular matrix with the results. Such as:

    I will give you an example with a vector of 10 columns.

    same thing should work for 400.

    set.seed(4)
    df= matrix(c(sample(1:100,10,replace=T),sample(1:100,10,replace=T)),nrow=2)
    
    
    resultmatrix = matrix(0,10,10)
    #or 10x9 if you prefer
    
    for(i in 10:1){
      j=1
    while(i > j){
      resultmatrix[i,j]= alelos(i,j)
    
    j=j+1
    }
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying for many days to try and solve this issue. A 3rd
I'm trying to use the fisher.test function, which is called from a perl script
I'm trying to implement a Fisher-Yates shuffle of some data. This algorithm is easy
Trying to make this jQuery filter that uses .find case-insensitive. For example, when the
Trying to figure out how I can do this properly. The print_r looks like
trying to figure out why this is happening - I have an input text
Trying to figure out why my vertex shader works on my cell phone (Casio
Trying to do this, but is it wrong? Below is my style and script
Trying to write this small program to help me in my Stats class, everything
Trying to find some information on this but am unable to get any results

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.