multi-dimensional table

Discussions about tabulating data in the designer or in batch mode
Post Reply
atr
Posts: 25
Joined: August 25th, 2014, 7:03 pm

multi-dimensional table

Post by atr » April 20th, 2021, 7:28 pm

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.

etuser
Posts: 48
Joined: September 3rd, 2019, 5:57 am

Re: multi-dimensional table

Post by etuser » April 20th, 2021, 11:42 pm

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.

atr
Posts: 25
Joined: August 25th, 2014, 7:03 pm

Re: multi-dimensional table

Post by atr » April 21st, 2021, 12:56 am

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

etuser
Posts: 48
Joined: September 3rd, 2019, 5:57 am

Re: multi-dimensional table

Post by etuser » April 21st, 2021, 4:18 am

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.

atr
Posts: 25
Joined: August 25th, 2014, 7:03 pm

Re: multi-dimensional table

Post by atr » April 21st, 2021, 6:01 pm

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 !!!

Gregory Martin
Posts: 1475
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: multi-dimensional table

Post by Gregory Martin » April 22nd, 2021, 8:30 am

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.

atr
Posts: 25
Joined: August 25th, 2014, 7:03 pm

Re: multi-dimensional table

Post by atr » April 23rd, 2021, 12:48 am

Many thanks Greg for the clarifications.
Appreciate the response.

Best,

Post Reply