jesstytam / honours

0 stars 0 forks source link

MCMCglmm #49

Open jesstytam opened 3 years ago

jesstytam commented 3 years ago

since i didn't match the synonyms properly before i did it again and got a pretty similar list of mammals. i imputed data from this new list, trimmed the tree, and run the model again, but now body mass is not significant (everything else is the same), is this bad?

post.mean l-95% CI u-95% CI eff.samp pMCMC logmass 0.03489 -0.01843 0.08686 1117 0.204

itchyshin commented 3 years ago

it is not bad - and this is just one imputed data sets - every data set will give you different results of course. Did you check imputation convergence?? @jessicatytam

jesstytam commented 3 years ago

ah ok that makes sense, how do i check convergence?

itchyshin commented 3 years ago

I have shown you the mice github page - go to one of the vignette - we looked at it together at one meeting - you will figure it out

On Thu, Apr 22, 2021 at 9:33 AM jessicatytam @.***> wrote:

ah ok that makes sense, how do i check convergence?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jessicatytam/honours/issues/49#issuecomment-824431495, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC4E3OYVIQW7W7T5MOGUCC3TJ5OD5ANCNFSM43JSWKMQ .

jesstytam commented 3 years ago

imputation looks pretty random, i tried maxit = 40 instead of 20 and still looks quite random

jesstytam commented 3 years ago

should we exclude h-index from the imputation since we are using it as the outcome variable in the model? and will using domestication / google trends / human use affect the model if we use them to impute?

itchyshin commented 3 years ago

You have to keep everything you use for the modeling - you can add something but cannot exclude

itchyshin commented 3 years ago

@jessicatytam - make the iteration from 20 to 50 - the convergence looks fine but it is better to run a bit longer (for mice)

itchyshin commented 3 years ago

check out this paper

https://www.sciencedirect.com/science/article/pii/S0960982213012542

Look at its suppl 1-s2.0-S0960982213012542-mmc1.pdf

jesstytam commented 3 years ago
  (Intercept)    logmass    abs_lat humanuse_bin domestication_bin
1    1.726664 0.09316853 0.02200495    0.2737961        -0.3798504
2    1.720327 0.09287565 0.02199201    0.2733404        -0.3806186
3    1.713990 0.09258276 0.02197907    0.2728847        -0.3813868
    iucn_bin log_sumgtrends   animal     units
1 -0.2545898      0.4912497 1.597098 0.8063786
2 -0.2548084      0.4911050 1.594493 0.8061003
3 -0.2550271      0.4909604 1.591889 0.8058220

95CI and mean (1 = upper, 2 = mean, 3 = lower)

itchyshin commented 3 years ago

@jessicatytam - something is wrong here. They all look too tight to be true. Did you use quantile(vector, c(0.025, 0.975)?

jesstytam commented 3 years ago

oops i used another function, using quantile(vector, c(0.025, 0.975)) here

#intercept
     2.5%     97.5% 
0.3013794 3.1485438 
#logmass
      2.5%      97.5% 
0.02512939 0.15608839 
#abs_lat
      2.5%      97.5% 
0.01906277 0.02482714 
#humanuse_bin
     2.5%     97.5% 
0.1715253 0.3755026 
#domestication_bin
      2.5%      97.5% 
-0.5522008 -0.2079708 
#iucn_bin
      2.5%      97.5% 
-0.3031121 -0.2055370 
#log_sumgtrends
     2.5%     97.5% 
0.4591275 0.5235424 
#animal
    2.5%    97.5% 
1.074620 2.218332 
#units
     2.5%     97.5% 
0.7452609 0.8701069 
itchyshin commented 3 years ago

@jessicatytam - this looks great - it seems everything is significant. But we need to figure out which predictor is most important.

jesstytam commented 3 years ago

so we'll need to calculate the correlation?

itchyshin commented 3 years ago

We have regression - we do not need correlation (the latter is a lot more difficult to do)

jesstytam commented 3 years ago

new model results

Estimate | Mean | 95% CI -- | -- | -- Intercept | 1.332591 | -0.08166419,  2.75135571 Body mass (logged) | 0.09389080 | 0.02544531, 0.15669840 Latitude (abs) | 0.02194034 | 0.01902977, 0.02478378 Google Trends (logged) | 0.4896432 | 0.4577322, 0.5222631 IUCN Red List status (poly 1) | -16.46267 | -19.50905, -13.36723 IUCN Red List status (poly 2) | 2.355842 | -0.2265099,  5.0827833 Human use | 0.2765589 | 0.1752020, 0.3777363 Domestication | -0.3769656 | -0.5487751, -0.2046291 animal | 1.591811 | 1.075620, 2.221497 units | 0.8056383 | 0.7452911, 0.8681393
itchyshin commented 3 years ago

looks great @jessicatytam - well done