![]() |
EXPANDName:
where <lab> is a variable containing lab or group id's; <xval> is a variable (with length equal to the number of distinct values in <lab>); <y> is a variable of the same length as <lab> where the coded values are stored; and where the <SUBSET/EXCEPT/FOR qualification> is optional.
skip 25 read gear.dat y x . set let cross tabulate collapse let ymean = cross tabulate mean y x . let y2 = expand x ymean set write decimals 3 print x y y2The following output is generated. --------------------------------------------- X Y Y2 --------------------------------------------- 1.000 1.006 0.998 1.000 0.996 0.998 1.000 0.998 0.998 1.000 1.000 0.998 1.000 0.992 0.998 1.000 0.993 0.998 1.000 1.002 0.998 1.000 0.999 0.998 1.000 0.994 0.998 1.000 1.000 0.998 2.000 0.998 0.999 2.000 1.006 0.999 2.000 1.000 0.999 2.000 1.002 0.999 2.000 0.997 0.999 2.000 0.998 0.999 2.000 0.996 0.999 2.000 1.000 0.999 2.000 1.006 0.999 2.000 0.988 0.999 3.000 0.991 0.995 3.000 0.987 0.995 3.000 0.997 0.995 3.000 0.999 0.995 3.000 0.995 0.995 3.000 0.994 0.995 3.000 1.000 0.995 3.000 0.999 0.995 3.000 0.996 0.995 3.000 0.996 0.995 4.000 1.004 0.998 4.000 1.002 0.998 4.000 0.994 0.998 4.000 1.000 0.998 4.000 0.995 0.998 4.000 0.994 0.998 4.000 0.998 0.998 4.000 0.996 0.998 4.000 1.002 0.998 4.000 0.996 0.998 5.000 0.998 0.991 5.000 0.998 0.991 5.000 0.982 0.991 5.000 0.990 0.991 5.000 1.002 0.991 5.000 0.984 0.991 5.000 0.996 0.991 5.000 0.993 0.991 5.000 0.980 0.991 5.000 0.996 0.991 6.000 1.008 0.998 6.000 1.012 0.998 6.000 1.008 0.998 6.000 0.997 0.998 6.000 0.988 0.998 6.000 1.002 0.998 6.000 0.995 0.998 6.000 0.998 0.998 6.000 0.981 0.998 6.000 0.996 0.998 7.000 0.990 1.001 7.000 1.004 1.001 7.000 0.996 1.001 7.000 1.000 1.001 7.000 0.998 1.001 7.000 1.000 1.001 7.000 1.018 1.001 7.000 1.010 1.001 7.000 0.996 1.001 7.000 1.002 1.001 8.000 0.998 1.000 8.000 1.000 1.000 8.000 1.006 1.000 8.000 1.000 1.000 8.000 1.002 1.000 8.000 0.996 1.000 8.000 0.998 1.000 8.000 0.996 1.000 8.000 1.002 1.000 8.000 1.006 1.000 9.000 1.002 0.998 9.000 0.998 0.998 9.000 0.996 0.998 9.000 0.995 0.998 9.000 0.996 0.998 9.000 1.004 0.998 9.000 1.004 0.998 9.000 0.998 0.998 9.000 0.999 0.998 9.000 0.991 0.998 10.000 0.991 0.994 10.000 0.995 0.994 10.000 0.984 0.994 10.000 0.994 0.994 10.000 0.997 0.994 10.000 0.997 0.994 10.000 0.991 0.994 10.000 0.998 0.994 10.000 1.004 0.994 10.000 0.997 0.994
Date created: 01/27/2012 |