Splitting the dataset using age

General help and assistance with jamovi. Bug reports can be made at our issues page: https://github.com/jamovi/jamovi/issues . (If you're unsure feel free to discuss it here)
Post Reply
Olivia42
Posts: 3
Joined: Wed Jun 17, 2020 4:01 pm

Splitting the dataset using age

Post 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.
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: Splitting the dataset using age

Post 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
User avatar
MAgojam
Posts: 421
Joined: Thu Jun 08, 2017 2:33 pm
Location: Parma (Italy)

Re: Splitting the dataset using age

Post 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
ScreenShot1.PNG (51.8 KiB) Viewed 3650 times
In the second, compute a new variable to define the two groups of interest.
ScreenShot2.PNG
ScreenShot2.PNG (36.65 KiB) Viewed 3650 times
Cheers,
Maurizio
fredgresch
Posts: 3
Joined: Thu Apr 28, 2022 11:45 am

Re: Splitting the dataset using age

Post 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?
User avatar
MAgojam
Posts: 421
Joined: Thu Jun 08, 2017 2:33 pm
Location: Parma (Italy)

Re: Splitting the dataset using age

Post 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
Age_class.PNG (49.79 KiB) Viewed 1894 times
Return if necessary.

Cheers,
Maurizio
fredgresch
Posts: 3
Joined: Thu Apr 28, 2022 11:45 am

Re: Splitting the dataset using age

Post by fredgresch »

Thank you,

works like a charm:)
Post Reply