Creating an AI Assistant for SAS Viya in 5 steps (@sassoftware/viya-assistantjs) - Part I
Recent Library Articles
Recently in the SAS Community Library: SAS' @kumardeva debunks the myth that developing AI assistants is too hard. He shows you how to use the @sassoftware/viya-assistantjs library to jump start your development.
Hi all - ¿How can I connect files from a web server to sas viya? I want to automatically capture the log files in .gz, and then process them (ex: domain.com-2024-04-11.gz).
... View more
I'm trying to strip some operators from a string, leaving behind variable names. I'm using the following code which doesn't work. Is there some quoting needed?
%let expression = vara / (varb + varc);
%macro stripsym(string);
%sysfunc(translate(&string,,+-*/()));
%mend stripsym;
%put Output: %stripsym(&expression);
%put Desired: vara varb varc;
... View more
Anyone can help with following question? Thanks. In the logistic regression model, b1 is the coefficient of natural log transformed variable x, it is not the coefficient of original scale of x. logit (p/(1-p)) = b0+ b1 In (x) If b1=0.1, What is the OR for one unit increase in the natural log of x (e^0.1)? What is the OR for one unit increase in original scale of X? What is the OR for 5-unit increase in natural log of x ( ? What is the OR for 5-unit increase in X?
... View more
I'm making a pChart using PROC SHEWHART, and my subgroups (lots) have varying sizes. I want to give each lot the same weight when calculating pbar, rather than let lots with larger sample sizes have more weight.
I assumed PROC SHEWHART would have a WEIGHT statement, but it does not. My next thought is to calculate pbar myself, and then pass the value to SHEWHART via the p0 option on the pchart statement. Does this seem like a reasonable approach?
As an example, given data like:
data have ;
input lot pfailed ntested ;
cards ;
1 .1 20
2 .2 20
3 .1 20
4 .2 20
5 .4 60
;
PROC SHEWHART will calculate pbar as a weighted mean of the proportions, giving lot 5 more weight than the other lots, and you get pbar=.26.
proc shewhart data=have ;
pchart pfailed*lot/subgroupn=ntested dataunit=proportion;
run ;
My thought is to calculate pbar myself as the unweighted mean, and you get pbar=.2, and pass that value to PROC SHEWHART:
proc sql noprint;
select mean(pfailed) into :pbar trimmed
from have
;
quit ;
%put &=pbar ;
proc shewhart data=have ;
pchart pfailed*lot/subgroupn=ntested dataunit=proportion p0=&pbar;
run ;
... View more
Hi, I would like to apply two floors to the existing dataset below (Col1 values are sorted): 1) For any values in Col1 ❤️ replace their values in Col2 with that for Col1 =3; 1) For any values in Col1 >4 replace their values in Col2 with that for Col1 =4; Many thanks in advance. data have; input Col1 Col2; datalines; 1 1 2 2 3 3 4 4 5 3 6 2 7 1 ; data want; Col1 Col2; 1 3 2 3 3 3 4 4 5 4 6 4 7 4
... View more