libname in1 "C:\Users\kenfrank\Documents\kfrankTDrive\My Documents\MULLER\friendship formation";
title "all factorial new meaning ";
*in1.foranal(where=(twave1=0 and rtwave1=0 and 9.5 < egrade < 11.5 and 9.5 < grade < 11.5 )) ;
*weight normwtd;
/*data ties; set in1.newego;
oties=sum(of out0,out1);
ities=sum(of in0,in1);
run;
proc freq data=ties(where=(9.5 < grade < 11.5)) ;
tables oties ities;
run;
data in1.foranal2;
set in1.foranal;
onetie=0;
if bothtie=0 and anytie=1 then onetie=1;
run;
*/
data one;
input tcounter;
cards;
1
;
data makem;
file "C:\Users\kenfrank\Documents\kfrankTDrive\My Documents\MULLER\friendship formation\allest new meaning.sas";
set one;
if _n_=1;
put 'libname in1 "D:\AH\locker\kenfrank";';
put
"data in1.baselinen; ";
put "set in1.foranal3(drop=_type_);";
put "if _n_=1;";
put "sties=0 ;";
put "weighted=0 ;";
put "prior=0 ;";
put "closetie=0 ;";
put "xencou5=0 ;";
put "cprior=0 ;";
put "directed=0 ;";
put "samelp5= .;";
put "_type_=' none ';";
put "keep sties weighted prior closetie xencou5 cprior directed ";
put "ograde oogpa94 academic arts sports samerace2 bothwhite girlgirl boyboy opared oage2";
put "samelp5 encou5 encow5 mutfriend _type_;";
put "run;";
do a=1 to 2;
do b=1 to 2;
do c=1 to 2;
do d=1 to 2;
do e=1 to 2;
do f=1 to 2;
do g=1 to 3;
doit=1;
if c=1 and f=2 then doit=0;
if doit=1 then do;
put "proc logistic data=in1.foranal3(where=(" @;
if c=1 and f=1 then put "twave1=0 and rtwave1=0 and" @;
put " 9.5 < egrade < 11.5 and 9.5 < grade < 11.5 and ego_aid < oth_aid and samef=0" @;
if g=2 then put " and bothtie=0 " @;
if g=3 then put " and onetie ne 1 " @;
put ")) descending noprint covout";
put "outest=withest;";
if b=2 then put "weight normwtf;";
put "class school eties aties ;";
put "model " @;
if d=2 then put "closetie " @;
if d=1 then put "anytie " @;
put "=ograde oogpa94 academic arts sports samerace2 bothwhite girlgirl boyboy opared oage2
samelp5 " @;
if e=1 then put " encow5 " @;
if e=2 then put " encou5 " @;
put "mutfriend " @;
if f=2 and c=2 then put " twave1 rtwave1 " ;
if a=1 then put " eties aties ";
if a=2 then put " sties ";
put " school;";
put;
put "data makeit;";
put "set withest;";
put 'if _type_="PARMS" OR (_type_="COV" AND _name_="samelp5");';
put "sties=" a ";";
put "weighted=" b ";";
put "prior=" c ";";
put "closetie=" d ";";
put "xencou5=" e ";";
put "cprior=" f ";";
put "directed=" g ";";
*put "reciprocated=" h;
put "keep sties weighted prior closetie xencou5 cprior directed
ograde oogpa94 academic arts sports bothwhite samerace2 girlgirl boyboy opared oage2
samelp5 encou5 encow5 mutfriend _type_ ;";
put;
put "proc append base=in1.baselinen data=makeit force;";
put "run;";
put;
end;
end;
end;
end;
end;
end;
end;
end;
put "proc sort data=in1.baseline out=byt; by _type_;";
put "proc univariate plot data=byt(where=(samelp5 ne .));";
put "by _type_;";
put "var samelp5;";
put "run;";
put "ods pdf style=journal2;";
put "ods pdf file='D:\AH\locker\kenfrank\samelp5 out';";
*ods listing close;
put "proc sgplot data=byt (where = (samelp5 ne .)) ;";
put "by _type_;";
put "histogram samelp5;";
* density height;
* density height / type=kernel;
put "run;";
put "ods pdf close;";
run;
** end here;