Many often, people ask a question like, "I have two variables named height and weight in SPSS; how do I use the formula to find out a third variable named BMI for all the cases/observation?" Some people even perform calculations manually and find out the result for each observation. However, see the steps below to carry out the functions automatically using SPSS. This is possible by the use of "compute variable" feature of SPSS which is explained below:
Steps of using compute variable feature in SPSS:
1. First of all, open a data set where you have the desired variable which you want to use for performing compute feature. In this case, I entered the hypothetical height and weight of 9 cases.
2, After that, note the formula which is to be used to perform compute variable feature. Here, I want to calculate a new variable BMI by using the formula, BMI=weight_gram/(height_cm*height_cm)*100
3. Click on transform, compute variable
4. Then you see the following dialog box
If you have any comments or queries, place a comment below. Share the tutorial so that others may too benefit. See you in the next tutorial.