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.
My default region is Europe, but I need to create a course for PharmaSUG on the server for United States 1. How do I create an account away from my default region?
... View more
Hi there, I am running into issues with the lag function. I am able to use lag(variable), if recalling only the observation immediately prior, however I am not able to use lag2(variable), lag3(variable), etc.. As soon as I enter a numerical value (n) next to the lag function, it is no longer highlighted in blue or recognized as a SAS function. Checking my data shows it is not picking up the function, beyond the first lag(variable), with no 'n' specified. Has anyone experienced this? I am using SAS Studio.
... View more
Please correct me if I miss something because just right now the example is a typical example showing how graph can make the user mad.
In the example two formats are used; one is assigned to the variable using the format statement ; the other one is set using the option tickvalueformat.
My original thought was that tickvalueformat would have priority over the variable format to set the tickvalues and that the variable format would be used to set the order of the bars.
However, in this example, we can see that the tick values are coming from the format assigned to the variable, but the format width is coming from the format given in the tickvalueformat option. As the default format label with of the sex format is 6, tick values are truncated.
proc format;
value $sex 'M'='Male'
'F'='Female';
value $sexnum 'M'='1-Male'
'F'='2-Female';
run;
proc sgplot data=sashelp.class noborder;
vbarbasic sex;
xaxis discreteorder=formatted tickvalueformat=$sex.;
format sex $sexnum.;
run;
proc sgplot data=sashelp.class noborder;
vbarbasic sex;
xaxis discreteorder=formatted tickvalueformat=$sex20.;
format sex $sexnum.;
run;
... View more
Sorry for the basic question but I am trying to figure out why data A has only 2 obs while data B has 4. Expecting A to have 4 obs. what is the logic for having only 2 obs ? /* A */
data a;
do i=1 to 4;
i+1;
output;
end;
run;
/* B */
%macro bb;
data b;
%do i=1 %to 4;
i+1;
output;
%end;
run;
%mend bb;
%bb;
... View more