Results 1 to 3 of 3

Thread: Run random draw of specific number from list, sum one variable, and average another??

  1. #1

    Run random draw of specific number from list, sum one variable, and average another??



    Register for a FREE account, and/
    or Log in to avoid these ads!

    I am completely stumped on how to solve my problem. Hopefully someone here will know just the trick :-)

    I have data for groups of different sizes and I need to re-create these group characteristics using aggregate data from individuals.

    Specifically, I need to randomly select different numbers of individual level "Person IDs" (based on the group size) and then sum the values of variable X across those randomly selected people. Also, I need to average the values of variable Y across those randomly selected people.

    This sounds a bit confusing so I have attached a sample spreadsheet that clearly outlines my problem.

    I need to do this procedure for thousands of rows of data and would love to be able to automate it.

    Thanks so much in advance for your help!!! I really appreciate it!!
    Attached Files Attached Files

  2. #2
    by the way, I have attached an updated spreadsheet with the format of the output that I would like.


    Any suggestions would be greatly appreciated. Thanks!
    Attached Files Attached Files

  3. #3
    Super Moderator Pecoflyer's Avatar
    Join Date
    Oct 2011
    Location
    Brussels Belgium
    Posts
    1,461
    Articles
    0
    Excel Version
    2010 on Xubuntu

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •