<div><br></div>thanks Laurie and Iago for your help<div><br></div><div>best,</div><div>Luis<br><br><div class="gmail_quote">On Tue, Mar 20, 2012 at 10:10 PM, Iago Mosqueira <span dir="ltr"><<a href="mailto:iago.mosqueira-sanchez@jrc.ec.europa.eu">iago.mosqueira-sanchez@jrc.ec.europa.eu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 03/21/2012 02:45 AM, Luis Ridao wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
FLR-help,<br>
<br>
I'm fitting a Hockey-stick function with following:<br>
<br>
fsai.segreg <- fsaiSR<br>
model(fsai.segreg) <- segreg()<br>
fsai.segreg <- fmle(fsai.segreg)<br>
<br>
and the parameter estimates are as follows:<br>
<br>
 > params(fsai.segreg)<br>
An object of class "FLPar"<br>
params<br>
        a        b<br>
  0.63387 45.31551<br>
units:  NA<br>
<br>
However I want to use the parameter estimates from ADMB<br>
which are something like :<br>
<br>
a = 0.6060456<br>
b = 56.51466<br>
<br>
How can i set the ADMB-estimates in the 'fsai.segreg' object and recalculate<br>
the residuals and log-likelihood based on these estimates?<br>
<br>
I do something like:<br>
 > model(fsai.segreg3) <- segreg(FLpar(a = exp(-0.5008), b = exp(4.0345)))<br>
Error in segreg(FLpar(a = exp(-0.5008), b = exp(4.0345))) :<br>
<br>
and :<br>
<br>
 > model(fsai.segreg3) <- segreg(params=list(FLpar(a = exp(-0.5008), b =<br>
exp(4.0345))))<br>
Error in segreg(params = list(FLpar(a = exp(-0.5008), b = exp(4.0345)))) :<br>
   unused argument(s) (params = list(FLpar(a = exp(-0.5008), b =<br>
exp(4.0345))))<br>
<br>
<br>
Thanks in advance<br>
</blockquote>
<br></div></div>
params(fasi.segreg3) <- FLPar(a = exp(-0.5008), b = exp(4.0345))<br>
<br>
should get you the parameter values into the object. Then you will have to calculate the estimated values residuals and get them into the fitted and residuals slots. For the logLik, we simply report the value returned by optim.<br>

<br>
Cheers,<br>
<br>
<br>
Iago<br>
<br>
______________________________<u></u>_________________<br>
flr-list mailing list<br>
<a href="mailto:flr-list@flr-project.org" target="_blank">flr-list@flr-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/flr-list" target="_blank">https://lists.r-forge.r-<u></u>project.org/cgi-bin/mailman/<u></u>listinfo/flr-list</a><br>
</blockquote></div><br></div>