repeat regression to access betas and T test results
1 view (last 30 days)
Show older comments
hi,Im quite new with Matlab and currently work on a project, which requires me to run two kinds of regressions 100 times for 100 companies. The time frame is 20 years and its in monthly basis(100 (row)*240(column) data). Two regressions are: "y=a+ b x" and "y=a+ b x+ c x^2" and the size of this independent variable: x is 1*240. What I need is both coefficient b from the first regression and coefficient c from the second regression , and their t-stat results . Can I ask how I can write this code in matlab? Many thanks.
0 Comments
Answers (1)
the cyclist
on 12 Aug 2015
If you have access to the Statistics and Machine Learning Toolbox, then I recommend using the fitlm command.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!