Hello,
I am putting together a script to build a table that will use a formula derived categorical variable as the columns. This scipt will be used on different data sets so I'd like to generalize it to show all values in the categorical variable even if the current data set does not show the value.
For example, say I have data set containing list of test subjects of different ages like so:
ID Age
1 40
2 11
3 21
4 36
and I include a formula column called "Age Bin" that has 3 groups: "< 10", "10-20" and ">=20", the table becomes:
ID Age Age Bin
1 40 ">=20"
2 11 "10-20"
3 21 ">=20"
4 36 ">=20"
If I use Tabulate to get a table of number of test subjects in the different age bins, I'd get the following:
">=20" "10-20"
3 1
Since I'd like to run this script on different data sets, is there a way to force Tabulate to show "<10" with a 0 count even though there is none in the current data set? The option "Include missing for grouping columns" does not apply for this case. I'd like to do this in JSL but I don't even know to do this with the control panel so any help would be appreciated.
Thanks in advance.