Dear Statalisters,
Hope my post finds you well.
I need to generate two variables based on the equation: Ln(REVENUEt)= b1 + b2t + ð where Ln(REVENUEt) is natural logarithm of a firm's revenue in year t, t is the independent variable (year), and ð is residual.
First, run a linear regression model of the relationship between the year (t) and the natural logarithm of revenue (REVENUE) within the annual window period [t, t+4],
then I want to generate two variables.
1) X1: the antilog of the regression coefficient (b2);
2) X2: the antilog of the standard deviation of b2
Thank you in advance!
Best,
Josh
Here is the example of the sample:
* Example generated by -dataex-. For more info, type help dataex
clear
input id year REVENUE
1 2010 1000
1 2012 1200
2 2010 0
2 2011 900
2 2012 100
2 2013 500
2 2014 990
2 2015 1000
2 2016 1100
2 2017 1300
2 2018 1450
3 2010 1200
3 2011 1345
3 2012 0
3 2013 1340
3 2014 1250
3 2015 1400
3 2016 1568
3 2017 1200
3 2018 1900
4 2010 0
4 2011 0
4 2012 0
4 2013 400
4 2014 670
4 2015 760
4 2016 560
4 2017 800
4 2018 890
5 2010 110
end
[/CODE]
------------------
Hope my post finds you well.
I need to generate two variables based on the equation: Ln(REVENUEt)= b1 + b2t + ð where Ln(REVENUEt) is natural logarithm of a firm's revenue in year t, t is the independent variable (year), and ð is residual.
First, run a linear regression model of the relationship between the year (t) and the natural logarithm of revenue (REVENUE) within the annual window period [t, t+4],
then I want to generate two variables.
1) X1: the antilog of the regression coefficient (b2);
2) X2: the antilog of the standard deviation of b2
Thank you in advance!
Best,
Josh
Here is the example of the sample:
* Example generated by -dataex-. For more info, type help dataex
clear
input id year REVENUE
1 2010 1000
1 2012 1200
2 2010 0
2 2011 900
2 2012 100
2 2013 500
2 2014 990
2 2015 1000
2 2016 1100
2 2017 1300
2 2018 1450
3 2010 1200
3 2011 1345
3 2012 0
3 2013 1340
3 2014 1250
3 2015 1400
3 2016 1568
3 2017 1200
3 2018 1900
4 2010 0
4 2011 0
4 2012 0
4 2013 400
4 2014 670
4 2015 760
4 2016 560
4 2017 800
4 2018 890
5 2010 110
end
[/CODE]
------------------
Comment