{"action":"created","issue":{"url":"https://api.github.com/repos/dmcglinn/quant_methods/issues/9","labels_url":"https://api.github.com/repos/dmcglinn/quant_methods/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/dmcglinn/quant_methods/issues/9/comments","events_url":"https://api.github.com/repos/dmcglinn/quant_methods/issues/9/events","html_url":"https://github.com/dmcglinn/quant_methods/issues/9","id":58309810,"number":9,"title":"Interesting pvalues","user":{"login":"claydustin","id":8049938,"avatar_url":"https://avatars.githubusercontent.com/u/8049938?v=3","gravatar_id":"","url":"https://api.github.com/users/claydustin","html_url":"https://github.com/claydustin","followers_url":"https://api.github.com/users/claydustin/followers","following_url":"https://api.github.com/users/claydustin/following{/other_user}","gists_url":"https://api.github.com/users/claydustin/gists{/gist_id}","starred_url":"https://api.github.com/users/claydustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/claydustin/subscriptions","organizations_url":"https://api.github.com/users/claydustin/orgs","repos_url":"https://api.github.com/users/claydustin/repos","events_url":"https://api.github.com/users/claydustin/events{/privacy}","received_events_url":"https://api.github.com/users/claydustin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-02-20T04:45:41Z","updated_at":"2015-02-23T02:29:32Z","closed_at":null,"body":"So I was messing around...\r\n\r\nfreq = apply(BCI, 2, sum)\r\nsort_indices = sort(freq, decreasing = FALSE, index.return = TRUE)$ix\r\nxy_dist = dist(BCI.env[,c(1,2)])\r\n\r\n\r\nmantel_cor = c()\r\n\r\nfor(i in 1:length(freq)){ \r\n    ar_dist = dist(BCI[,sort_indices[i]])\r\n    mantel_cor[i] = mantel(xy_dist, ar_dist)$signif\r\n}\r\n\r\n\r\nSo mantel_cor returns a vector of all the p-values ordered according to frequency so mantel_cor[1] is the correlation for the rarest species. \r\n\r\nNow the funky part. try \r\n\r\nplot(mantel_cor) this will plot the mantel correlation on frequency.....there appears to be no correlation. THERE SHOULD BE!"},"comment":{"url":"https://api.github.com/repos/dmcglinn/quant_methods/issues/comments/75481537","html_url":"https://github.com/dmcglinn/quant_methods/issues/9#issuecomment-75481537","issue_url":"https://api.github.com/repos/dmcglinn/quant_methods/issues/9","id":75481537,"user":{"login":"dmcglinn","id":1190381,"avatar_url":"https://avatars.githubusercontent.com/u/1190381?v=3","gravatar_id":"","url":"https://api.github.com/users/dmcglinn","html_url":"https://github.com/dmcglinn","followers_url":"https://api.github.com/users/dmcglinn/followers","following_url":"https://api.github.com/users/dmcglinn/following{/other_user}","gists_url":"https://api.github.com/users/dmcglinn/gists{/gist_id}","starred_url":"https://api.github.com/users/dmcglinn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmcglinn/subscriptions","organizations_url":"https://api.github.com/users/dmcglinn/orgs","repos_url":"https://api.github.com/users/dmcglinn/repos","events_url":"https://api.github.com/users/dmcglinn/events{/privacy}","received_events_url":"https://api.github.com/users/dmcglinn/received_events","type":"User","site_admin":false},"created_at":"2015-02-23T02:29:32Z","updated_at":"2015-02-23T02:29:32Z","body":"I updated my gist to use Bray-Curtis distance rather than Euclidean and a bit more a of a pattern pops out. I was curious to try this because ecologists generally argue that for species composition euclidean distance is not preferred because of the double-zero problem (Numerical Ecology in R - p32). "}}