I need to do regression analysis on hundreds dataset. I had get one regression analysis done in one dataset by using EG task. Is there a way to get hundreds dataset done with regression by using task or a macro in EG?
Thanks
Yes and no. You can do it within the Enterprise Guide environment, but not using the "point and click" facilities. You'd need to do some coding in a SAS program window.
Do you feel this is something you can tackle? If yes, we're all in a position to give you advice on how to use the SAS macro language to do it. It will probably be less than two dozen lines of code all told.
Tom
Yes, with a macro.
How big are your datasets? If they have the same structure/variables you can append them and then run a regression using the BY statement.
You should post your code if you need help with a macro. This sounds pretty basic.
Also, how do you know which datasets need to be processed.
@Defense wrote:
Could I use task ("point and click" facilities) to get all sites done?
No. You need to write code for a macro solution.
Yes, if you use the append solution - but you may have to write code to append all the datasets. Your data doesn't sound too big for this method to work. However, your data needs to be identical in terms of variable names and types. The number of observations doesn't matter.
If you combine all the datasets into one, identified by the dataset name, and use that variable in your regression analysis as a BY variable in your task. Again, how do you identify which datasets need to be processed.
If you've processed the data additionally before the regression - query builder or tasks - you will also need to factor in the BY variable.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.