Kick-start Your Data Exploration Journey with SAS Information Catalog
Recent Library Articles
Recently in the SAS Community Library: @smanoj introduces you to the SAS Information Catalog, which provides a powerful search engine to find needed data assets.
Hello Every, I have done SAS courses on Undemy. But in order to learn, i wants to have hands on experience of various SAS projects. Unfortunatly, I am unable to find enough solved projects using SAS on youtube. Please see if you can help me out by sharing the link of solved projects using SAS so that i could practice and learn better. I am from finance background, it would be better if links are preferably shared related to Finance/Accounting/Credit Modelling otherwise projects on topic are welcome.
... View more
Hello Experts,
My code is :
AnneeSemaine=compress(year(datepart (MaDate))||"-"||week(datepart(MaDate),'v'));
I have the value 2023-9, do you know please some easy option to get 2023-09?
My second line of code is :
Moisjour=compress(month(datepart (MaDate))||"-"||day(datepart(MaDate)));
I have the value 9-2, do you know please how to get the value 09-02 ?
Thank you for your help !
... View more
Hello, everyone
It is not uncommon that we have to control more than one time-dependent variable in a Cox regression model. A SAS support PDF document teaches two methods to code for a time-dependent Cox model, but, with only one time-dependent variable adjusted (link: https://support.sas.com/resources/papers/proceedings12/168-2012.pdf).
The first method involves constructing a special data set for the time-dependent variable data and the example is for only one time-dependent variable. It does not teach what to do if there is more than one such variable.
The second method is more advanced, termed "programming statment method". It has only one record for each individual, compared with the first method which has multiple records for each individual.
I wonder how to code for the Cox model if there are 2 or more time-dependent variables, by both method 1 and 2. Thank you very much.
Tom
... View more
data pmr;
input patient $ cpevent $10-18 fatestcd $19-26 faresdtc $28-37 FAOBJ $;
cards;
100102 baseline occur 29oct2021 A
100102 baseline symstdt 29oct2021 A
100102 baseline symendt A
100102 week1 occur A
100102 week1 symstdt 29oct2021 A
100102 week1 symendt A
100102 week2 occur A
100102 week2 symstdt 27oct2021 A
100102 week2 symendt A
100102 week3 occur A
100102 week3 symstdt 29oct2021 A
100102 week3 symendt 19oct2021 A
100102 week4 occur A
100102 week4 symstdt A
100102 week4 symendt A
100102 week5 occur A
100102 week5 symstdt 30oct2021 A
100102 week5 symendt 19oct2021 A
100103 baseline occur A
100103 baseline symstdt 29oct2021 A
100103 baseline symendt A
100103 week1 occur A
100103 week1 symstdt 28oct2021 A
100103 week1 symendt A
100103 week2 occur A
100103 week2 symstdt 28oct2021 A
100103 week2 symendt A
100103 week3 occur A
100103 week3 symstdt 29oct2021 A
100103 week3 symendt 19oct2021 A
100103 week4 occur A
100103 week4 symstdt A
100103 week4 symendt A
100103 week5 occur A
100103 week5 symstdt 30oct2021 A
100103 week5 symendt 19oct2021 A
;
run;
I need flag = "Y" for following BY USING above data
1) 100102 week2 symstdt 27oct2021 A
2) 100103 week1 symstdt 28oct2021 A
3)100103 week2 symstdt 28oct2021 A
Like above i have more than 800 records are there so please anyone help me with programming
1)We need to see the baseline visit date matching with the remaining visits if not then it should be flagged.
2) and if the subject has the same baseline date at symstdt and symendt(different) no flag.
3) if same subject has symstdt and symendt then also no flag
... View more