[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Avoiding loops (the while loop)
I want to avoid loops in the following analysis and will appreciate it if
anyone can suggest an alternative..
I have a very simple dataset...
11 variables: (month), (y01-y10), and (x01-x10) for 1000 months
So, it is a 1000*11 dataset...
What I want to do is: each month, I regress (y01-y10) on (x01-x10) and store
the intercept and slope...
I need these intercept and slopes for later analysis...
What I am doing now is a while loop based on month: carry the regressions on
a monthly basis and store the results.
This seems a very inefficient way of handling this. It is taking time too,
because I have to do many similar analyses later on.
Can anyone please suggest an alternative/efficient way of accomplishing
* For searches and help try: