*file called influence1.sas in the influence directory; *This makes the new influence variables from wnetwork and yvar; options nocenter; options linesize=120; options pagesize=58; options linesize=78; *a way of creating influence variables using proc means; data w; input nominator nominee relate; label relate="extent of relationship between person1 and person2"; cards; 1 2 1 1 3 1 2 1 1 2 3 1 3 2 1 3 4 1 3 6 1 4 5 1 4 6 1 5 4 1 6 3 1 6 4 1 proc sort data=w; *note: sorting by nominee the chosen, or i', to merge on the y-value; by nominee; *yvar1 contains belief or behavior at time 1; data yvar1; input nominee yvar1; nominator=nominee; cards; 01 2.4 02 2.6 03 1.1 04 -.5 05 -3 06 -1 proc sort data=yvar1; by nominee; *constructing attractiveness if you want to use in for weights, less important; proc means data=w noprint; var relate; by nominee; output out=attract sum=attract; *Now constructing the influence term; data withy; merge w yvar1(drop=nominator) attract; by nominee; if nominator ne nominee; *If you want to include attractiveness as in "Social capital and the implementation of computers ..." then set useattr=1; useattr=0; extra=1; if useattr=1 then extra=attract; infl=relate*yvar1*extra; label infl="influence = wy"; run; proc sort; by nominator; proc means noprint data=withy; var infl; by nominator; output out=infl mean=totinfl; *Now getting expansiveness; proc sort data=w out=w2; by nominator; proc means data=w2 noprint; by nominator; var relate; output out=expanse sum=expanse; *yvar2 contains data at time 2; data yvar2; input nominator yvar2; cards; 01 2 02 2 03 1 04 -.5 05 -2 06 -.5 proc sort; by nominator; data withinfl; merge yvar2 yvar1 infl expanse attract(rename=(nominee=nominator)); by nominator; drop nominee _type_ _freq_; proc print; run; proc reg data=withinfl; model yvar2=totinfl yvar1 / noint; output out=withres r=resy2 p=prey2; run; proc print data=withres; run;