View source: R/stock_recruit.r
fit.SR | R Documentation |
3種類の再生産関係の推定を、最小二乗法か最小絶対値法で、さらに加入の残差の自己相関を考慮して行うことができる
fit.SR(
SRdata,
SR = "HS",
method = "L2",
AR = 1,
hessian = FALSE,
w = NULL,
length = 20,
max.ssb.pred = 1.3,
p0 = NULL,
out.AR = TRUE,
bio_par = NULL,
plus_group = TRUE,
is_jitter = FALSE,
HS_fix_b = NULL,
gamma = 0.01,
bias_correct = FALSE
)
SRdata |
|
SR |
再生産関係 ( |
method |
最適化法( |
AR |
自己相関を推定するか(1), しないか(0) |
length |
初期値を決める際のgridの長さ |
p0 |
|
out.AR |
自己相関係数を一度再生産関係を推定したのちに、外部から推定するか(1), 内部で推定するか(0) |
bio_par |
data.frame(waa=c(100,200,300),maa=c(0,1,1),M=c(0.3,0.3,0.3)) のような生物パラメータをあらわすデータフレーム。waaは資源量を計算するときのweight at age, maaはmaturity at age, Mは自然死亡係数。これを与えると、steepnessやR0も計算して返す |
plus_group |
hなどを計算するときに、プラスグループを考慮するか |
HS_fix_b |
SR=HSのとき、折れ点bを固定して計算したい時に値を代入。デフォルットはNULL。ただし、min(SSB)/100より小さい値は入れないこと。 |
gamma |
|
以下の要素からなるリスト
input
使用した引数のリスト
pars
推定されたパラメータ
opt
optim
の結果オブジェクト
resid
再生産関係から予測値からの加入量の残差
resid2
自己相関のを推定したうえでの加入の残差(自己相関なしの時resid
と等しくなる)
loglik
対数尤度
k
推定したパラメータ数
AIC
AIC (out.AR=TRUE
のときは自己相関推定前の結果)
AICc
AICc (out.AR=TRUE
のときは自己相関推定前の結果)
BIC
BIC (out.AR=TRUE
のときは自己相関推定前の結果)
AIC.ar
out.AR=TRUE
のときにacf
関数で得られた自己相関を推定しない場合(0)とする場合(1)のAICの差
pred
予測された再生産関係
steepness
bio_parを与えたときに、steepness (h) やR0(漁獲がない場合の平均加入尾数), SB0(漁獲がない場合の平均親魚量)なども追加的に返す
## Not run:
data(res_vpa)
SRdata <- get.SRdata(res_vpa)
resSR <- fit.SR(SRdata, SR = c("HS","BH","RI")[1],
method = c("L1","L2")[2], AR = 1,
out.AR = TRUE)
resSR$pars
# When outputting steepness, create a bio_par object using derive_biopar function with the res_vpa object and the corresponding year as its argument, and put the bio_par object in the argument of fit.SR.
bio_par <- derive_biopar(res_obj=res_vpa,derive_year = 2010)
resSR <- fit.SR(SRdata, SR = c("HS","BH","RI")[1],
method = c("L1","L2")[2], AR = 1,
out.AR = TRUE,bio_par=bio_par)
resSR$pars
resSR$steepness
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.