I'm doing a pediatric study and the majority of sample's ages are repressented by year + months such as 6Y+4M. How can enter the data and calculate the mean in SPSS?
Assuming that you want age rounded to the nearest year, this syntax command would work:
compute age = Y + RND(M / 12 + 0.5) .
If you want age in months, then this syntax command would work:
compute age = 12 * Y + M .
(where Y = years, M = months)
In SPSS, from the main menu bar, choose Transform / Compute ...
then put the desired expression in, e.g., "age" as the new target variable, and the right-hand side of the relevant equation in the larger box at the top right of the dialog box that opens.
For a pediatric study, the second function, using months as the unit for the new variable (age), rather than years as the unit, might be preferred.