[R-SIG-Finance] Help on constrained regression

R_help Help rhelpacc at gmail.com
Fri Jul 3 01:36:50 CEST 2009


I did. The problem was the underlying process that's negative AR(1).
So I just have to find other way to model it. Thank you.

On Thu, Jul 2, 2009 at 7:31 PM, spencerg<spencer.graves at prodsyse.com> wrote:
>     Have you considered writing the model in terms of log(a) = g, say:
>
>          y[t] = exp(g)*y[t-1]+b+epsilon?
>
>     With this, you could estimate "g" and "b" using "nls".  With multiple
> series, you could use the "nlme" function in the "nmle" package.  For the
> "nlme" package, an excellent reference in Pinheiro and Bates (2000)
> Mixed-Effects Models in S and S-PLUS (Springer).
>
>     Hope this helps.
>     Spencer Graves
>
> R_help Help wrote:
>>
>> Hi,
>>
>> I have an AR(1) model
>>
>> y[t] = ay[t-1]+b+epsilon
>>
>> I'm trying to force a to be positive. So I did the constrained
>> regression with constraints 0 < a < 1. I used pcls in package mgcv.
>> However, I found that the solution is not so stable. Most of my lag 1
>> autocorrelation is negative. Forcing a to positive value makes the
>> optimizer to stick a to the boundary value. All it does is varying b.
>> I there anyway to solve this problem? I think the problem might be due
>> to my initial value is not a smart choice.
>>
>> Thank you.
>>
>> adschai
>>
>> _______________________________________________
>> R-SIG-Finance at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> -- Subscriber-posting only.
>> -- If you want to post, subscribe first.
>>
>>
>
>



More information about the R-SIG-Finance mailing list