grambank / grambank-analysed

3 stars 0 forks source link

Vary spatial parameters #62

Closed HedvigS closed 2 years ago

HedvigS commented 2 years ago

I think what I've done is set things up for @SamPassmore and #55 .

What you can do now is go:

Rscript spatiophylogenetic_modelling/analysis/INLA_multi_models.R "real" 1 113 "precision_matrices_kappa_2_sigma_2.RDS" and it'd run all the real data for the trial and dual model with that particular prec matrix set up. If you don't give it a 4th argument, it goes with precision_matrices_kappa_2_sigma_1.15 as a default.

Is this alright for you @SamPassmore ?

it saves the kappa and sigma information into the qs-object filename as well.

SamPassmore commented 2 years ago

Hi Hedvig, I dont quite understand what the changes are to the model running script. Does this now run all variations of spatial parameters in R? or does it take one set of matrices, and we change in the input somewhere?

HedvigS commented 2 years ago

Hi Hedvig, I dont quite understand what the changes are to the model running script. Does this now run all variations of spatial parameters in R? or does it take one set of matrices, and we change in the input somewhere?

We generate 3 precision matrices and can give a specific one as command line input when running the script. If no specific precision matrix is specified, it uses kappa 2 sigma 1.15.

example:

Rscript spatiophylogenetic_modelling/analysis/INLA_multi_models.R "real" 1 113 "precision_matrices_kappa_2_sigma_2.RDS"

runs the dual and trial model on the 113 real grambank features with the precision matrix generated with kappa 2 and sigma 2. All the qs files produced will have the info on kappa and sigma values baked into their filenames.

HedvigS commented 2 years ago

If you want to run all three precision matrices you'd have to go

Rscript spatiophylogenetic_modelling/analysis/INLA_multi_models.R "real" 1 113 "precision_matrices_kappa_2_sigma_2.RDS"

Rscript spatiophylogenetic_modelling/analysis/INLA_multi_models.R "real" 1 113 "precision_matrices_kappa_2_sigma_1.15.RDS"

Rscript spatiophylogenetic_modelling/analysis/INLA_multi_models.R "real" 1 113 "precision_matrices_kappa_2.5_sigma_3.RDS"
HedvigS commented 2 years ago

if you run

Rscript spatiophylogenetic_modelling/analysis/INLA_multi_models.R "real" 1 113

it will used precision_matrices_kappa_2_sigma_1.15.RDS