saving analysis output while using filters

Everything related to the development of modules in jamovi
Post Reply
sbalci
Posts: 125
Joined: Sat Jan 06, 2018 10:25 pm
Contact:

saving analysis output while using filters

Post by sbalci »

Hi,

I recieved the following email.
They are using jsurvival while filtering out some cases. When they want to save the calculated output to the data it is saved sequentially ignoring the filters.
For illustration purpose, you can imagine there are 10 rows representing 10 cases, after applying the filter, only case 1,3,5,7,9 are used in the analysis. When the calculated survival duration is saved to the dataset, it is saved to case 1,2,3,4,5 instead.

How can I fix this?


Best wishes

Serdar


Dear Dr. Balci,

Hello! This is Ryan Ho from Hong Kong writing. I am a haematological oncologist in practice. A huge shout-out to your heroic effort in making the ClinicoPath survival module on Jamovi!

I would like to seek your advice on the following: I ran the single arm survival analysis on my dataset under a filter (set using Jamovi). I calculated the survival duration using two date variables. Afterwards, I tried to store the calculated time interval to the dataset. It turned out the calculated time is stored to both rows inside and outside the filter.

For illustration purpose, you can imagine there are 10 rows representing 10 cases, after applying the filter, only case 1,3,5,7,9 are used in the analysis. When the calculated survival duration is saved to the dataset, it is saved to case 1,2,3,4,5 instead.

I wonder if this might have been a problem with the way I am using Jamovi, since I am a complete newbie.

Would like to hear you expert advice on this. Thank you so much!

Best,
Ryan Ho
User avatar
jonathon
Posts: 2627
Joined: Fri Jan 27, 2017 10:04 am

Re: saving analysis output while using filters

Post by jonathon »

you'll find there's a $setRowNums() method on the output variables. this is how we do it in ANCOVA

https://github.com/jamovi/jmv/blob/mast ... #L633-L638

cheers
sbalci
Posts: 125
Joined: Sat Jan 06, 2018 10:25 pm
Contact:

Re: saving analysis output while using filters

Post by sbalci »

Thank you very much.
I have fixed the issue.
Best wishes
Post Reply