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, I have a job flow set up. One of the jobs has a warning (but not an error and does not fail). In this scenario the next job in the flow after the one with the warning does not start and I think this is because of the previous job having a return code. One used to be able to control this in LSF but how does one do this in Viya Flows so that the next job would start and accept a job with warnings as a complete job? I have tried abort 0 in my code which works but this changes the job status to 'Cancelled' which is not ideal. Thanks Andre
... View more
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
Can you tell me what is wrong with this code?
*OTHER NEUROLOGICAL DISEASES; array xx $ icdx1 icdx2 icdx3; label ond="Oth neurological"; ond=0; do over xx; if xx in: ("B90", "D48", "G04", "G09", "G10", "G11", "G12", "G13", "G24", "G25", "G26", "G32", "G37", "G51", "G52", "G53", "G70", "G71", "G72", "G73", "G80", "G81", "G82", "G83", "G90", "G91", "G93", "G95", "G99", "M47", "Q00", "Q01", "Q02", "Q03", "Q04", "Q05", "Q06", "Q07", "Q76") then ond = 1; *Doing exclusions in this way does not work; if xx in: ("G130", "G131", "G251", "G254", "G256", "G510", "G732", "G733", "G734", "G838") then ond=0; end;
The first part works fine. But then when I add in the line of code under *Doing exclusions in this way does not work; I get the following error messages:
*Doing the exclusions in this way does not work; 509 if xx in: ("G130", "G131", "G251", "G254", "G256", "G510", "G732", _ 22 202 509 ! "G733", "G734", "G838") then ond=0; ERROR 22-322: Syntax error, expecting one of the following: a quoted string, a numeric constant, a datetime constant, a missing value, iterator, (.
ERROR 202-322: The option or parameter is not recognized and will be ignored.
510 end;
Please help! Thanks!
... View more
Because of variable length limits, etc., I simply renamed all variables:
i_01
i_02
i_03
But each variable really should be associated with a longer, more descriptive name:
Abc.......
Def.......
Ghi.......
I've imported the dataset using the simple variable names. But I'd like to somehow 'import' the longer respective names as 'labels'. Can that be done? If so, how?
Thanks,
Nicholas Kormanik
... View more