Recently in the SAS Community Library: SAS' @Sundaresh1 highlights a sometimes overlooked task when applying document embeddings for purposes of similarity-based search. Normalisation of vectors helps obtain relevant matches.
Hi everyone, I am using claims data for analysis and was stuck at one part in continuous enrollment. Any help would be appreciated. Thanks! I need patients who are continuously enrolled for 12 months prior to the index date to at least one month and maximum of 12 months after the index date. A gap of 30 days is acceptable. Also, I'm interested in first enrollment period only. Here's the data I have Data Test; input patid $ dtstart :YYMMDD10. dtend : YYMMDD10.; format dtstart YYMMDD10. dtend YYMMDD10.; cards; 001 2017-01-01 2017-01-31 001 2017-02-01 2017-02-31 001 2017-05-01 2017-05-31 002 2018-01-01 2018-01-31 002 2018-02-20 2018-04-31 003 2020-03-25 2020-12-31 003 2021-01-15 2021-08-31 Output (intermediate): 001 2017-01-01 2017-02-31 001 2017-05-01 2017-05-31 002 2018-01-01 2018-04-31 003 2020-03-25 2021-08-31 Now, patid 001 has two periods of continuous enrollment but I need only one enrollment period. So the desired output should be - 001 2017-01-01 2017-02-31 002 2018-01-01 2018-04-31 003 2020-03-25 2021-08-31 Following is the Code that I think would work. Not tried yet since data takes long time (~ a day) to process so I want to make sure I do it correctly. I just want to share my thought process Data test1; set test (rename = (dtstart = start dtend = end)); ; by patid; retain dtstart dtend enrolcnt; label dtstart = "Enrollment Date Start" dtend = "Enrollment Date End" Enrolcnt = "Enrollment Period Count"; if first.patid then do; dtstart = start; dtend = end; enrolcnt = 1; end; else do; if dtend + 30 >=start then do; if dtend < end then dtend = end; end; end; if last.patid then output; run; Once I get the continuous enrollment period, I will then select patients with continuos enrollment with enrollment start date 12 months prior to the index date to at least one month and maximum of 12 months after the index date. What confuses me is how to code for "at least" part in the previous statement. Should I create a new date variable as (new = index_date + 30)? SAS CODE (definitely incomplete) - Proc sql; create table test3 as select a.*, b.dtstart, b.dtend from data_index_date as a right join test1 as b on a.patid = b.patid where intnx ('day', a.index_date, -365) GE b.dtstart and a.index_date LT b.dtend order by patid; quit;
... View more
Hello, I ran a linear mixed model with repeated measures using PROC MIXED. I used the RCORR statement to obtain the intraclass correlation coefficient (ICC) for the non-independent variable 'score' across readers. Is there a function within PROC MIXED that outputs the 95% CI and p-value for the ICC? PROC MIXED DATA=final COVTEST;
CLASS subject_id reader (REF='1');
MODEL score = reader / S CL;
REPEATED / SUBJECT=subject_id TYPE=cs R RCORR;
RUN; Thank you for your help!
... View more
Please can someone help me. I have SAS 9 table with colonne TPS whixh specify the duration. Eg i can have in this variable modality like 30:22:00. After chargin this table in my CASLIB, for the same record this variable shows 6:22:00.
Seems like SAS ignore the 24 hours . After 24hours SAS set to null the duration.
How can i find issue to this problem ?
Thks
... View more
Dear All How can I calculate 95% confidence intervals for ICCs with SAS macro (%intracc) (http://support.sas.com/kb/25/031.html). I am trying to calculate ICC(2,k) but %intracc but the macro produce only ICCs but not 95% CIs. Thank you. Best regards,
... View more
Hi Folks, I have a string variable called string and what I need to do is search for certain letters such as S or X and if I find it then I need to convert the string to XXXX. Does anyone have some example code to do this? All the best, Sean data test;
infile datalines delimiter=',';
input string $ newstring $;
datalines;
F03 J47 S528 X590,F03 J47 XXXX XXXX
E872 R263 S720 X590,E872 XXXX XXXX XXXX
S720 X590,XXXX XXXX
S150 V789,XXXX V789
;
run;
... View more