<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi,<br>
<br>
I'm trying to define a segregAR1 FLSR model, as it seems to be missing from the SRmodels available in FLCore. I have modified the segreg model as follows, based on the bevholtAR1 and rickerAR1 models:<br>
<br>
#SegregAR1<br>
segregAR1 <- function(){<br>
logl <- function(a, b, rho, rec, ssb){<br>
loglAR1(log(rec), FLQuant(log(ifelse(c(ssb)<=b,a*c(ssb),a*b)),dimnames=dimnames(ssb)),rho=rho)}<br>
<br>
model <- rec ~ FLQuant(ifelse(c(ssb)<=b,a*c(ssb),a*b),dimnames=dimnames(ssb))<br>
<br>
initial <- structure(function(rec, ssb){<br>
return(FLPar(a=median(c(rec/ssb),na.rm=TRUE), b=median(c(ssb),na.rm=TRUE)))},<br>
lower=rep( 0, 0),<br>
upper=rep(Inf, 2))<br>
<br>
return(list(logl=logl, model=model, initial=initial))<br>
} # }}}<br>
<br>
<br>
Basically, I've justed added a rho parameter to the likelihood which should, as I understand it, be sufficient to give me what I want. However, it doesn't seem to work when I go to fit it:<br>
> model(base.dat) <- "segregAR1"<br>
> res <- fmle(base.dat)<br>
Nelder-Mead direct search function minimizer<br>
Error in .local(obs, hat, ...) : <br>
argument "rho" is missing, with no default<br>
> <br>
<br>
Any ideas what I've done wrong?<br>
<br>
Mark<br>
<br>
<br>
<br>
<div class="line" id="LC76"><span class="c1"><br>
</span></div>
<br>
<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF64123"><font face="Tahoma" size="2" color="#000000"><b>Fra:</b> flr-list-bounces@r-forge.wu-wien.ac.at [flr-list-bounces@r-forge.wu-wien.ac.at] på vegne af Luis Ridao [luridao@gmail.com]<br>
<b>Sendt:</b> 4. oktober 2013 16:08<br>
<b>Til:</b> flr-list@flr-project.org<br>
<b>Emne:</b> [FLR-list] FLBRP<2 sorce code<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>FLR help,<br>
<br>
</div>
trying to get the source code for FLBRP version<2 (e.g. FLBRP_1.4-1)<br>
</div>
but can't find it anywhere.<br>
<br>
</div>
anyone with an older source code version of the package around?<br>
<br>
</div>
best,<br>
</div>
Luis<br clear="all">
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div><br>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>