Hello,
After doing a lot of research, and reading a lot of things on the forum, I wish a little help please...
I am looking to optimize my data set for reporting.
The table is obtained after a lot of proc transposes and merges with different tables (which can vary according to the configuration of the macro: uni/bivariate analysis, OR, test,...).
Currently I have made a lot of progress on a lot of small things but there is still the problem of the p-value of var cat which is located at the last level of the modality.
I tried to act at the data stage before the merge in order to link the p-value to the 1st modality...
Then I tried to implement several techniques directly on the final dataset (reverse lag, try to assign to each modality the p-value initially given to one then apply an ARRAY /lag method to keep the 1st p-value appearing for each variable...).
I think I missed something.
The photo illustrates what I am getting now and what I want to get (p-value on the same line than the 1st modality, in automated version)
If anyone has an idea, I'm a subscriber.
I will be very grateful for yours answers
Mic
You'd have to show us your code for us to be able to help here. We can call it using an example data set - I'm assuming you're writing a generic macro?
Here's an example of something I did that's pretty similar, except for one way frequency tables via chi square. I've done logistic regression ones but that code's buried somewhere. If you search on lexjansen.com for clinical reports you'll find many code examples.
https://gist.github.com/statgeek/0ff46bbd76bcc101e40945816b232303
@Mic35 wrote:
Hello,
After doing a lot of research, and reading a lot of things on the forum, I wish a little help please...
I am looking to optimize my data set for reporting.
The table is obtained after a lot of proc transposes and merges with different tables (which can vary according to the configuration of the macro: uni/bivariate analysis, OR, test,...).
Currently I have made a lot of progress on a lot of small things but there is still the problem of the p-value of var cat which is located at the last level of the modality.
I tried to act at the data stage before the merge in order to link the p-value to the 1st modality...
Then I tried to implement several techniques directly on the final dataset (reverse lag, try to assign to each modality the p-value initially given to one then apply an ARRAY /lag method to keep the 1st p-value appearing for each variable...).
I think I missed something.The photo illustrates what I am getting now and what I want to get (p-value on the same line than the 1st modality, in automated version)
If anyone has an idea, I'm a subscriber.
I will be very grateful for yours answers
Mic
Thank you for your answer.
It was enough to replace a word in the program...
Why try to make it complicated when you can make it simple...
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.