Page 1 of 1
Splitting the dataset using age
Posted: Sun Jun 28, 2020 2:52 pm
by Olivia42
Hi,
I want to split my data into two groups based on age but I can't figure out how to do it. I assume that I would do it using a filter but it isn't working for me so any advice you have would be appreciated.
Thanks.
Re: Splitting the dataset using age
Posted: Wed Jul 01, 2020 10:25 am
by jonathon
scroll down to the second part of this blog post, under 'column filters'.
https://blog.jamovi.org/2018/04/25/jamovi-filters.html
it's not pretty, but it does work.
cheers
Re: Splitting the dataset using age
Posted: Wed Jul 01, 2020 12:28 pm
by MAgojam
Hi, @ Olivia42.
Here are two of the possible ways to answer your question.
Take a look at the two attached screenshots.
In the first, the use of two filters, to be activated and deactivated to select the interest group to work on.

- ScreenShot1.PNG (51.8 KiB) Viewed 8660 times
In the second, compute a new variable to define the two groups of interest.

- ScreenShot2.PNG (36.65 KiB) Viewed 8660 times
Cheers,
Maurizio
Re: Splitting the dataset using age
Posted: Mon Jul 25, 2022 8:27 am
by fredgresch
Hi Maurizio,
I am about to do a similar thing with age, but would like to divide in three groups (0,1 & 2). I am doing a study about barrieres in the environment vs self-efficacy and would like to test if old and the young are effected, but not middle aged.
Due to som ethical limitations I have age in the following groups and would like to split them as shown
15 - 17, 18 - 20, 21 - 24
25 - 30, 31 - 40, 41 - 50
51 - 60, 61 - 70, 71 -
How do I then write the formula?
Re: Splitting the dataset using age
Posted: Mon Jul 25, 2022 9:53 am
by MAgojam
fredgresch wrote:I have age in the following groups and would like to split them as shown
Hey @fredgresch,
I may not have figured out how you computed your Age variable, but if it's like I did for the attached screenshot, there is also the suggestion to compute a new variable into just three groups (0, 1, 2).

- Age_class.PNG (49.79 KiB) Viewed 6904 times
Return if necessary.
Cheers,
Maurizio
Re: Splitting the dataset using age
Posted: Tue Jul 26, 2022 7:57 am
by fredgresch
Thank you,
works like a charm:)