Bookmark and Share

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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Fixed effects in nonlinear least squares


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: Fixed effects in nonlinear least squares
Date   Thu, 16 May 2013 08:43:00 +0100

My guess: -nl- doesn't know about fixed effects as such. You'd need to
estimate them like any other parameters, and therefore this won't work
for you. I imagine that in principle you could go much deeper and code
this via Mata, but I wish you good luck in searching for an optimum in
a parameter space of dimension ~10^4.
Nick
[email protected]


On 16 May 2013 07:04, Jacob Hansen <[email protected]> wrote:
> Dear Statalist users,
>
> I would like to know if it is possible to include fixed effects in a
> nonlinear least squares regression. And if yes, how?
>
> It is not possible for me to simply create the dummy variables, as it
> would result in too many variables. I have 500 individuals and 24
> months resulting in 500*24=12.000 dummy variables.
>
> I have defined a program called nlhyper and want to know if there is
> something I can do to include the fixed effects when I run the
> regression? Below is the relevant piece of Stata code. I can also
> include the coding of nlhyper, but I assume that it is not relevant
> for my question.
>
> *************************************
>
> qui nl hyper: `y' `otherX' `wt' if fben_inc>.80&nosav==1&e(sample),
> initial(b0 0 b1 .1) cluster(cluster)
> estimates store hyper
> }
> ******************************
>
> I use Stata 12.1 in Winows 12.1
>
> Thanks in advance for any help
>
> BR
>
> Jacob Moller Hansen
> *
> *   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index