Store and apply coefficients
Posted: Tue Jul 09, 2019 3:57 am
Hello
I am looking for a quick way to do the following and wondering whether you have any tips:
1. estimate equation (OLS regression): Y1 = a1 + b1*x1 + c1*z1
2. Store coefficient values b1 and c1
3. Estimate restricted OLS: Y2 = a2 + b1*x2 + c1*z2 (only a2 is estimated, b1 and c1 are taken from the first equation)
Step one is standard; step 3 is easy to do manually. I was wondering whether there is an easy way to programmatically pick up b1 and c1 from step 1 and plug them in the equation in step 3.
Thanks
George
I am looking for a quick way to do the following and wondering whether you have any tips:
1. estimate equation (OLS regression): Y1 = a1 + b1*x1 + c1*z1
2. Store coefficient values b1 and c1
3. Estimate restricted OLS: Y2 = a2 + b1*x2 + c1*z2 (only a2 is estimated, b1 and c1 are taken from the first equation)
Step one is standard; step 3 is easy to do manually. I was wondering whether there is an easy way to programmatically pick up b1 and c1 from step 1 and plug them in the equation in step 3.
Thanks
George