Frequency of id variables in table viewer

Discussions about tools to complement CSPro data processing
Forum rules
New release: CSPro 8.0
Post Reply
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

Frequency of id variables in table viewer

Post by AriSilva »

A frequency of the id variables (common variables) work, provided we do not use any filter using variables from a record type with multiple records.
For example, I want to know the ids of all persons with age > 75.
The program takes the filter variables using a subscript 0, which is invalid, as in the example below
W 1008 Subscrito inválido: PPO90_STATUS(0) -- Level ELSI_10_ENTREVISTA_QUEST PostProc
Best
Ari
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Frequency of id variables in table viewer

Post by Gregory Martin »

You have to use one of the multiple occurrence functions like:
seek(AGE > 75) > 0
count(AGE > 75) > 0
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Frequency of id variables in table viewer

Post by josh »

It also depends on what you are trying to count. If you are trying to count households with at least one member over 75 grouped by ids then you can use the frequencies tool, pick an id variable and use a universe like Greg suggested e.g. count(AGE>75) > 0.

If you are trying count individuals over 75 by ids then it is a bit more complicated. If you take the frequency of an id-variable then the frequency tool is going to count households. However if you take the frequency of a variable on the individual record then the frequency tool is going to count individuals. You can see this because the totals on those frequencies will usually be different. If you are counting individuals then you can use AGE without a subscript in the universe but if you are counting households you cannot since when looping over households the frequencies tool doesn't know which subscript to use for AGE - age of the first household member or age of the fifth household member?

So if you want to count individuals over 75 grouped by id variable you can't do that simply using the frequencies tool. You can however do it in a tabulation application since in the tabulation application you can change what you are looping over. So if you create a tabulation application and drag the id variable onto the left edge of the screen you end up with a table that looks like something that the frequencies tool would create. You can then right click on the table, pick "Tally Attributes (table)" and in the dialog that comes up under "Unit Tallied" pick the individual record and under universe enter AGE > 75.
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

Re: Frequency of id variables in table viewer

Post by AriSilva »

Maybe (I´m talking about a new feature) we could have something simpler, similar to the frequency of several value sets for te same variable, where you present the different valuesets and the user would choose which one.
In the case of the id variables (common), there would be an entry for each record type, and the user would choose which one to use, depending, of course, of the filter variables.
Sometime ago I had also suggested the possibility of having a frequency of the record type variable, which is very interesting, to be able to know how many records of each type you have in the database.
Best
Ari
Post Reply