# How do you compute a new variable, controlled for age?

#### Julia_va

##### New Member
For my thesis, high school students completed a cognitive test. The test became increasingly difficult. The students also completed a questionnaire to measure their well-being.

I want to conduct a One-Way ANOVA to investigate if the 20% highest scoring students on the test have a higher level of well-being than the other students (the 80%).

First I have to create two groups. I want to compute a mean score of the subtests, but I want to control it for students' age (because age influences the test performance). How can I compute a new variable, controlled for age? (prior to analyses)

#### Karabiner

##### TS Contributor
Why do you want to adjust (don't say "control") for age? Do you have reason to assume
that age influences not only performance, but also well-being?

And why this artificial dichotomization? Is the student in the 80th percentile really
radically different from that in the 81th percentile, and at the same time very similar
to the worst students in the 1st percentile?

Anyway, you could do a multiple regression with "performance" (either as continuous
variable; or as 0/1 variable representing lowest 80%/highest 20%) and "age" as
predictors. That will give you the association of performance with well-being,
accounting for age. You could even add an interaction term age*performance
(if it would be possible that performance is more closely related to well-being
in some ages than in others).

With kind regards

Karabiner

#### Julia_va

##### New Member
Thank you for your response and thinking along. I will take it into account in my considerations.

However, theoretically we have reasons to use these groups of 20% and 80% because the highest scoring students may be cognitively gifted. In a multiple regression, it is investigated whether the degree of cognitive abilities (controlled for age) predict the degree of well-being. We want to investigate whether 'belonging to a certain group' (in this case the cognitively gifted) influences the degree of well-being.

My supervisor advised me to conduct ANOVAs. So to use the two groups of 20% and 80% as a dependent variable, I need to compute a new variable for the testscore, controlling for age. Do you know if this is possible?

#### Julia_va

##### New Member
An option is to:
- define the 20% highest scoring students per age category as high achievers
- define the 80% lowest scoring students per age group as non-high achievers
- using the performing group (high vs. non-high) as independent variable and well-being as dependent variable in the ANOVAs

But if it is possible to compute a new variable, controlling for age, prior to the analyses, then I would definitely prefer that option.

#### Karabiner

##### TS Contributor
However, theoretically we have reasons to use these groups of 20% and 80% because the highest scoring students may be cognitively gifted.
That would mean, those in the 79th percentile have to be treated the same as identical to those in the 1st percentile.

Plus, you did not mention where your sample comes from. If one uses normative values to determine who is gifted
and who is not -- then o.k., that would be dubious (see above), but one could see some reason in it.

But if one determines giftedness just by dichotomizing a sample, so that ANY sample contains 20% "gifted", then this is

Anyway, I just mentioned this for people who might by chance be directed to this thread.

My supervisor advised me to conduct ANOVAs. So to use the two groups of 20% and 80% as a dependent variable, I need to compute a new variable for the testscore, controlling for age. Do you know if this is possible?
I simply do not know the research question behind that. My guess:
a) tell your supervisor that you can conduct a linear regression with "age" and "giftedness yes/no" as predictors; this means, the effect of giftedness is adjusted for age
b) tell your supervisor, that you can conduct an ANCOVA with "giftedness" as factor, and "age" as covariate; this means, the effect of giftedness is adjusted for age; you can display "marginal means" (adjusted for age) for the 2 groups
c) ask your supervisor what exactly he wants you to do, and why,
if a) and b) do not satisfy him.

With kind regards

Karabiner

Last edited: