Closed jimianelli closed 8 years ago
When the code is implemented, I'll test / fix other example models to ensure they contain the correct lines, also for the simulation models.
I think dvector in dvector cpue_sd(k) = sqrt(log(1.0 + square(cpue_cv(k)+add_cv(k)))); Should be declared as dvar vector, shouldn't it?
On Thursday, December 17, 2015, Jim Ianelli notifications@github.com wrote:
suggestion from Jie: In GMACS.tpl: About line 669, add: Init_vector cv_phz(1, nSurveys);
About line 1021, add: Init_number_vector add_cv(1, nSurveys,-1.0,1.0,cv_phz);
About line 2521-2522,replace by: dvector cpue_sd(k) = sqrt(log(1.0 + square(cpue_cv(k)+add_cv(k)))); nloglike(2,k) +=cpue_lambda(k) * (sum(log(cpeu_sd(k)))+dnorm(res_cpue(k), cpue_sd(k)));
In SM15.ctl (and other control files) : After line 90, add: Additional CV phase for survey/indices -4 -4 (or 4 4 for estimating)
— Reply to this email directly or view it on GitHub https://github.com/seacode/gmacs/issues/156.
All models are wrong, some are useful.--G.E.P. Box Beware of geeks bearing equations. --W. Buffett
Disclaimer: The opinions expressed above are personal and do not necessarily reflect official NOAA policy.
Yes, right you are thanks Buck. I just got this finished off using the smbkc example, I shall push now. Thanks also to Jie!
Adding some output ~2806 to show result of this and note that line 2570 doesn't seem correct: nloglike(2,k) += cpue_lambda(k) * (log(cpue_sd(k)) + dnorm(res_cpue(k), cpue_sd));
since cpue_sd(k) is a vector for the kth survey dvar_vector cpue_sd = sqrt(log(1.0 + square(cpue_cv(k) + add_cv(k))));
Thanks Jim. It also occurred to me that we will need to specify priors for additional CV.
priors...and also always positive...
done
suggestion from Jie: In GMACS.tpl: About line 669, add: Init_vector cv_phz(1, nSurveys);
About line 1021, add: Init_number_vector add_cv(1, nSurveys,-1.0,1.0,cv_phz);
About line 2521-2522,replace by: dvector cpue_sd(k) = sqrt(log(1.0 + square(cpue_cv(k)+add_cv(k)))); nloglike(2,k) +=cpue_lambda(k) * (sum(log(cpeu_sd(k)))+dnorm(res_cpue(k), cpue_sd(k)));
In SM15.ctl (and other control files) : After line 90, add: Additional CV phase for survey/indices -4 -4 (or 4 4 for estimating)