Page 1 of 1

multi-dimensional table

Posted: April 20th, 2021, 7:28 pm
by atr
Dear Support,

I am trying to tabulate a 3-dimensional table - rows will have citizenship by age group by sex and the column will be labor force.

Since the limitation for CSPro is only 2 dimension, I am trying to create a area name file (.anm) for Citizenship but could not work as the Area function in CSPro only provides for the Ids and Household record.

My .anm file is:

[Area Names]
Version=CSPro 7.6

[Levels]
Name=citizenship

[Areas]
1,2,3 = Citizen
4,5,6,7,8,9,10,11,12,99 = Non-Citizen

Grateful if you could show me how to use this to generate my required table.

Thanks in advance.

Re: multi-dimensional table

Posted: April 20th, 2021, 11:42 pm
by etuser
You can just drag citizenship as row and age group as a column. Drag and drop sex on top of the age group column,this automatically nested sex under age group for you. In this way u can add additional dimension, if needed.

Re: multi-dimensional table

Posted: April 21st, 2021, 12:56 am
by atr
Thanks etuser,

I understand your suggestion but it was a suggested table by our demographer. Your suggestion does not include the labor force variable i mentioned in my question, which I need in the columns.

Many thanks,
toga

Re: multi-dimensional table

Posted: April 21st, 2021, 4:18 am
by etuser
In that case what i usually do is , create a new variable by combining age group and sex using recode sex:age_group -> age_sex; and reduce the variables in to two ,In the row I drag Citizenship and Age_sex and on the column the labor force variable . May be the Cspro expert have more to say on this.

Re: multi-dimensional table

Posted: April 21st, 2021, 6:01 pm
by atr
Many thanks for this suggestion which I will try.
I would still love to know how we can use the .anm file to do this, for anyone who has done this option.

Greatly appreciate your response etuser !!!

Re: multi-dimensional table

Posted: April 22nd, 2021, 8:30 am
by Gregory Martin
As you noted, the area names processing works at a case level, so it can't work with items from a repeating variable. One option would be to restructure your dictionary (and potentially data file) to have the person line number as an ID item (which would mean that each case is a person), and then you could create your table, but that would be quite a bit of work.

The easier option, as mentioned by etuser, would be to create the recoded variable.

Re: multi-dimensional table

Posted: April 23rd, 2021, 12:48 am
by atr
Many thanks Greg for the clarifications.
Appreciate the response.

Best,