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 I have a file uploaded to a big data platform showing correct d.p but somehow when our clients see the same file via ODBC, the decimal place change from 4 to 2, how did that happen? Do I need to setup schema for showing data via ODBC or there is specific settings required dealing with?
... View more
Hi there, I have a quick question about manipulating a dataset in SAS. I have included a sample dataset below. Date Country Weekly Cases 2021-08-09 United States 500 2021-08-10 United States 0 2021-08-11 United States 0 2021-08-12 United States 0 2021-08-13 United States 0 2021-08-14 United States 0 2021-08-15 United States 325 2021-08-16 United States 0 2021-08-17 United States 0 2021-08-18 United States 0 2021-08-19 United States 0 2021-08-20 United States 0 2021-08-21 United States 0 2021-08-10 United Kingdom 100 2021-08-11 United Kingdom 0 2021-08-12 United Kingdom 0 2021-08-13 United Kingdom 0 2021-08-14 United Kingdom 0 2021-08-15 United Kingdom 0 2021-08-16 United Kingdom 400 2021-08-17 United Kingdom 0 2021-08-18 United Kingdom 0 2021-08-19 United Kingdom 0 2021-08-20 United Kingdom 0 2021-08-21 United Kingdom 0 What I am trying to do is report the number of cases by week for each country in my dataset. However, what I noticed is that countries did not always report on the same day of the week. I was wondering if there was a way for me to manipulate the data so that I could divide the weekly count into daily counts (important to note that a weekly count might not always represent a 7 day reporting week, in my example below the first weekly count for US represent 6 days and the 2nd weekly count represents 7 days). Ideally every time a weekly count is presented for each country, I would like that number to be divided equally until the next weekly count is present for that country. I have included what I would like my data to look like instead. Date Country Weekly Cases Daily Cases 2021-08-09 United States 500 83.3 2021-08-10 United States 0 83.3 2021-08-11 United States 0 83.3 2021-08-12 United States 0 83.3 2021-08-13 United States 0 83.3 2021-08-14 United States 0 83.3 2021-08-15 United States 325 46.4 2021-08-16 United States 0 46.4 2021-08-17 United States 0 46.4 2021-08-18 United States 0 46.4 2021-08-19 United States 0 46.4 2021-08-20 United States 0 46.4 2021-08-21 United States 0 46.4 2021-08-10 United Kingdom 100 16.7 2021-08-11 United Kingdom 0 16.7 2021-08-12 United Kingdom 0 16.7 2021-08-13 United Kingdom 0 16.7 2021-08-14 United Kingdom 0 16.7 2021-08-15 United Kingdom 0 16.7 2021-08-16 United Kingdom 400 66.7 2021-08-17 United Kingdom 0 66.7 2021-08-18 United Kingdom 0 66.7 2021-08-19 United Kingdom 0 66.7 2021-08-20 United Kingdom 0 66.7 2021-08-21 United Kingdom 0 66.7 I have a pretty large dataset (400k observations) with 230 unique countries that span a few years. Again the countries did not always report their weekly count on the same day, and the weekly counts don't always represent a 7 day count. If there is a way I can easily manipulate the dataset to do the above daily count, I would really appreciate it! Thank you so much for any advice that you can provide!
... View more
Hello, I am working on repeated logistic regression using proc genmode. In the model, I used interaction term. In the result file, I am able to make the following lists for the file using this code: data parameter1; set CpG; if Parm = "Intercept" then delete; if Parm = "MO_SPT_12m" then delete; if Parm = "gender" then delete; if Parm = "p0_sesc_5_r" then delete; if Parm = "P10_Q5BirthWeight" then delete; if Parm = "P10_Q5BirthWeight" then delete; if Parm = "Time" then delete; run; rcg00026290 rcg00026290*Time rcg00041989 rcg00041989*Time rcg00085123 rcg00085123*Time rcg00119811 rcg00119811*Time rcg00281977 rcg00281977*Time But I need the values with interaction only. Is there any code that will delete the values without interaction term? Thanks.
... View more
Hi All,
Could anyone help me with the below requirement?
I have 3 variables SUBJ CODE TRT which have values as following.
SUBJ CODE TRT
1001 AB A
1001 AB B
1002 CD C
1002 CD C
1003 EF E
1003 EF F
In the above data for each SUBJ there is a specific code which have corresponding TRT vales as A and B. Example, for SUBJ 1001, code is AB and TRT is having 2 records for same SUBJ and CODE with A in 1 row and B in next row. If it is 1002 then the 2 TRT records should be C and D, but if it C and C then it should be flagged. See below expectation.
SUBJ CODE TRT FLAG
1001 AB A 0
1001 AB B 0
1002 CD C 0
1002 CD C 1
1003 EF E 0
1003 EF F 0
1004 AD A 0
1004 AD A 1
Can anyone help me achieve this?
... View more