The LITI rule for Text Analytics that you didn’t know you needed…until now!
Recent Library Articles
Recently in the SAS Community Library: Customer complaint call transcripts can end up being quite verbose. SAS' @PeterChristie reveals how to distill relevant info using SAS Text Analytics.
I have an outcome with four levels:
Level 1: Starting in group A and staying in group A
Level 2: Starting in group A and switching to group B
Level 3: Starting in group B and staying in group B
Level 4: Starting in group B and switching to group A
This outcome requires multinomial logistic regression, since there are more than two levels.
My question:
Can this outcome be re-coded as a binary variable in order to conduct binary logistic regression?
For example comparing "Level 2" vs. "Not Level 2 (levels 1, 3 and 4 combined)"?
I understand how to reformat this variable in SAS so that it's technically a binary variable, but I'm concerned if this would be a valid statistical approach for handling a variable that conceptually has 4 distinct levels.
... View more
I am seeking urgent help as the issue impacting all SAS Studio users on our Viya 4 environment. Since 9:30AM EST today, users have been encountering an error message stating "ERROR: Insufficient disk space is full, or quota has been exceeded." or "ERROR: Insufficient space in file WORK.BDXFS124.DATA." Unable to run even simple steps like proc contents, or reading data from sashelp to work directory and this issue is causing significant disruption to our daily operations, as it prevents users from performing any task in sas studio and sometime we noticed "sas studio compute context" is keep on disconnecting.
Our SAS administrator verified the status of pods, and all are working fine and we are unable to identify what caused the issue all of a sudden. Unfortunately, the impact is even more critical as we have fully transitioned to SAS Studio and do not have access to Base SAS at this time and we depend on sas studio for our daily operatoins.
Given the severity of the problem and its impact on our daily operations, any guidance or solution you can provide would be greatly appreciated.
Please let me know if there are any immediate steps we can take to free up disk space or identify the cause of the quota being exceeded. We are available to discuss this matter further at your earliest convenience.
Sincerely,
Bhaskar
... View more
The code below isn't my exact code but it accurately illustrates the problem and is much simpler.
I have a macro named ABC with the argument BP_VAR. "BP" stands for "Body Part" and the values I can specify for BP_VAR are Arm, Leg and Head.
Inside the macro, there is a datastep and inside it I had code like this.
If &BP_VAR = "Arm" then do;
... some statements...
end;
And there is similar code for Leg and Head. But it wouldn't work so I found a way around it, although if you have comments on why the above didn't work then I'd be interested to hear it.
But here is the way I got around it, with a longer example to get to the meat of my question. The formats abc, def and ghi referred to below have already been defined. This code is from inside the macro.
%LET BP = "&BP_VAR";
if &BP = "Arm" then do;
...some assignment statements to create a new variable &BP.2;
format &BP.2 abc.;
end;
if &BP = "Leg" then do;
...some assignment statements to create a new variable &BP.2;
format &BP.2 def.;
end;
if &BP = "Head" then do;
...some assignment statements to create a new variable &BP.2;
format &BP.2 ghi;
end;
So as you can see, when the body part of interest is Arm, I want it to go to the Arm section of the macro and make a new variable named Arm2, makes some assignments for it, then assign a format to it. And then go on to do some other stuff that is not relevant to the current problem.
And I want to do the same when the body part of interest is Leg. And again when the body part of interest is Head.
Okay, so here is the problem. Say the body part is Arm. The if-then condition is satisfied in the first section and it creates the new variable and assigns the format abc to it. Neither of the other two if-then conditions are satisfied so it shouldn't even get into those it-then-do loops.
And yet when I run the code as listed, the format for the newly created variable Arm2 is ghi (the one in the 3rd if-then-do group). If I comment out the format assignment in the 3rd group, then the format for the new variable is def (the one in the 2nd if-then-do group).
IOW, it uses the last non-commented out format assignment statement there is even if it's inside a if-then-do group that does not get executed. I even put "put = 'gets here';" code inside the if-then-do group that I don't think is getting executed, and indeed it is not getting executed because the "gets here" message does not show up in the log. And yet somehow the format assignment in that if-then-do group does get executed.
Any idea on what's happening? Thanks in advance.
... View more
I have a very large dataset and I am trying to replace several numeric and character variable values (trying to null all of the values with certain variables) with either a blank or null (.). I tried the following code but got several error messages. Is this the best code or are there others? proc iml; edit mp_; read all var (Result1) where (Result1 ^= '0'); Result1 = ' '; replace all var (Result1) where (Result1 ^= '0'); run; 4 proc iml; NOTE: Writing HTML Body file: sashtml.htm NOTE: IML Ready 5 edit mp_; 6 read all var (Result1) where (Result1 ^= 0); ERROR: Operand Result1 does not have a value. statement : READ at line 6 column 1 7 Result1 = ' '; 8 replace all var (Result1) where (Result1 ^= 0); ERROR: An exception has been encountered.
... View more
I want to read reports through SAS enterprise guide, but the input will be from SAS VA. Is there a way to do it directly ? Without the need of importing each report to excel?
... View more