How to resample friendships when bootstrapping by individuals Sheesh, I'm really confused.
So, I have a dataset of individuals, and a dataset of their friendships. I want to test whether a particular (numeric) variable is correlated among friends. To do this,
I am bootstrap resampling individuals.
My original data looks like:
NAME  VARIABLE
Joe   1
Sam   3
Pete  2
...   ...

with a friendship network like:
FRIEND1   FRIEND2
Joe       Pete
Joe       Sam
Sam       Jill
...       ...

My basic statistic is created by correlating friend 1's variable with friend 2's variable. That is, I join my tables to create:
VARIABLE1 FRIEND1 FRIEND2 VARIABLE2
1         Joe     Pete     2
1         Joe     Sam      3
3         Sam     Jill     4

Standard errors will be wrong, of course, because each friend may appear many times in the data.
So, I resample individuals with replacement. When I do this, I might get Joe's name 2 times and Pete's name 3 times. I then want to recreate the friendship network and rerun my correlation. By doing this many times, I will get the 
sampling distribution of my statistic.
But, how many times should the Joe-Pete friendship appear in the new data? I guess 2*3 = 6 times... is that right?
Examples in R would be welcome, but mostly I want to know how to think about this. (I'm even confused... is it legitimate to resample at individual level, given that by assumption friends' data is correlated... argh!!!)
 A: I don't feel ultra confident on my answer, but I would be interested to be reviewed if necessary. If I were you, I would go for a permutation test because it does not suffer from the non-independence you are pointing. Pick a good statistic that represents the effect you are studying. Something like $$S=\sum_{i,j} |V(i)-V(j)|*I_{i,j}$$ with $I_{i,j}=1$ if $i$ and $j$ are connected (0 otherwise). After computing this statistic for your data-set, do it for each permutation of your data by shuffling the VARIABLE column. 
NAME  VAR             NAME  VAR    NAME  VAR    NAME  VAR
Joe   1               Joe   2      Joe   5      Joe   5
Sam   3               Sam   3      Sam   3      Sam   3       ....
Pete  2               Pete  1      Pete  2      Pete  1
John  5               John  5      John  1      John  2
...   ...             ...   ...    ...   ...    ...   ...
Original data-set     data-set1    data-set2    data-set3      ....

In r this can be done with the built-in function sample on the column you wish to shuffle. As we do a permutation test (not a bootstrap procedure) there is no replacement.
For each new data-set, compute your $S_k$ score. If your hypothesis is true, your $S_k$ scores must be most of the time higher than $S$. 
Your p-value is the number of times your permuted set get better or equal $S_k$ score than your original S.
