Closed RodolfoPelinson closed 2 years ago
Thanks for posting your issue!
In the last update a lot of changes were made in the r package, including the parameterization of the model. The theta coefficients are now relative to the diagonal of that matrix being one, for compatibility with model-based constrained ordination (the num.lv.c and num.RR arguments), and a scale parameter was added for the LVs, which you can examine with the summary function, so the number of parameters in the model has remained the same.
The issue you're having with the seed is because you're only specifying a single seed value, while asking for 20 model runs. If that would work, all 20 model runs would give the same result and you would wrongly get the impression you tried different starting values. So, if n.init=20, the length of seed should also be 20. The function should probably provide a more intuitive error message if the length of seed is not the same as n.init.
Thank you so much for the quick answer! It does make sense.
I made some corrections to the documentation so that they explain correctly those thetas in this commit
I also made some changes to the code in this commit, so that it does not return error if seed length is 1 in case of n.init>1. In this case, n.init seed numbers are sampled between 1-10000 like this:
set.seed(seed) # this is the original seed number, with length(seed)=1
seed <- sample(1:10000, n.init)
I think this was the way some time ago before, as well, but changed at some point. In case of seed=NULL, the first line is ignored and if seed length is same as n.init, the given seeds are used. So these are coming in the next update to CRAN
Thanks Jenni. FYI I still have a few minor bugfixes/changes on a separate branch that I will need to put in a PR for at some point.
I am unsuccessfully trying to reproduce the exact results I got in the previous version 1.3.0 with the new version 1.3.1. Specifically, I am getting different (and high!) values of the theta parameters for some species.
I wonder if this is an issue, a bug fix, or just some default setting that changed from one version to another. The only difference in the default settings that I noticed was the addition of the
lv.formula
,num.lv.c
,num.RR
,dist
, andcorWithin
arguments in thegllvm
function. Maybe it has something to do with the new possibility of adding structured random row effects. Additionally, theseed
argument seems to not be working. If this is not an issue, can you enlighten me on what is the difference between the two different sets of estimates?This is an example of the theta parameters of a small data set without environmental covariates.