Hi,

i want to do a multiple regression on times series of 100 corporates.
The problem is that not just the dependent variable(corporate) changes, rather also one of the independent variables changes when chaning the independent variable.

Hence, the classic foreach approach is not working.
I was trying this approach in the first place:

foreach x of varlist BCD* {
reg `x' SPCH* SMB HML AggLiq
outreg2 using regression_results, append excel dec(3)
}

Array

I used BCD to specify my companies.(dependent)
I used SPCH to specify a set of independent variables.

SPCH is a independent variable, but this variable is not constant, it changes with dependent variable. Hence; i have to match one specific BCD with one specific SPCH.
SMB, HML and AggLiq are constant independent variables.


may you have an idea?

THX&KR
Thermo