the equivalent matlab code for areg ,absorb in stata

2 次查看(过去 30 天)
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