Page 2 of 10

Re: Mixed Models Module

Posted: Thu Sep 21, 2017 11:55 am
by jonathon
if you drop this on github somewhere, i can take a look. are you running the most up-to-date jmvtools and jamovi?

it looks like jmvtools is providing a less than helpful error message, so that's something we should address.

cheers

jonathon

Re: Mixed Models Module

Posted: Fri Sep 22, 2017 8:12 am
by mcfanda@gmail.com
Hi, another question: what is the logic behind the function .init() in the module.b.R. In the examples the code is executed usually in .run(), but I see some of the jmv modules (such as ANCOVA) have the .init() function before .run(). I'm using ANCOVA as a base for another module and I see that the output tables I define and populate in .run() do not get updated when the user changes some options. Some debugging shows that when the user changes some of the options only .init() is run, for some other options both .init() and .run() are executed. I cannot come around the the logic here. Thanks

Re: Mixed Models Module

Posted: Sat Sep 23, 2017 12:27 am
by jonathon
so most of the time `init()` isn't required, as the results objects, rows in tables, etc. can all be generated by the `.r.yaml` file.

however, there are times where the number of rows in a table, or the number of columns must be determined by the analysis itself. in these cases, tables/images/rows/columns need to be created/added in the init phase.

after the init phase, the values from *last* time the analysis was run are copied across to the new results objects/tables (if a value is no longer valid, this copying can be prevented by using the 'clearWith' property).

then the run phase begins (`.run()` is called).

however, there is a property in the .a.yaml file (i think) called `completeWhenFilled`. if this is 'true', and all the tables/images/results are filled in, then it concludes that the analysis is complete, and it doesn't need to begin the run phase. so, depending on what you want, you may want to remove this property, or you may want to make more use of `clearWith`s ... you probably want the latter.

makes sense?

feel free to start a new thread in future if it's a new question too.

cheers

jonathon

Re: Mixed Models Module

Posted: Sat Sep 23, 2017 9:25 am
by mcfanda@gmail.com
thanks, it makes perfect sense

Re: Mixed Models Module

Posted: Sat Sep 23, 2017 10:41 am
by jonathon
good that you ask. will prompt me to document some of these things properly!

jonathon

Re: Mixed Models Module

Posted: Thu Oct 05, 2017 11:16 am
by mcfanda@gmail.com
Hi
I get back to the init() problem. My situation is the following: Because the estimation of the model can be time consuming, I'd like the module to estimate it only when it is necessary. For instance, after the model has been estimated by setting the input variables, there is no need to estimate it again if the user asks for the plots.

Now, if the option completeWhenFilled is false, everything is re-run any time the user changes something in the UI. If completeWhenFilled is true, the model is estimated and the corresponding tables are filled in the first run, but when the user changes something later on in the UI, the results tables are empty and nothing happens, even if the user changes some UI filed which is associated with the results tables by a "clearWith:" statement

Re: Mixed Models Module

Posted: Thu Oct 05, 2017 11:20 am
by jonathon
Is it possible for you to commit this somewhere? i'll see if i can figure out why clearWith isn't working. we make use of clearWith *a lot*.

Re: Mixed Models Module

Posted: Thu Oct 05, 2017 11:23 am
by mcfanda@gmail.com
sure, I just pushed it on
https://github.com/mcfanda/jamovi_mixed

Re: Mixed Models Module

Posted: Thu Oct 05, 2017 11:35 am
by jonathon
thanks. can you attach an .omv file with an example of an analysis with this module?

i'm not that familiar with mixed models

with thanks

Re: Mixed Models Module

Posted: Thu Oct 05, 2017 11:53 am
by mcfanda@gmail.com