Dear all,
I've a weird problem in looping regressions in a time series dataset. My sample is made of 94 stocks. For each stock I have 3 liquidity measures and its squared returns. I also have 12 aggregated market measures: 3 for each liquidity measure and the 3 remaining are fixed. I need to regress for each stock's liquidity measure the above variables on the form:
y= b0 + b1ML1 + b2ML2 + b3ML3 + b4M4 + b5M5 + b6M6 + e
I also need to store (eststo) the estimates. Unfortunately, some stocks' measures are very limited.
My code is the following:
If I
Stata gives me the error 2001 "Insufficient observations" from the first regression, while if I
Stata gives me error 2001 from the 32nd regression, which is actually the first stock with limited observations (seven to be precise).
How can I overcome this problem without regress manually? Is there any way to "ignore" regressions with only limited observations?
Thanks for your help
Stefano Grillini
I've a weird problem in looping regressions in a time series dataset. My sample is made of 94 stocks. For each stock I have 3 liquidity measures and its squared returns. I also have 12 aggregated market measures: 3 for each liquidity measure and the 3 remaining are fixed. I need to regress for each stock's liquidity measure the above variables on the form:
y= b0 + b1ML1 + b2ML2 + b3ML3 + b4M4 + b5M5 + b6M6 + e
I also need to store (eststo) the estimates. Unfortunately, some stocks' measures are very limited.
My code is the following:
Code:
local N = 94 forvalues i = 1/`N' { regress dqspr`i' Dav_qspr lagDav_qspr leadDav_qspr irelandind lagirelandind leadirelandind Dsqrtret`i' } eststo
Code:
qui regress
Code:
regress
How can I overcome this problem without regress manually? Is there any way to "ignore" regressions with only limited observations?
Thanks for your help
Stefano Grillini
Comment