Recently in the SAS Community Library: SAS' @Sundaresh1 highlights a sometimes overlooked task when applying document embeddings for purposes of similarity-based search. Normalisation of vectors helps obtain relevant matches.
Hi all, I have successfully created an annotated state map from geocoded address info using the states map. However, when I try to use the county map data set, it appears that the geocoding output does not match what information in the county map dataset. Here is a small program to illustrate the difficulty. Code doesn't get past proc gproject. It seems that the length of x and y of the map do not match the length of x and y in the geocoded output. thanks! Phil : libname lookup "D:\Documents\desi2023\frlanalyses\geocodedata__2006__ZIP4_Geocode_Data\data"; data zips; input c zip; anno_flag=1l cards; 1 65203 2 65211 3 65201 ; proc geocode /* Invoke geocoding procedure */ method=plus4 /* Specify geocoding method */ lookup=lookup.zip4 /* Lookup data from MapsOnline */ data=zips /* Input data set to geocode */ out=geocodedzips; /* Specify name of Output data set of locations */ run; data mocounties;set maps.counties;if state=29; data mocounties;set mocounties geocodedzips;run; proc gproject data=mocounties out=MOCountiesP; id state ; run; data my_map locations; set mocountiesP; if anno_flag=1 then output locations; else output my_map; run; data anno_locations; set locations; if c=1 then color="red"; if c=2 then color="bib"; if c=3 then color="viyg"; if c=4 then color="bippk"; xsys='2'; ysys='2'; hsys='3'; when='a'; function='pie'; rotate=360; size=.5; style='psolid'; output; length html $300; html='title='||quote(trim(left(citystate))||'0d'x||trim(left(put(zip,z5.)))); style='pempty'; color='deb'; output; run; pattern1 v=e; proc gmap data=mymap map=mymap anno=anno_locations; id county; choro segment / coutline=black levels=1 nolegend coutline=gray99;run;
... View more
I'm running proc report on a proc freq output table and the resulting table looks good except the rows under the "year" headers are offset (see data example below).
The code is running without errors -- any ideas what's going wrong?
data test;
input year biomarkername $ biomarkerstatus $ count pct_row;
cards;
2017 ALK N 2716 90.8969
2017 ALK P 87 2.9116
2017 ALK U 185 6.1914
2017 BRA N 1786 92.1569
2017 BRA P 91 4.6956
2017 BRA U 61 3.1476
2018 ALK N 2839 92.3552
2018 ALK P 72 2.3422
2018 ALK U 163 5.3025
2018 BRA N 2364 92.0202
2018 BRA P 136 5.2939
2018 BRA U 69 2.6859
;
run;
options missing=' ';
proc report data=test missing;
column biomarkername year,(biomarkerstatus count pct_row);
define biomarkername / group ;
define year / across ;
run;
... View more
I ran the following code and got the curve below.
proc lifetest data=sasuser.combine_aim2n2 plots=survival(f) timelist=(0 to 132 by 12); time month2*ui2(0); run;
Would there be a way to change the scale of x axis from 0 25 50 75 100 125 to 0 12 24 36 48 60 72 84 96 108 120 132?
... View more
Hello, I am getting this error message for INPUT function, could anyone please help me with this issue? TIA. Here is my code: data lb; merge adsl(in=a) lb1(in=b); length AVALC $50. SUBJID $15.; by USUBJID; if a and b; INDEX+1; SUBJID=substr(USUBJID,13,7); AVAL=LBSTRESN; AVALC=LBSTRESC; if LBCAT='COAGULATION' and LBTESTCD in ('APTT' 'INR' 'PT') or LBCAT='URINALYSIS' and LBTESTCD in ('URBILV' 'URGLUV' 'URPHV' 'URPROTV' 'URSGV'); run; proc sort data=lb1(where=(index(TRT01A,'Placebo')>0 and LBDTC^='')) out=lb_1(where=(input(LBDTC,e8601dt16.)<=TRTSDTM)); by INDEX; run; I'm getting ERROR: INPUT function reported 'ERROR: Invalid date value' while processing WHERE clause. LBDTC is character 2023-11-07T12:50
... View more