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,
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
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
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 am working on a study. It has been planned to do multiple imputation for missing values related to the primary endpoint by an agency's requirements. I have read many materials online and have some ideas. But, I am still not sure. Study information: The study's indication is Epilepsy. Each patient is given a diary and they are supposed to record how many seizures they expeirenced each day during the study period (DB period is ~ 85 days). As you can image, some patients may forget to record their seizures on some days and some patients may discontinue from the study before the Day 85. So there are missing values for seizure counts on some days for some subjects. My questions: 1. Our missing type is considered as 'missing as random' and so this procedure(Proc MI) can be used, correct? 2. Since our missing data is only in one variable, i.e., seizure count, so I think I should NOT use the methods in SAS documentation (Imputation Methods, Table 5) with 'monotone', correct? 3. Since our data is 'seizure count', which should follow poission distribution (correct?), not normal, I should NOT use methods with 'MCMC' since MCMC method is based on the assumption of multivariate normal distribution (MVN) for variables, correct? 4. Then I thought I should use FCS, fcs reg, or fcs regpmm. I read SAS documentation, it has "The predictive mean matching method ensures that imputed values are plausible; it might be more appropriate than the regression method if the normality assumption is violated (Horton and Lipsitz 2001, p. 246)." So I thought I should use 'fcs regpmm'. I also tried 'fcs reg', the imputed values gives non-integer, a number with decimal. It seems it does not fit my case. Our seizure is an count; so it should be an interger. If I use 'fcs regpmm', the imputed values are integers. 5. If using 'fcs regpmm' is correct for my case, what number of 'k' (SAS option with 'fcs regpmm' option) should I pick? Here is the code I use. proc mi data = post nimpute = 25 out = post_mi seed = 54321 noprint; by subjid; var qsdy count;' fcs regpmm (/k = 5); run; Note: 'qsdy' is the study Day variable; it is from Day 1 till Day 85. 'count' is seizure count for each day. There are missings in this variable. Note: since the imputation is by subjid, so covariates such as age, treatment, etc, are not needed (no change for an individual), correct? If any detailed information is needed for this discussion, please ask me. Thanks a lot in advance. Xiaoshu
... 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