-
Notifications
You must be signed in to change notification settings - Fork 75
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
Cannot invert matrix: not positive definite, re: issue #54 #85
Comments
Second related question. Looking at the model.txt file, it looks like even with raw source data that is just used to calculate means and standard deviations anyway, and the normality assumption still applies to the distribution of source tracers values? Thanks again. |
Hi, What helped me was using mean source data instead of raw data because like you said the model calculates the means and SD values anyway. Maarten |
Thanks very much Maarten. I'm still curious about the difference between raw vs. mean data because as far as I can tell they do not produce the same results (for just two tracers, where both options are possible to run and compare). But maybe it's as simple as the kind of sample size adjustment made in the SD calculation - that sample size number has to be used for something.... |
I too ran into the same issue using raw data with more than two tracers and I was unable to resolve it. Worked no problem when using the summarized data. |
Hi, I am running in this issue running a triple-isotope model, at the stage where I ask to run the JAGS model ("write_JAGS_model(model_filename, resid_err, process_err, mix, source)"): Error in update.jags(object, n.iter, ...) : RUNTIME ERROR: I wonder whether someone has already pinpointed to a specific issue? Any help is deeply appreciated ! |
I've also run into this issue using a triple isotope model. I am going to use summarized source data as suggested, but perhaps there multiple isotope vignettes could be updated to say "use summarised source data instead of raw" to help avoid this situation? Also not clear on the difference between using raw and summarised values in the model. Does the model summarise them? |
The main difference is that covariance is estimated when raw source data
are given. When only means and SDs are given there is no information on the
correlation between tracers and the model does not try to estimate it. See
the model description supplement to the PeerJ paper,
https://peerj.com/articles/5096/. It could be that there are issues
estimating the correlations with more than 2 tracers.
Does this error occur with "residual error" only, the "process * residual",
or both? Try switching to the residual only since it is a simpler model.
…On Mon, Jun 5, 2023, 7:23 AM Amy Rose Coghlan ***@***.***> wrote:
I've also run into this issue using a triple isotope model. I am going to
use summarized source data as suggested, but perhaps there multiple isotope
vignettes could be updated to say "use summarised source data instead of
raw" to help avoid this situation? Also not clear on the difference between
using raw and summarised values in the model. Does the model summarise them?
—
Reply to this email directly, view it on GitHub
<#85 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABHDA4Y32FP5RRKBE5ISWH3XJVUONANCNFSM4CQJREAA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I have ran into a similar issues and have attempted to use residual error only, and still received the error. Are 3 tracers not able to be used with raw data? |
I am having the same problem with raw data. I tried 5 sources, 4 sources (all with at least 3 different samples), an with two sources. All gave me the same error: | | 0% Any suggestions would be appreciated Thanks! |
Hi everyone, I'm also having the same issue with two isotopes, with raw data, and using size as a continuous covariate. It worked when I did the trial run, but then doesn't work when I change it from trial to anything else. @brianstock, for my system, I should use residual and process error both as true. I played with these when trying to run the model as 'normal', and it only works when resid_err = F and process_err = T. When resid_err = T and process_corr = F, I get "Error in update.jags(object, n.iter,....). Error in node x_iso[47m1:2] Failure to calculate log density." When I put both resid_err and process_err as T (what I want), I get "Error in update.jags(object, n.iter, ....): RUNTIME ERROR: Cannot invert matrix" not positive definitive." There's a paper that did the analysis I need to do on the same species, etc, and they used both as true. I'm not sure where this could be going wrong here. |
I'm having the same issue as a previous user in Issue #54
I get (Error: RUNTIME ERROR:Cannot invert matrix: not positive definite) from jags when using any more than 2 tracers and raw source data.
My values for the discrimination means and SDs are all 0s, but my source SDs are not 0s. When I calculate the source means and SDs and use that instead, it works fine. It does not matter if I use the GUI or script method. I'm assuming using the raw data (with >40 samples per source) would free me from problems of non-normality in the sources, so would really like to figure out what is wrong.
Were there any obvious formatting errors uncovered in issue #54 ?
Thanks very much!
The text was updated successfully, but these errors were encountered: