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: Trouble using -nl-


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: Trouble using -nl-
Date   Sun, 3 Nov 2013 11:22:26 +0000

A better approximation for pi than 3.14 is the built-in _pi.

Otherwise I don't understand your model well enough to suggest code,
but it looks as if it you need a loop over times.

Nick
[email protected]


On 3 November 2013 10:47, Ingrid Johnsen <[email protected]> wrote:
> Do you know where to start.
> It might be very complicated to write the costomised code.
>
> Ingrid
>
>
> På Sat, 02 Nov 2013 12:46:19 +0100, skrev Nick Cox <[email protected]>:
>
>
>> You don't define all the terms here, but it appears that you have a
>> fitted model and want to use it for projection into the future. It
>> appears that you want to add noise to deterministic predictions too.
>> -nl- doesn't support any of that. Your problem needs customised code.
>> Nick
>> [email protected]
>>
>>
>> On 2 November 2013 09:51, Ingrid Johnsen <[email protected]> wrote:
>>>
>>> Hi
>>>
>>> I have trouble using -nl- .
>>> I am using Stata 12 for Windows.
>>>
>>> I have model consisting of three equations.
>>>
>>> I  : y_t = a0 + a1*x_t
>>> II : y_t = b0 + b1*y_(t-1) + sigma*e_t
>>> III: sigma^2 = c0 + c1*cos(2*3.14* z /365)
>>>
>>> y is the dependent variable, x and z are the undependent variables.
>>> I have estimated the parameter values, a0=7.68, a1=-0.00019, b0=-0.0013,
>>> b1=0.79, c0=3.91, and c1=1.72.
>>> I want to combine the equations into one, and make a prognosis by using
>>> the
>>> fitted parameters.
>>>
>>> I think I should use -nl- to combine the equations.
>>> But I don't understand how I can include equation III, since it is a
>>> function modeling the residuals in equation II.
>>>
>>> --
>>> Best regards
>>> Ingrid Johnsen
>>> *
>>> *   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/
>
>
>
> --
> Ingrid

*
*   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