Thoughts of a Crime Show Junkie: Inadmissible Evidence
Recent Library Articles
Recently in the SAS Community Library: SAS' @RhondaWilliams reveals how SAS Law Enforcement Intelligence helps law enforcement agencies expedite detailed data entry using the Evidence Creation feature.
I'm a head of FP&A. Anyone had any experience in using power bi as a forecasting tool that brings data in from the GL? Our company is a small insurer heavily invested in the Microsoft architecture, incl power BI. I'd much prefer to leverage the tools we have inhouse instead of forking out thousands for workday adaptive insights, solver or prophix etc. Currently most forecasting and reporting done on excel but I'd like to link the actuals to our GL (business central) and then facilitate a bridge between the GL and power bi for reporting. Thanks!
... View more
Hello
I created a new library name called PanelOsh
I used this code and I see that the folder was created successfully
options dlcreatedir;
libname PanelOsh "/usr/local/SAS/SASUsers/LabRet/Credit_Scoring_Users/";
I want to create also sub-Folder within library PanelOsh that will be called Raw_Data.
What is the way to do it?
I run following code but the folder was not created
options dlcreatedir;
libname Raw_Data "/usr/local/SAS/SASUsers/LabRet/Credit_Scoring_Users/PanelOsh";
... View more
Hello, everyone
I managed to estimate the parameters for a Weibull accelerated failure time model from the PROC LIFEREG procedure. I have the point and interval estimations for predictor coefficients. In addition, I have the estimations for the Weibull shape parameter.
After I get these estimations, I would like to simulate the cumulative incidence curve/survival curve. I know I should use the point estimation of these coefficients and the shape parameter in the prediction model. But I am not sure whether to use the interval estimation of coefficients, or the shape parameter.
You answer is much appreciated!
... View more
Hi, tsmk is my time-dependent covariate, deathstatus_inhance is censor, and stime_inhance is time. The "Change step" worked well, but the "Count step" only worked for four observations and stopped. Please help me to correct my code. DATA analysis.change;
SET analysis.smk_stime2;
ARRAY tsmk_(*) tsmk_1-tsmk_5; *call in the time-varying smoking variables;
ARRAY chng(5); *the new indicator variables;
t=1; *initialize the position variable for the indicator variables;
DO i = 2 TO 5;
IF tsmk_(i) NE tsmk_(i-1) THEN DO; *detects whether there is a change in smoking status;
chng(t) = i-1; *assigns the last year the status remained constant;
t=t+1;
END;
END;
RUN;
DATA analysis.count;
SET analysis.change;
ARRAY tsmk_(*) tsmk_1-tsmk_5; /* call in the time-varying smoking variables */
ARRAY chng(*) chng1-chng5; /* call in the indicator variables */
start = 0; /* initialize the beginning time for the study */
censor2 = 0; /* initialize the new censor variable */
t = 1; /* initialize the position variable for the indicator variables (chng1-chng5) */
DO i=1 TO stime_inhance; /* makes sure we only output the records that smoking status remains constant */
IF (chng(t) > . and chng(t) < stime_inhance) or i = stime_inhance THEN do;
/* assign the value of smoking status */
IF chng(t) > . THEN smoking_status = tsmk_(chng(t));
ELSE smoking_status = tsmk_(stime_inhance); /* assign the end time */
stop = min(chng(t), stime_inhance); /* assign the value of the censor variable */
IF i = stime_inhance THEN censor2 = deathstatus_inhance; /* assign the new start time */
IF t > 1 THEN start = chng(t-1); /* move the position variable */
t = t + 1;
OUTPUT; /* output the record to the new dataset */
end;
END;
RUN;
... View more
I write one macro which works fine to split data into 2-subgroups.
Logic is 1) sort by target var 2) based on weight/wt, split into 2 subgroups.
BUT how to split into N-Subgroups with N as a parameter, say N=3 or 7?!
%macro bisect(ds, byvar, cutvar, note);
proc sort data=&ds.; by &byvar.; run;quit;
data &ds.;
set &ds.;
retain wt_sum;
wt_sum=coalesce(wt_sum,0)+&cutvar.;
run;quit;
data &ds.(drop=wt_sum);
set &ds.;
if wt_sum<=50 then ¬e.=1;
else ¬e.=0;
run;quit;
%mend;
... View more