Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying SIBER with NMDS #95

Open
AylenM opened this issue May 3, 2023 · 2 comments
Open

Trying SIBER with NMDS #95

AylenM opened this issue May 3, 2023 · 2 comments

Comments

@AylenM
Copy link

AylenM commented May 3, 2023

Hi!
I have seen some works using NMDS x and y values of individuals to apply in SIBER (Fatty acids research).
I have tried this but some things appear to be incorrect.
(My data has two groups and only one community).

SEA.B.credibles <- lapply(
as.data.frame(SEA.B),
function(x,...){tmp<-hdrcde::hdr(x)$hdr},
prob = cr.p)
SEA.B.credibles
#$V1
#[,1] [,2]
#99% 0.005803027 0.03913901
#95% 0.006894371 0.03013240
#50% 0.010240394 0.01700947

#$V2
#[,1] [,2] [,3] [,4]
#99% 0.005898435 0.02601642 0.02654745 0.02808042
#95% 0.006891047 0.02259675 NA NA
#50% 0.009724435 0.01449590 NA NA

My SEA.B is a list of two, I don´t understand why V2 has 4 columns and V1 only 2.

And:
bayes95.overlap1_2 <- bayesianOverlap(ellipse1, ellipse2, ellipses.posterior,
draws = 100, p.interval = 0.95, n = 100)
overlap.credibles1_2 <- lapply(
as.data.frame(bayes95.overlap1_2),
function(x,...){tmp<-hdrcde::hdr(x)$hdr},
prob = cr.p)

bayes95.overlap1_2 has Area 1, Area 2 and overlap
And I have obtained:

Error in KernSmooth::bkfe(gcounts, 6, alpha, range.x = c(a, b), binned = TRUE) :
'bandwidth' must be strictly positive

Is it possible to solve these problems? Is the NMDS/SIBER application correct?

Thank you so much in advance!

@benjaminhlina
Copy link

It's hard to answer your question as you have not provided a reproducible example (reprex; click reprex to see examples) Please provide a reprex.

@AndrewLJackson
Copy link
Owner

Hi. It looks to me like that your V2 ellipse has a bimodal distribution such that there are two credible intervals for each the 99% credible
Intervals. This can happen if your data truly are bimodal or if your sample size is too small and it’s an artefact. I suggest you increase number of iterations and if it persists then you may beed to asks whether the underlying data really do suggest bodality or if there is an argument that there are more than one groups within this population

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants