Dear All,
Thanks for reading. I am wondering if anyone could help me write a macro in order to loop the regression function.
I have a total of 56 dependent variables and 3 independent variables which remain constant for all the regressions. Every regression is just using the next column for the dependent variable up to column BE. Here is what i have so far:
This macro doesn't work at all but may give some idea of where i am getting to.
So the data for each dependent variable is stored from row 1 to 166 and from column B to column BE where it ends.
At the moment i am storing each regression on a new worksheet but ideally it would be great to store it in an array or table. If anyone has any better ideas then please do share!
Look forward to hearing your suggestions.
Thanks very much!
Thanks for reading. I am wondering if anyone could help me write a macro in order to loop the regression function.
I have a total of 56 dependent variables and 3 independent variables which remain constant for all the regressions. Every regression is just using the next column for the dependent variable up to column BE. Here is what i have so far:
Code:
Sub Regression()'
' Regression Macro
'
'
Application.Run "ATPVBAEN.XLAM!Regress", ActiveSheet.Range("$B$1:$B$166"), _
ActiveSheet.Range("$BG$1:$BI$166"), False, True, , "", False, False, _
False, False, , False
Sheets("Data").Select
End Sub
This macro doesn't work at all but may give some idea of where i am getting to.
So the data for each dependent variable is stored from row 1 to 166 and from column B to column BE where it ends.
At the moment i am storing each regression on a new worksheet but ideally it would be great to store it in an array or table. If anyone has any better ideas then please do share!
Look forward to hearing your suggestions.
Thanks very much!