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.
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 all,
Whenever I import my data into SAS, this note below. Any ways around keeping the original data type when using proc import. Thanks.
NOTE: One or more variables were converted because the data type is not supported by the V9 engine. For more details, run with options MSGLEVEL=I.
... View more
Using the following dataset for illustration:
data test;
input id $ x y;
cards;
a1 1 2
a1 1 4
a1 2 8
a1 2 16
b1 2 2
b1 2 4
b1 2 8
b1 3 16
b1 4 32
;
run;
I'd like to retain all records sharing the lowest values of x by subject id:
id x y
a1 1 2
a1 1 4
b1 2 2
b1 2 4
b1 2 8
There's a simple solution I'm missing -- tried the following code but it didn't work:
data test2;
set test;
by id x;
if first.x;
run;
... View more
Hi all,
Please help me to code this. This is the dataset below-
I have 2 drugs being used for each ID i.e., SGA and DM. I have multiple start date and end dates for each ID and drug. I want to see if the DM_start falls into any of the SGA_start and SGA_end under each id. That is DM_start of period 3 can fall in the SGA_start and SGA_end of period1.
And also calculate the number of overlapping days for each time period. I want to know the no. of days for each orange period.
Thank you all in advance,
Any help would be appreciated.
... View more
Hi experts,
I am using SAS Mirror Manager and I am noticing something odd. I am using the "--deployment-assets" parameter to point to the deployment assets file downloaded from my.sas.com but it seems like SAS Mirror Manager is always downloading the latest release and not the release found in the deployment assets file.
According to the doc I expected it to download the same cadence and release found in the deployment assets file and not the latest release. I verified the downloaded release in the downloaded path:
../sas_repos/rel/stable/2024.04
I see there:
relFormatVersion":"0.0.1","name":"stable","version":"2024.04","latest":{"duList":"lod/stable/2024.04/20240511.1715441583768
But my deployment assets file name has a different release:
stable_2024.04_20240423.1713898974806
The command I am using is:
$MIRRORMGRPATH/mirrormgr mirror registry --path ${MIRRORPATH} --deployment-data ${ASSETSPATH}/${CERTSFILE} --deployment-assets ${ASSETSPATH}/${ASSETSFILE}
What am I missing here? Maybe I am looking in the wrong place.. where can I see/verify which release was downloaded by mirror manager?
... View more