the equivalent matlab code for areg ,absorb in stata

2 ビュー (過去 30 日間)
Minh Nguyen
Minh Nguyen 2019 年 6 月 13 日
回答済み: Image Analyst 2019 年 6 月 17 日
Hi, I am new to Matlab. I want to run a regression for an unbalanced panel data.
In stata the code should be :
areg y a b c c2 b2 b*c if year <=`q', absorb(ind_year)
( c2= c^2, b2 = b^2)
I am wondering whether any equivalent code to run this regression in matlab.
Thank you.

回答 (1 件)

Image Analyst
Image Analyst 2019 年 6 月 17 日
I don't understand your code at all. If you want to fit a polynomial, use polyfit(). For something more complicated, try fitnlm().

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by