loops - Generate variables that move information between rows in hierarchical data with spss syntax -


i wondering if can me following problem in spss syntax. dataset has nested structure.

data nested in companies, each company has 1 or 2 bosses, in case care boss 1. @ previous stage in time boss graded workers (not of them). now, id , grade of workers on row each worker.

i move information obtained during worker's assessment , create new sets of variables each (worker id , grade) on line/row of boss.

+---------+------+--------+--------------+---------+---------+--------+---------+ | company | boss |workerid|worker's grade|n:workid1|n:grade1 |n:work2 |n:grade2 | +---------+------+--------+--------------+---------+---------+--------+---------+ |       |   1  |   1    |              |   3     |       |   4    |       | |       |   2  |   2    |              |         |         | |       |   0  |   3    |            |         |         | |       |   0  |   4    |            |         |         | |       |   0  |   5    |              |         |         | |    b    |   1  |   1    |              |    3    |   b     |   4    |       | |    b    |   0  |   2    |              |         |         | |    b    |   0  |   3    |       b      |         |         | |    b    |   0  |   4    |            |         |         | |    c    |   1  |   1    |              |    2    |    d    |   -1   |   -1    | |    c    |   0  |   2    |       d      |         |         | 

i move worker's id , grade row of boss in new variables, without loosing existing variables on workerid , worker's grade.

basically, need feed forward information new variables , row of boss eq 1 separately each company.

i have no idea how proceed this. assume need loop creates new variable each worker id has valid grade , feeds forward information worker's row boss' newly generated variables. suggestions wellcome :-)

take @ varstocases (data > restructure)


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -