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
Related Posts with Regression with double loop (chaning dependent and independent)
godir - for working in directoriesDon't know why this never took off - I'm sure I publicized it years ago. For anyone who's interested…
Marginsplot with catagorical variables on x axis - custom spacingI have a dataset where the outcome is binary (y), and a predictor variable is in the form of ordinal…
QregplotHello - I am using qregplot command to plot quantile for one of my variable by using the Code: quie…
Cut axis without excluding data pointsHi I am working on a twoway plot where one data point is quite large compared to the rest. However,…
egen =total(), by() issueHello - I'm attempting to create a variable (totalsharesheld) that is the aggregate of three differe…
Subscribe to:
Post Comments (Atom)
0 Response to Regression with double loop (chaning dependent and independent)
Post a Comment