{"id":324,"date":"2018-11-25T17:18:49","date_gmt":"2018-11-25T17:18:49","guid":{"rendered":"http:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/eeb348\/?p=324"},"modified":"2018-11-25T17:18:49","modified_gmt":"2018-11-25T17:18:49","slug":"an-r-shiny-application-to-illustrate-f-statistics","status":"publish","type":"post","link":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/eeb348\/2018\/11\/25\/an-r-shiny-application-to-illustrate-f-statistics\/","title":{"rendered":"An R Shiny application to illustrate F-statistics"},"content":{"rendered":"<p>I posted notes on the <a href=\"http:\/\/darwin.eeb.uconn.edu\/eeb348\/lecture-notes\/genetic-structure.pdf\">Wahlund effect and <em>F<\/em>-statistics<\/a> a while ago. I&#8217;ve now posted an R Shiny application to illustrate the difference between Nei&#8217;s <em>G<sub>ST<\/sub><\/em> and Weir and Cockerham&#8217;s <em>F<sub>ST<\/sub><\/em>. The application simulates a sample of 25 diploid genotypes from 10 different populations. The genotypes are a multinomial sample from genotype frequencies calculated from Hardy-Weinberg expectations within each population, given the population allele frequency. That&#8217;s <strong><em>statistical sampling<\/em><\/strong>. The allele frequencies in each population are sampled from a Beta distribution with a mean of <em>p <\/em>= 0.5 and a variance of <em>F<sub>ST<\/sub>p<\/em>(1-<em>p<\/em>). That&#8217;s <strong><em>evolutionary sampling<\/em><\/strong> (or genetic sampling). Just as the individuals we sampled within each population are a <em>sample<\/em> of all individuals we could have sampled, the populations we sampled are a <em>sample <\/em>of all populations we could have sampled.<\/p>\n<p>If you keep the parametric <em>F<sub>ST<\/sub><\/em> the same and just keep hitting &#8220;Go&#8221;, you&#8217;ll see that the genotype counts change every time. That&#8217;s the evolutionary sampling. You&#8217;ll find a link to the application on the <a href=\"http:\/\/darwin.eeb.uconn.edu\/eeb348-resources\/lecture.php?rl_id=32\">lecture detail page<\/a>, or you can link directly to the application on <a href=\"https:\/\/keholsinger.shinyapps.io\/F-statistics\/\">shinyapps.io<\/a>.<\/p>\n<p>As a reminder, if you&#8217;re interested in the source code for this or other R Shiny applications I develop for this course, they&#8217;ll all be available on <a href=\"https:\/\/kholsinger.github.io\/PopGen-Shiny\/\">Github<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I posted notes on the Wahlund effect and F-statistics a while ago. I&#8217;ve now posted an R Shiny application to illustrate the difference between Nei&#8217;s GST and Weir and Cockerham&#8217;s FST. The application simulates a sample of 25 diploid genotypes from 10 different populations. The genotypes are a multinomial sample from genotype frequencies calculated from &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/eeb348\/2018\/11\/25\/an-r-shiny-application-to-illustrate-f-statistics\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;An R Shiny application to illustrate F-statistics&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-324","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/eeb348\/wp-json\/wp\/v2\/posts\/324","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/eeb348\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/eeb348\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/eeb348\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/eeb348\/wp-json\/wp\/v2\/comments?post=324"}],"version-history":[{"count":1,"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/eeb348\/wp-json\/wp\/v2\/posts\/324\/revisions"}],"predecessor-version":[{"id":325,"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/eeb348\/wp-json\/wp\/v2\/posts\/324\/revisions\/325"}],"wp:attachment":[{"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/eeb348\/wp-json\/wp\/v2\/media?parent=324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/eeb348\/wp-json\/wp\/v2\/categories?post=324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/eeb348\/wp-json\/wp\/v2\/tags?post=324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}