hmsc-r / HMSC

GNU General Public License v3.0
103 stars 37 forks source link

Computing associations due to environmental covariates #28

Open Leitemfa opened 4 years ago

Leitemfa commented 4 years ago

Hello,

I see that Hmsc has a function computeAssociations to investigate the residual correlations, but I would like to see also the associatios due to covariates, as they seems to be the shared environmental response. Is there any way to extract this information now?

Thanks, Marcio

ovaskain commented 4 years ago

Hi,

There is no specific functionality for this (yet); at some point we could indeed implement a function that computes associations due to responses to covariates. One thing that can be done is to estimate both the raw associations (from an intercept-only model) and residual associations (from model with covariates), the difference between these two tells about the associations due to covariates.

Otso

On 30/10/2019 10:06, Márcio Fernandes Alves Leite wrote:

Hello,

I see that Hmsc has a function computeAssociations to investigate the residual correlations, but I would like to see also the associatios due to covariates, as they seems to be the shared environmental response. Is there any way to extract this information now?

Thanks, Marcio

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/hmsc-r/HMSC/issues/28?email_source=notifications&email_token=AEIYMZWW4CSQEFD732W6OXDQRE6ALA5CNFSM4JGVBE22YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HVKFZYQ, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEIYMZW76TF5CVWUZXJVTL3QRE6ALANCNFSM4JGVBE2Q.

-- Otso Ovaskainen Professor Department of Biosciences University of Helsinki Finland

otso.ovaskainen@helsinki.fimailto:otso.ovaskainen@helsinki.fi

janinepdasilva commented 2 years ago

Hello,

I would like to know it there were any developments regarding this question. I have used the difference between raw and residual correlations to justify the associations due to the covariates, but the reviewers made some pretty tough comments on this, so I was wondering if I could do something to clarify this part of my manuscript.

Thanks, Janine

gtikhonov commented 2 years ago

Still no specific functionality has been implemented for this purpose at this point. Indeed, the way how Otso has suggested to fit two models - with covariates and without and look at the difference of residual associations is one potential option. Another potentially viable option to get the "X-induced-only" covariance matrix, which does not require deep hacking within the package, would be to sample with replacement from the covariates' joint combinations of the training data, run predict(..., predictEtaMean=TRUE) function for such "new" covariates data, and simply calculate the empirical distribution across the predictions. @ovaskain or @jarioksa , could you comment on such proposal?

janinepdasilva commented 2 years ago

The difference between raw and residual correlations is very useful, except in the case associations pop up in both models - as it is the case with my data. Thank you so much for your suggestion, I'll try to manage this issue that way.