Hello,
I'm currently working on regressing panel-data for every year and industry. What i basically want to do is I want to run regression (1) and use the estimators regression (1) to estimate regression (2) for every year and industry.
I have the following regressions:
where i want to use the coefficients to estimate the second regression
I'm currently running the following code:
which only allows me to calculate regression (2) if the would be exactly similar. So my question is how can i fit regression 2 into my code?
I hope it is clear what I want to do.
Thank you in advance for your comments and suggestion!
I'm currently working on regressing panel-data for every year and industry. What i basically want to do is I want to run regression (1) and use the estimators regression (1) to estimate regression (2) for every year and industry.
I have the following regressions:
HTML Code:
scaled_TACC = a1*inverse_lagTA+a2*scaled_delta_Rev+a3*scaled_PPE
HTML Code:
NACC= a^1*inverse_lagTA+a^2scaled_delta_Rev_Rec+a^3*scaled_PPE
Code:
gen NACC = . gen nobs = . foreach i of local ids { foreach y of local years { count if !missing(scaled_TACC, inverse_lagTA, term2, scaled_PPE) & year == `y' & SIC == `i' replace nobs = r(N) if year == `y' & SIC == `i' if r(N) >= 15 & least_number_firms_any_year >= 15 { regress scaled_TACC inverse_lagTA scaled_delta_Rev scaled_PPE if year == `y' & SIC == `i', noconstant predict xb, xb replace DACC = xb if year == `y' & SIC == `i' drop xb } } }
I hope it is clear what I want to do.
Thank you in advance for your comments and suggestion!
Comment