Skip to content
Discussion options

You must be logged in to vote

The typical way to analyse different age groups (or any other category) seperately would be to define an age group variable (either within the study definition, or after you have imported the extracted data for analysis) and then stratify or group your analysis on that variable.

To create an age group variable within the study definition you can use the patients.categorised_as function as follows (assuming age is defined elsewhere in the study definition):

age_group = patients.categorised_as(
        {
            "0": "DEFAULT",
            "16-59": """ age >= 16 AND age < 60""",
            "60-69": """ age >= 60 AND age < 70""",
            "70-79": """ age >= 70 AND age < 80""",
     …

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@sebbacon
Comment options

@YatishRam
Comment options

@wjchulme
Comment options

@YatishRam
Comment options

Answer selected by YatishRam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants