Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

# Re: st: Non-linear panel model estimation in Stata

 From Francesca Colantuoni To statalist@hsphsun2.harvard.edu Subject Re: st: Non-linear panel model estimation in Stata Date Sat, 4 May 2013 14:29:54 -0400

```Hi Yuliya,
I have also been studying and I just finished programming a nonlinear
least square function with panel data. The nl procedure accounts for
the panel structure automatically, as long as you declare it with
I may advise you to split your function in at least two parts, like:
gen double `num'=( `a0' + `a1'*`X1') + `a2'*`X2'+ `a3'*`X3' )
gen double `den'=( `b0' + `b1'*`X4') + `Eta_i' + `Theta_t' + `Eps'
replace `Y'=`num'/`den'

I found this example very helpful:
http://www.stata.com/capabilities/nonlinear-regression/
And then you can also look at this conversation:
http://www.stata.com/statalist/archive/2013-05/msg00086.html

Good luck!
Francesca

On Fri, May 3, 2013 at 4:52 AM, Yuliya Romanenko
<romanenko.yulja@gmail.com> wrote:
> Dear Stata users,
>
> I am looking for a way in Stata to estimate a nonlinear panel model of
> the following form (dependent variable is modeled as a ratio of two
> linear functions):
>
>  Y[it] = ( a0 + a1*X1[it) + a2*X2[i] + a3*X3[it] ) / ( b0 + b1*X4[it]
> ) + Eta_i + Theta_t + Eps[it].
>
> Here Y is a dependent (non normal) variable; Eta_i, Theta_t are
> individual and time effects respectively; X1, ..., X4 are independent
> variables, some of which are time invariant, some are 0/1 dummies. Is
> there any standard way to estimate this in Stata? Can I use -nl- to
> account for panel structure?
>
> I would very much appreciate any help.
>
> Regards,
> Yuliya Romanenko
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/
```