aggregate - Is there a way to match variables (e.g., grant number; number of hours) when aggregating and each person has multipl

enter image description hereI have an SPSS dataset in which persons have data in multiple rows. The row

enter image description hereI have an SPSS dataset in which persons have data in multiple rows. The rows represent a different agency and different grant hours. There are over 70 variables, which is why I have shortened to focus on six variables. The variables are InstName (Agency Name, e.g., Beyond Literacy); adultpk (unique number for each adult); total hours (sum of all hours across all agencies and grants); then three grant numbers with the number of hours attended). Thus, adult 1 is in 2 agencies; in one agency, the adult had 2.50 hours, while in the second agency (row 2), the adult had 15.90 hours.

When I aggregate, the problem is that the agency name does not match up with the corresponding grant and grant hours. I aggregate on adultPK because each person can be in different agencies, different grants, and have different hours based on the agency and grant number enrolled in (see image). Further, just because the person was in two agencies, does not mean that the agencies are different. Some agencies are subcontractors. Thus the main contractor and subcontractor are the same and the person is only in 1 agency. This is why I aggregated InstName first and last. I created a variable that identified which grants each agency has. But that didn't solve the problem. I've tried identifying the primary and duplicate adultpk. That didn't work. I tried identifying the grant number with the most hours and then link that to the InstName, but that didn't work. The aggregate only works if the adult is in one agency only.

I've spend hours searching for similar questions in SPSS forum, stack overflow, journal articles without success.

what the data looks like in SPSS SPSS syntax

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745172915a4615035.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信