Compare two variables between two datasets and create a new variable based on the comparison
suppose to have the following datasets:
Compare two variables between two datasets and create a new variable based on the comparison
suppose to have the following datasets:
How do I print formated text in a barchart segment using sgrender/sgplot?
I´d like to make a barchart in SAS using proc sgplot/sgrender and be able to adjust the font color according to the fill color or the perticular segment value. The fill color could go from dark to light as the font at some value the font color switches from white to black to get a good contrast.
SAS Base: KEEP Statement and KEEP = Option
Hi I am new to SAS and I came across a SAS Base Programming Reference Sheet. In the section of The Data Step: Controlling Variable Output, the example code in the box confuses me.
No results return on case when
Trying to update perform one hot encoding to replace values of 1 and 0 based on cell values.
How do I create a single list of numbers from across multiple observations in SAS? Without knowing the end amount
I have a SAS dataset that has multiple listings per person and variables (Treat_Date1, Treat_Date2, Treat_Date3) whenever they are treated. I need to take this and create a dataset with one observation per person with all of their treatment dates.
How to retain days and stop in conditional situation and then keep going?
I am trying to count the duration of medication use. I would like to count days that every outpatient visit if they are not exceed 90 days between every visit.
The med_date is the date of every outpatient visit. I first use lag function to count the days between each visit(variable diff).
And I want to retain them and stop if the diff>90.
Then keep going with another id.
My code would stop if the diff>90, but I have no idea how to keep going
Issues while converting dates into SAS format
I have a big dataset with dates in the char format dd/mm/yyyy (e.g., 07/06/2014) I would like to convert into SAS format. I tried using input (variable_name, MMDDYY10.) but with the following issues:
How can I use PROC MDC to predict the choice probabilities for a test sample? – nchoice error
I am trying to predict choice probabilities through proc mdc using the following code:
proc sort with nodupkey based on the value of a variable
suppose to have the following dataset: