SAS reading a file in long format

怎甘沉沦 提交于 2019-12-13 05:08:14

问题


I have a file in long format, like so:

name weight month cal

bob 80 01 5000

ben 70 01 4989

mary 60 01 3000

bob 81 02 4999

ben 68 02 6000

mary 57 02 2800

...

I would like to create N linear regressions of weight over cal: one for each of the months. I know how to read the data into a dataset and how to fit a regression model.

I am not sure how I do this in a loop for the N months...

Any pointers?

Many thanks!

来源:https://stackoverflow.com/questions/22589223/sas-reading-a-file-in-long-format

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!