Advanced tables and statistics > Dealing with hierarchical data > Analysis levels > Numerics with levels
 
Numerics with levels
In levels data, you need to be careful not use numeric data from a lower level at a higher level, because the figures are meaningless. However you can use numeric data from a higher level at a lower level, although if you use the same numeric field or variable at more than one level, Quantum gives the warning:
Same inc= at two different levels
For example, suppose there are two levels, household and person, and preweight figures are held in columns 108 to 115 at the household level. You need to apply the preweight to both levels. If you use the column spec to define the preweights at both levels, Quantum gives the warning because it uses the same numeric field at two different levels:
struct;read=2;ser=c(1,5);crd=c(6,7)
+lev=hhold,1
+lev=person<hhold,2

a;
wm1 ax1;pre=cx(108,115);anlev=hhold;factor;1
wm2 ax2;pre=cx(108,115);anlev=person;factor;1

l ax1;anlev=hhold
n01Total
l ax2;anlev=person
n01Total
As long as you have not used a lower level numeric at a higher level, and you are not preparing a study for Quanvert, you can safely ignore the warning. However, if you are preparing a study for Quanvert, you must not use a numeric at more than one level. If necessary you must set up a numeric variable at each level in the edit section. For example:
struct;read=2;ser=c(1,5);crd=c(6,7)
+lev=hhold,1
+lev=person<hhold,2
real hwts 1
real pwts 1

ed hhold
hwts=cx(108,115)
level person
pwts=cx(108,115)
return
end

a;
wm1 ax1;pre=hwts;anlev=hhold;factor;1
wm2 ax2;pre=pwts;anlev=person;factor;1

l ax1;anlev=hhold
n01Total
l ax2;anlev=person
n01Total
Note If the preweight figures in this example were held at the person level, this solution would not be appropriate, because you must not use numeric data from a lower level at a higher level.
See also
Analysis levels