IBM SPSS Data Collection – Numeric variable distribution

This is the first in a long series of articles on IBM SPSS Data Collection. Through these articles, we will share with you our experience and tips and tricks that we discover day after day, through our use of IBM SPSS Data Collection.

There are several ways to examine the results provided by a numerical variable. We can just look at the general values such as minimum, maximum, mean and standard deviation.
We may also want to go further by looking at the distribution of the values taken by this variable, in order to, for instance, separate it into several classes.

In a MRS script (mrScript), we can’t use a numeric variable as it is : there is no default behavior set for this kind of variable.
In order to represent the distribution of a numeric variable, let’s say for instance the respondent’s age “age”, we store this distribution in a categorical variable “age_distrib” with the following syntax :

TableDoc.Coding.CreateCategorizedVariable("age","age_distrib",,,,false,false,)

Then we just have to use this variable in a table definition as in the following example :

With TableDoc.Tables
     .AddNew("Table1","age_distrib","age")                            
End With

And this finally gives us the following result :

distribution_age

 

In our next article, we’ll see how it is possible, with IBM SPSS Data Collection, to automatically collect the names of questions of a study.

IBM SPSS Data Collection – Numeric variable distribution
Noter cet article.

Leave a Reply

Your email address will not be published. Required fields are marked *