07-14-2016 04:11 PM
I would like to do an analysis with my data. I have 5 predictors variables (all of them independants and continuous) and 6 dependant variables dichotomic (with 2 values :true or false) and i would like to analyse with a linear regression the relationship between 1 predictor and 1 dependant variable at a time. Is there a way to do that without doing 30 different analysis ?
07-14-2016 04:27 PM
You could write a macro function to do the regression on every pair via a loop. Better than copy/pasting the PROC REG (or other linear regression block) 30 times. You could also output the results to a dataset. Then make it into whatever table you want.
07-14-2016 04:33 PM
Well, a benefit of writing code would be to give you the power and control to something that doesn't have an explicit option.
I'm not sure how you can do this via the graphical interface.
07-14-2016 05:04 PM
07-14-2016 05:10 PM
Well the SAS online trainings are great, and interactive! You could finish one or two in a week, if you have the time!
I hope Reeza's suggestion helps, and good luck with the project and paper.
07-14-2016 05:12 PM
Then spend the first week learning SAS. There's two free e-courses available that teach intro to programming and statistics with SAS.
See the bottom right hand corner for the links.
07-14-2016 04:55 PM
The GUI doesn't support automating multiple reports like this easily.
If you absolutely don't want to code then here's a way.
transpose your data - there's a task for that.
Make the independent variable a single column and a new variable that indicates the variable.
Y Varname value
1 indep1 20
1 indep2 30
1 indep3 40
2 indep1 20
2 indep2 30
2 indep3 40
Then when you run the regression analysis you can put the Varname as your BY variable. Make sure to sort the data on the BY variable first before regression.