Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

demo file excel #42

Open
quangvanvo opened this issue Oct 16, 2021 · 1 comment
Open

demo file excel #42

quangvanvo opened this issue Oct 16, 2021 · 1 comment

Comments

@quangvanvo
Copy link

Please share the demo file in excel for each in data
Quang

@quangvanvo
Copy link
Author

The ELEFAN not run, Please help


setwd("D:/R/Lyson/Comque")
LScomque = read.csv("D:/R/Lyson/Comque/lfq3.csv", header=T, sep = ",")
dates <- colnames(LScomque)[-1]
dates <- strsplit(dates, "X")
dates <- unlist(lapply(dates, function(x) x[2]))
dates <- as.Date(dates, "%Y-%d-%m")
lfq5 <- list(dates = dates, midLengths = lfqCq$lengthClass, catch = as.matrix(LScomque[,-1]))
class(lfq5) <- "LScomque"
lfq5$catch[is.na(lfq5$catch)] <- 0
plot(lfq5, Fname = "catch")

synthetic lfq data example

setwd("D:/R/Lyson/Comque")
data("lfq5")
plot(lfq5, Fname="catch")

ELEFAN_SA (takes approximately 2 minutes)

output <- ELEFAN_SA(lfq5, SA_time = 60*2, seasonalised = TRUE, MA = 11,
init_par = list(Linf = 75, K = 0.5, t_anchor = 0.5, C = 0.5, ts = 0.5),
low_par = list(Linf = 70, K = 0.3, t_anchor = 0, C = 0, ts = 0),
up_par = list(Linf = 90, K = 0.7, t_anchor = 1, C = 1, ts = 1))
output$par
output$Rn_max

view fit

plot(output)

or

plot(output, draw = FALSE)
lfqFitCurves(output, col=1, par=output$par, draw=TRUE)$ESP

compare to original parameters

tmp <- lfqFitCurves(output, col=4, lty=1,
par=list(Linf=80, K=0.5, t_anchor=0.25, C=0.75, ts=0.5), draw=TRUE)
tmp$fESP
output$Rn_max

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant