forked from shcaba/SS-DL-tool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.r
1093 lines (1003 loc) · 61 KB
/
ui.r
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
require(shiny)
require(shinyjs)
require(shinyWidgets)
require(shinyFiles)
require(shinyBS)
linebreaks <- function(n){HTML(strrep(br(), n))}
shinyUI(fluidPage(theme = "bootstrap.css",
useShinyjs(),
titlePanel("Welcome to the Stock Synthesis data-limited tool (SS-DL tool)"),
h4(p(strong("This tool uses the Stock Synthesis framework to implement a ",tags$a(href="javascript:window.open('SS-DL-approaches.html', '_blank','width=600,height=400')", "variety of types"), "of models:"))),
br(),
sidebarLayout(
sidebarPanel(
shinyjs::hidden(wellPanel(id="Data_panel",
h4(strong("Choose data file")),
fluidRow(column(width=12,fileInput('file2', 'Catch time series',
accept = c(
'text/csv',
'text/comma-separated-values',
'text/tab-separated-values',
'text/plain',
'.csv'
)
))),
fluidRow(column(width=12,fileInput('file1', 'Length composition',
accept = c(
'text/csv',
'text/comma-separated-values',
'text/tab-separated-values',
'text/plain',
'.csv'
)
))),
fluidRow(column(width=12,fileInput('file3', 'Age composition',
accept = c(
'text/csv',
'text/comma-separated-values',
'text/tab-separated-values',
'text/plain',
'.csv'
)
))),
#Mute for now, pull back in when index methods are ready
fileInput('file4', 'Abundance index',
accept = c(
'text/csv',
'text/comma-separated-values',
'text/tab-separated-values',
'text/plain',
'.csv'
)
),
h4(strong("Clear data files")),
fluidRow(column(width=3,actionButton("reset_ct", "Catches")),
column(width=3,actionButton("reset_lt", "Length")),
column(width=3,actionButton("reset_age", "Ages")),
column(width=3,actionButton("reset_index", "Index"))),
br(),
br(),
fluidRow(column(width=10,checkboxInput("user_model","Use existing model?",FALSE))),
h5(em("Using an existing model allows you to do jitters and other things on a pre-existing model run.")),
h5(em("Choose Jitters or any of the Additional SS options that do not modify the data or control files.")),
h5(em("To do sensitivity runs for pre-existing models, make changes in the data_new or control_new files and choose those files in the options list.")),
h5(em("Make sure the model run is in the Scenarios folder. Put that folder name in the Scenario name input and run the model.")),
)
),
shinyjs::hidden(wellPanel(id="panel_Ct_F_LO",
h4(strong("Use constant catch or estimate fishing mortality directly?")),
h5(em("Using constant catch assumes the same catch in all years in order to fit the length composition data (similar to LBSPR, but the model integrates the fit of each year, not each year separately)")),
h5(em("It provides a long-term average response (F) to estimating stock status, and thus useful with non-continous years of sampling.")),
h5(em("Fishing rate can also be directly estimated from the length composition with no assumption in catches (similar to the LIME approach).")),
h5(em("This approach is a more variable reponse to estimating stock status, and is best used with continuous years of contemporary data. Recruitment can also be estimated.")),
h5(em("Recruitment can also be estimated in both approaches.")),
fluidRow(column(width=10,selectInput("Ct_F_LO_select","Approach",c("Choose an option","Constant Catch","Estimate F")))),
)
),
shinyjs::hidden(wellPanel(id="panel_ct_wt_LO",
h4(strong("Weight fleet lengths by relative catch")),
h5(em("The relative catch contribution needs specification with multiple length-only fleets")),
h5(em("Example: Two fleets, with fleet 2 catching 2 times the amount as fleet 1, the entry would be 1,2.")),
h5(em("Each entry will be relative to the highest value.")),
fluidRow(column(width=10,textInput("Wt_fleet_Ct","Relative catch values",value=""))),
)
),
shinyjs::hidden(wellPanel(id="panel_data_wt_lt",
h4(strong("Data-weighting")),
h5(em("Data weighting balances information content of biological data with model structure")),
h5(em("Data weighting balances across factors (e.g, fleets, sex, etc.)")),
h5(em("The default value is equally weighting among fleets based on input effective sample size inputs")),
h5(em("If using an existing model, chose 'None' to maintain the same weighting as the existing model")),
# fluidRow(column(width=10,prettyCheckbox(
# inputId = "dirichlet",
# label = "Use Dirichlet weighting?",
# value=FALSE,
# shape="curve",
# icon = icon("check"),
# animation="smooth"),
# bigger=TRUE),
# fill=TRUE),
awesomeRadio(
inputId = "Data_wt",
label = "Choose data-weighting option",
choices = c("None","Dirichlet", "Francis", "McAllister-Ianelli"),
selected = "None",
status = "warning"
)
# fluidRow(column(width=6, prettyCheckbox(
# inputId = "dirichlet",
# label = "Use Dirichlet weighting?",
# shape = "round",
# outline = TRUE,
# status = "info"))),
# fluidRow(column(width=6, prettyCheckbox(
# inputId = "Francis_wt",
# label = "Use Francis weighting?",
# shape = "round",
# outline = TRUE,
# status = "info"))),
# fluidRow(column(width=6, prettyCheckbox(
# inputId = "MI_wt",
# label = "Use McAllister and Ianelli?",
# shape = "round",
# outline = TRUE,
# status = "info"))),
# h5(em("After the first run, you can check the Francis or harmonic mean methods for suggested weightings")),
# fluidRow(column(width=6,textInput("Lt_datawts", "Lengths weights by fleet", value=""))),
)
),
shinyjs::hidden(wellPanel(id="panel_SSLO_LH",
h4(strong("Life history inputs")),
wellPanel(id="panel_SSLO_fixed",
h5(em("Female")),
fluidRow(column(width=6,numericInput("M_f", "Natural mortality", value=NA,min=0, max=10000, step=0.00001))),
fluidRow(column(width=6,numericInput("Linf_f", "Asymptotic size (Linf)", value=NA,min=0, max=10000, step=0.001)),
column(width=6,numericInput("k_f","Growth coefficient k", value=NA,min=0, max=10000, step=0.00001))),
fluidRow(column(width=6,numericInput("t0_f","Age at length 0 (t0)", value=NA,min=-100, max=10000, step=0.001)),
column(width=6,textInput("CV_lt_f","CV at length (young then old)", value="0.1,0.1"))),
fluidRow(column(width=6,numericInput("L50_f", "Length at 50% maturity", value=NA,min=0, max=10000, step=0.001)),
column(width=6,numericInput("L95_f","Length at 95% maturity", value=NA,min=0, max=10000, step=0.001))),
#h5("Fecundity-length relationship F=aL^b. Set equal to the W-L relationship to get fecundity equivalent to spawning biomass"),
#fluidRow(column(width=6,numericInput("Fec_a_f", "Coefficient a", value=0.00001,min=0, max=10000, step=-0.01)),
# column(width=6,numericInput("Fec_b_f","Exponent b", value=3,min=0, max=10000, step=0.01))),
# fluidRow(column(width=6,numericInput("WLa_f", "Weight-Length alpha", value=0.00001,min=0, max=10000, step=0.000000001)),
# column(width=6,numericInput("WLb_f","Weight-length beta", value=3,min=0, max=10000, step=0.01))),
),
fluidRow(column(width=6,checkboxInput("male_parms","Males specific values?",FALSE)),
column(width=6,checkboxInput("male_offset","Males offset from females (log(m/f)?",FALSE))),
# fluidRow(column(width=10,prettyCheckbox("male_parms","Males specific values?",
# value=FALSE,
# shape="curve",
# icon = icon("check"),
# animation="smooth"),
# bigger=TRUE),
# fill=TRUE,
# status="default"),
#fluidRow(column(width=7, h3("Males specific values?")),column(width=2,checkboxInput("male_parms","Males specific values?",FALSE,width="150%"))),
wellPanel(
uiOutput("Male_parms_inputs_label"),
uiOutput("Male_parms_inputs1"),
uiOutput("Male_parms_inputs2"),
uiOutput("Male_parms_inputs3")
# uiOutput("Male_parms_inputs4")
),
)
),
shinyjs::hidden(wellPanel(id="panel_SS_LH_fixed_est_tog",
fluidRow(column(width=10,switchInput("est_parms","Estimate parameters?",
value=FALSE,
onLabel = "YES",
offLabel = "NO",
onStatus = "success",
offStatus = "danger"))),
h5("Estimating parameters is a data-based approach to determining life history values"),
h5("Estimating parameters can also propagate parameter uncertainty into derived model outputs"),
br(),
h5("When estimating parameters with catch and length (SS-CL) models consider:"),
tags$ul(tags$li(h5(p("It is recommended to run the model first by fixing parameters.")))),
tags$ul(tags$li(h5(p("Then run likelihood profiles to see if the data contain any information on parameters.")))),
tags$ul(tags$li(h5(p("Parameters that seem informed by the data (i.e., result in realistic values) are good candidates for estimation.")))),
tags$ul(tags$li(h5(p("The most likely parameters to have information from fishery-based lengths are Linf and M.")))),
h5("Not all parameters need be estimated. Fix parameters by turning the phase negative (e.g., -1)"),
)),
shinyjs::hidden(wellPanel(id="panel_SS_LH_fixed",
h4(strong("Life history inputs")),
wellPanel(id="panel_SS_fixed",
h5(em("Female")),
fluidRow(column(width=6,numericInput("M_f_fix", "Natural mortality", value=NA,min=0, max=10000, step=0.00001))),
fluidRow(column(width=6,numericInput("Linf_f_fix", "Asymptotic size (Linf)", value=NA,min=0, max=10000, step=0.001)),
column(width=6,numericInput("k_f_fix","Growth coefficient k", value=NA,min=0, max=10000, step=0.00001))),
fluidRow(column(width=6,numericInput("t0_f_fix","Age at length 0 (t0)", value=NA,min=0, max=10000, step=0.001)),
column(width=6,textInput("CV_lt_f_fix","CV at length (young then old)", value="0.1,0.1"))),
fluidRow(column(width=6,numericInput("L50_f_fix", "Length at 50% maturity", value=NA,min=0, max=10000, step=0.001)),
column(width=6,numericInput("L95_f_fix","Length at 95% maturity", value=NA,min=0, max=10000, step=0.001))),
h5("Length-weight relationship W=aL^b. Weight is in kg and length in cm."),
fluidRow(column(width=6,numericInput("WLa_f_fix", "a in W=aL^b", value=0.00001,min=0, max=10000, step=0.000000001)),
column(width=6,numericInput("WLb_f_fix","b in W=aL^b", value=3,min=0, max=10000, step=0.0001))),
h5("Length-fecundity relationship F=aL^b. Fecundity is measured in number of eggs or pups. Set equal to the length-weight relationship to get fecundity equivalent to spawning biomass."),
fluidRow(column(width=6,numericInput("Fec_a_f_fix", "a in F=aL^b", value=0.00001,min=0, max=10000, step=0.000000001)),
column(width=6,numericInput("Fec_b_f_fix","b in F=aL^b", value=3,min=0, max=10000, step=0.0001))),
),
fluidRow(column(width=10,checkboxInput("male_parms_fix","Males specific values?",FALSE)),
column(width=10,checkboxInput("male_offset_fix","Males offset from females (log(m/f)?",FALSE))),
#fluidRow(column(width=7, h3("Males specific values?")),column(width=2,checkboxInput("male_parms","Males specific values?",FALSE,width="150%"))),
wellPanel(
uiOutput("Male_parms_inputs_label_fix"),
uiOutput("Male_parms_inputs1_fix"),
uiOutput("Male_parms_inputs2_fix"),
uiOutput("Male_parms_inputs3_fix"),
uiOutput("Male_parms_inputs4_fix")
),
)
),
shinyjs::hidden(wellPanel(id="panel_SS_LH_est",
h4(strong("Life history inputs")),
# fluidRow(column(width=10,switchInput("est_parms2","Estimate parameters?",value=TRUE))),
wellPanel(id="panel_SS_est",
h4(em("Female")),
dropdownButton(
selectInput("M_f_prior","Prior type",c("no prior","symmetric beta", "beta","lognormal","gamma","normal")),
numericInput("M_f_mean", "Mean", value=NA,min=0, max=10000, step=0.00001),
numericInput("M_f_SD", "SD", value=0,min=0, max=10000, step=0.00001),
numericInput("M_f_phase", "Phase", value=-1,min=-999, max=10, step=1),
circle = FALSE, right=TRUE, status = "danger", icon = icon("skull-crossbones"), width = "300px",label="Natural mortality"
),
br(),
h5(strong("Growth")),
dropdownButton(
selectInput("Linf_f_prior","Prior type",c("no prior","symmetric beta", "beta","lognormal","gamma","normal")),
numericInput("Linf_f_mean", "Mean", value=NA,min=0, max=10000, step=0.001),
numericInput("Linf_f_SD", "SD", value=0,min=0, max=10000, step=0.0001),
numericInput("Linf_f_phase", "Phase", value=-1,min=-999, max=10, step=1),
circle = FALSE, right=TRUE, status = "danger", icon = icon("infinity"), width = "300px",label="Linf: Asymptotic size"
),
br(),
dropdownButton(
selectInput("k_f_prior","Prior type",c("no prior","symmetric beta", "beta","lognormal","gamma","normal")),
numericInput("k_f_mean", "Mean", value=NA,min=0, max=10000, step=0.00001),
numericInput("k_f_SD", "SD", value=0,min=0, max=10000, step=0.00001),
numericInput("k_f_phase", "Phase", value=-1,min=-999, max=10, step=1),
circle = FALSE, right=TRUE, status = "danger", icon = icon("ruler-horizontal"), width = "300px",label="k: VB growth coefficient"
),
br(),
dropdownButton(
selectInput("t0_f_prior","Prior type",c("no prior","symmetric beta", "beta","lognormal","gamma","normal")),
numericInput("t0_f_mean", "Mean", value=NA,min=-100, max=10000, step=0.001),
numericInput("t0_f_SD", "SD", value=0,min=0, max=10000, step=0.001),
numericInput("t0_f_phase", "Phase", value=-1,min=-999, max=10, step=1),
circle = FALSE, right=TRUE, status = "danger", icon = icon("baby-carriage"), width = "300px",label="t0: Age at size 0"
),
br(),
dropdownButton(
selectInput("CV_lt_f_young_prior","Prior type",c("no prior","symmetric beta", "beta","lognormal","gamma","normal")),
numericInput("CV_lt_f_young_mean", "Mean", value=0.1,min=0, max=10000, step=0.0001),
numericInput("CV_lt_f_young_SD", "SD", value=0,min=0, max=10000, step=0.0001),
numericInput("CV_lt_f_young_phase", "Phase", value=-1,min=-999, max=10, step=1),
circle = FALSE, right=TRUE, status = "danger", icon = icon("dice"), width = "300px",label="CV at length (young)"
),
br(),
dropdownButton(
selectInput("CV_lt_f_old_prior","Prior type",c("no prior","symmetric beta", "beta","lognormal","gamma","normal")),
numericInput("CV_lt_f_old_mean", "Mean", value=0.1,min=0, max=10000, step=0.0001),
numericInput("CV_lt_f_old_SD", "SD", value=0,min=0, max=10000, step=0.0001),
numericInput("CV_lt_f_old_phase", "Phase", value=-1,min=-999, max=10, step=1),
circle = FALSE, right=TRUE, status = "danger", icon = icon("dice"), width = "300px",label="CV at length (old)"
),
h5(strong("Maturity and weight-length relationships")),
fluidRow(column(width=6,numericInput("L50_f_est", "Length at 50% maturity", value=NA,min=0, max=10000, step=0.001)),
column(width=6,numericInput("L95_f_est","Length at 95% maturity", value=NA,min=0, max=10000, step=0.001))),
h5("Length-weight relationship W=aL^b. Weight is in kg and length in cm."),
fluidRow(column(width=6,numericInput("WLa_f_est", "a in W=aL^b", value=0.00001,min=0, max=10000, step=0.000000001)),
column(width=6,numericInput("WLb_f_est","b in W=aL^b", value=3,min=0, max=10000, step=0.001))),
h5("Length-fecundity relationship F=aL^b. Fecundity is measured in number of eggs or pups. Set equal to the length-weight relationship to get fecundity equivalent to spawning biomass."),
fluidRow(column(width=6,numericInput("Fec_a_f_est", "a in F=aL^b", value=0.00001,min=0, max=10000, step=0.000000001)),
column(width=6,numericInput("Fec_b_f_est","b in F=aL^b", value=3,min=0, max=10000, step=0.001))),
),
fluidRow(column(width=6,checkboxInput("male_parms_est","Males specific values?",FALSE)),
column(width=6,checkboxInput("male_offset_est","Males offset from females (log(m/f))?",FALSE))),
#fluidRow(column(width=7, h3("Males specific values?")),column(width=2,checkboxInput("male_parms","Males specific values?",FALSE,width="150%"))),
wellPanel(
uiOutput("Male_parms_inputs_label_est"),
uiOutput("Male_parms_inputs_M_est"),
uiOutput("Male_parms_inputs_space1"),
uiOutput("Male_parms_inputs_Growth_label"),
uiOutput("Male_parms_inputs_Linf_est"),
uiOutput("Male_parms_inputs_space2"),
uiOutput("Male_parms_inputs_k_est"),
uiOutput("Male_parms_inputs_space3"),
uiOutput("Male_parms_inputs_t0_est"),
uiOutput("Male_parms_inputs_space4"),
uiOutput("Male_parms_inputs_CV_est_young"),
br(),
uiOutput("Male_parms_inputs_CV_est_old"),
uiOutput("Male_parms_inputs_space5"),
uiOutput("Male_parms_inputs_WL_est")
),
)
),
# shinyjs::hidden(wellPanel(id="panel_SS_est",
# h3("Life history inputs"),
# fluidRow(column(width=10,switchInput("est_parms2","Fix parameters?"))),
# wellPanel(
# h4(em("Female")),
# fluidRow(column(width=6,numericInput("Nages","Max. age", value=NA,min=1, max=1000, step=1))),
# h5(strong("Natural mortality")),
# fluidRow(column(width=4,style='padding:1px;',align="center", selectInput("M_prior","Prior type",c("lognormal","truncated normal","uniform","beta"))),
# column(width=3,style='padding:2px;',align="center",numericInput("M_f_mean", "Mean", value=NA,min=0, max=10000, step=0.001)),
# column(width=3,style='padding:2px;',align="center",numericInput("M_f_SD", "SD", value=0,min=0, max=10000, step=0.001)),
# column(width=2,style='padding:2px;',align="center",numericInput("M_f_phase", "Phase", value=-1,min=-999, max=10, step=0.001))),
# h5(strong("Growth")),
# h5(strong("Linf")),
# fluidRow(column(width=4,style='padding:1px;',align="center",selectInput("Linf_f_prior","Prior type",c("lognormal","truncated normal","uniform","beta"))),
# column(width=3,style='padding:2px;',align="center",numericInput("Linf_f_mean", "Mean", value=NA,min=0, max=10000, step=0.001)),
# column(width=3,style='padding:2px;',align="center",numericInput("Linf_f_SD", "SD", value=0,min=0, max=10000, step=0.001)),
# column(width=2,style='padding:2px;',align="center",numericInput("Linf_f_phase", "Phase", value=-1,min=-999, max=10, step=0.001))),
# h5(strong("k")),
# fluidRow(column(width=4,style='padding:2px;',selectInput("k_f_prior","Prior type",c("lognormal","truncated normal","uniform","beta"))),
# column(width=3,style='padding:2px;',numericInput("k_f_mean", "Mean", value=NA,min=0, max=10000, step=0.001)),
# column(width=3,style='padding:2px;',numericInput("k_f_SD", "SD", value=0,min=0, max=10000, step=0.001)),
# column(width=2,style='padding:2px;',align="center",numericInput("k_f_phase", "Phase", value=-1,min=-999, max=10, step=0.001))),
# h5(strong("t0")),
# fluidRow(column(width=4,style='padding:2px;',selectInput("t0_f_prior","Prior type",c("lognormal","truncated normal","uniform","beta"))),
# column(width=3,style='padding:2px;',numericInput("t0_f_mean", "Mean", value=NA,min=0, max=10000, step=0.001)),
# column(width=3,style='padding:2px;',numericInput("t0_f_SD", "SD", value=0,min=0, max=10000, step=0.001)),
# column(width=2,style='padding:2px;',align="center",numericInput("t0_f_phase", "Phase", value=-1,min=-999, max=10, step=0.001))),
# h5(strong("Length CV")),
# fluidRow(column(width=4,style='padding:2px;',selectInput("CV_f_prior","Prior type",c("lognormal","truncated normal","uniform","beta"))),
# column(width=3,style='padding:2px;',numericInput("CV_f_mean", "Mean", value=0.1,min=0, max=10000, step=0.001)),
# column(width=3,style='padding:2px;',numericInput("CV_f_SD", "SD", value=0,min=0, max=10000, step=0.001)),
# column(width=2,style='padding:2px;',align="center",numericInput("CV_f_phase", "Phase", value=-1,min=-999, max=10, step=0.001))),
# h5(strong("Maturity and weight-length relationships")),
# fluidRow(column(width=6,numericInput("L50_f", "Length at 50% maturity", value=NA,min=0, max=10000, step=0.01)),
# column(width=6,numericInput("L95_f","Length at 95% maturity", value=NA,min=0, max=10000, step=0.01))),
# fluidRow(column(width=6,numericInput("Fec_a", "Wt-based fec coeff", value=1,min=0, max=10000, step=-0.01)),
# column(width=6,numericInput("Fec_b","Wt-based fec exp", value=1,min=0, max=10000, step=0.01))),
# fluidRow(column(width=6,numericInput("WLa_f", "Weight-Length alpha", value=0.00001,min=0, max=10000, step=0.000000001)),
# column(width=6,numericInput("WLb_f","Weight-length beta", value=3,min=0, max=10000, step=0.01))),
# ),
# fluidRow(column(width=10,checkboxInput("male_parms_est","Males specific values?",FALSE))),
# #fluidRow(column(width=7, h3("Males specific values?")),column(width=2,checkboxInput("male_parms","Males specific values?",FALSE,width="150%"))),
# wellPanel(
# uiOutput("Male_parms_inputs_label_est"),
# uiOutput("Male_parms_inputs1_est"),
# uiOutput("Male_parms_inputs2_est"),
# uiOutput("Male_parms_inputs3_est"),
# uiOutput("Male_parms_inputs4_est")
# ),
# )
# ),
shinyjs::hidden(wellPanel(id="panel_SSS",
h4(strong("Life history inputs")),
h5(em("If using the uniform prior, low and high range go in the mean and SD input, respectively.")),
wellPanel(
h4(em("Female")),
h5(strong("Natural mortality")),
dropdownButton(
selectInput("M_prior_sss","Prior type",c("lognormal","normal","uniform","no prior")),
numericInput("M_f_mean_sss", "Mean", value=NA,min=0, max=10000, step=0.00001),
numericInput("M_f_SD_sss", "SD", value=0.44,min=0, max=10000, step=0.00001),
circle = FALSE, right=TRUE, status = "danger", icon = icon("skull-crossbones"), width = "300px",label="Natural mortality"
),
h5(strong("Growth")),
dropdownButton(
selectInput("Linf_f_prior_sss","Prior type",c("no prior","normal")),
numericInput("Linf_f_mean_sss", "Mean", value=NA,min=0, max=10000, step=0.001),
numericInput("Linf_f_SD_sss", "SD", value=0,min=0, max=10000, step=0.001),
circle = FALSE, right=TRUE, status = "danger", icon = icon("infinity"), width = "300px",label="Linf: Asymptotic size"
),
br(),
dropdownButton(
selectInput("k_f_prior_sss","Prior type",c("no prior","normal")),
numericInput("k_f_mean_sss", "Mean", value=NA,min=0, max=10000, step=0.00001),
numericInput("k_f_SD_sss", "SD", value=0,min=0, max=10000, step=0.00001),
circle = FALSE, right=TRUE, status = "danger", icon = icon("ruler-horizontal"), width = "300px",label="k: VB growth coefficient"
),
br(),
fluidRow(column(width=6,numericInput("Linf_k_cor_sss", "Correlation between Linf and k", value=-0.9,min=-1, max=1, step=0.001))),
br(),
dropdownButton(
selectInput("t0_f_prior_sss","Prior type",c("no prior","normal")),
numericInput("t0_f_mean_sss", "Mean", value=NA,min=-100, max=10000, step=0.001),
numericInput("t0_f_SD_sss", "SD", value=0,min=0, max=1000, step=0.001),
circle = FALSE, right=TRUE, status = "danger", icon = icon("baby-carriage"), width = "300px",label="t0: Age at size 0"
),
h5(em("Length CV")),
dropdownButton(
selectInput("CV_lt_f_young_prior_sss","Prior type",c("no prior")),
numericInput("CV_lt_f_young_mean_sss", "Mean", value=0.1,min=0, max=10000, step=0.0001),
numericInput("CV_lt_f_young_SD_sss", "SD", value=0,min=0, max=10000, step=0.0001),
circle = FALSE, right=TRUE, status = "danger", icon = icon("dice"), width = "300px",label="CV at length"
),
dropdownButton(
selectInput("CV_lt_f_old_prior_sss","Prior type",c("no prior")),
numericInput("CV_lt_f_old_mean_sss", "Mean", value=0.1,min=0, max=10000, step=0.0001),
numericInput("CV_lt_f_old_SD_sss", "SD", value=0,min=0, max=10000, step=0.0001),
circle = FALSE, right=TRUE, status = "danger", icon = icon("dice"), width = "300px",label="CV at length"
),
h5(strong("Maturity and weight-length relationships")),
fluidRow(column(width=6,numericInput("L50_f_sss", "Length at 50% maturity", value=NA,min=0, max=10000, step=0.001)),
column(width=6,numericInput("L95_f_sss","Length at 95% maturity", value=NA,min=0, max=10000, step=0.001))),
h5("Length-weight relationship W=aL^b. Weight is in kg and length in cm."),
fluidRow(column(width=6,numericInput("WLa_f_sss", "a in W=aL^b", value=0.00001,min=0, max=10000, step=0.000000001)),
column(width=6,numericInput("WLb_f_sss","b in W=aL^b", value=3,min=0, max=10000, step=0.001))),
h5("Length-fecundity relationship F=aL^b. Fecundity is measured in number of eggs or pups. Set equal to the length-weight relationship to get fecundity equivalent to spawning biomass."),
fluidRow(column(width=6,numericInput("Fec_a_f_sss", "a in F=aL^b", value=0.00001,min=0, max=10000, step=0.000000001)),
column(width=6,numericInput("Fec_b_f_sss","b in F=aL^b", value=3,min=0, max=10000, step=0.001))),
),
fluidRow(column(width=10,checkboxInput("male_parms_SSS","Males specific values?",FALSE)),
column(width=10,checkboxInput("male_offset_SSS","Males offset to females (log(m/f)?",FALSE))),
#fluidRow(column(width=7, h3("Males specific values?")),column(width=2,checkboxInput("male_parms_SSS","Males specific values?",FALSE,width="150%"))),
wellPanel(
uiOutput("Male_parms_inputs_label_SSS"),
uiOutput("Male_parms_inputs_M_SSS"),
uiOutput("Male_parms_inputs_space1_SSS"),
uiOutput("Male_parms_inputs_Growth_label_SSS"),
uiOutput("Male_parms_inputs_Linf_SSS"),
uiOutput("Male_parms_inputs_space2_SSS"),
uiOutput("Male_parms_inputs_k_SSS"),
uiOutput("Male_parms_inputs_space3_SSS"),
uiOutput("Male_parms_inputs_t0_SSS"),
uiOutput("Male_parms_inputs_space4_SSS"),
uiOutput("Male_parms_inputs_CV_young_SSS"),
uiOutput("Male_parms_inputs_CV_old_SSS"),
uiOutput("Male_parms_inputs_WL_SSS")
),
)
),
#SSS Stock status input
shinyjs::hidden(wellPanel(id="panel_SS_stock_status",
h4(strong("Relative stock status")),
#wellPanel(
fluidRow(column(width=6,numericInput("status_year", "Relative stock status year", value=NA,min=1000, max=3000, step=1))),
dropdownButton(
selectInput("Depl_prior_sss","Prior type",c("beta","lognormal","truncated normal","uniform","no prior")),
numericInput("Depl_mean_sss", "Mean", value=NA,min=0.001, max=1, step=0.001),
numericInput("Depl_SD_sss", "SD", value=0.2,min=0, max=1000, step=0.001),
circle = FALSE, status = "danger", icon = icon("battery-half"), width = "300px",label="Relative Stock Status"
)
)
),
################################
#Stock-recruitment/Productivity#
################################
shinyjs::hidden(wellPanel(id="panel_SSS_prod",
h4(strong("Stock-recruitment parameters")),
br(),
fluidRow(column(width=6,numericInput("lnR0_sss", "Initial recruitment (lnR0)", value=7,min=0.01, max=20, step=0.01))),
dropdownButton(
selectInput("h_prior_sss","Steepness",c("symmetric beta","beta","truncated normal","truncated lognormal","uniform","no prior")),
numericInput("h_mean_sss", "Mean", value=0.7,min=0.2, max=1, step=0.001),
numericInput("h_SD_sss", "SD", value=0.15,min=0, max=10000, step=0.001),
circle = FALSE, status = "danger", icon = icon("recycle"), width = "300px",label="Steepness"
),
)
),
shinyjs::hidden(wellPanel(id="panel_SS_LO_prod",
h4(strong("Stock-recruitment parameters")),
# wellPanel(
fluidRow(column(width=6,numericInput("h_LO","Steepness", value=0.7,min=0.2, max=1, step=0.01))),
# ),
)
),
shinyjs::hidden(wellPanel(id="panel_SS_prod_fixed",
h4(strong("Stock-recruitment parameters")),
# wellPanel(
fluidRow(column(width=6,numericInput("h","Steepness", value=0.7,min=0.2, max=1, step=0.01)),
column(width=6,numericInput("lnR0", "Initial recruitment (lnR0)", value=7,min=0.01, max=20, step=0.01))),
# ),
)
),
shinyjs::hidden(wellPanel(id="panel_SS_prod_est",
h4(strong("Stock-recruitment parameters")),
# wellPanel(
dropdownButton(
selectInput("h_ss_prior","Prior type",c("no prior","symmetric beta", "beta","lognormal","gamma","normal")),
numericInput("h_mean_ss", "Mean", value=0.7,min=0.2, max=1, step=0.001),
numericInput("h_SD_ss", "SD", value=0.15,min=0, max=10000, step=0.001),
numericInput("h_phase", "Phase", value=-1,min=-999, max=10, step=0.001),
circle = FALSE, status = "danger", icon = icon("recycle"), width = "300px",label="Steepness"
),
fluidRow(column(width=6,numericInput("lnR0_est", "Initial recruitment (lnR0)", value=9,min=0, max=20, step=0.01))),
)),
# fluidRow(column(width=4,style='padding:1px;',align="center", selectInput("h_ss_prior","Steepness",c("beta","symmetric beta","truncated normal","trunc lognormal","uniform"))),
# column(width=3,style='padding:2px;',align="center",numericInput("h_mean_ss", "Mean", value=0.7,min=0, max=10000, step=0.001)),
# column(width=3,style='padding:2px;',align="center",numericInput("h_SD_ss", "SD", value=0.15,min=0, max=10000, step=0.001)),
# column(width=2,style='padding:2px;',align="center",numericInput("h_phase", "Phase", value=-1,min=-999, max=10, step=0.001))),
# fluidRow(column(width=6,numericInput("lnR0_est", "Initial recruitment (lnR0)", value=9,min=0, max=20, step=0.01))),
# # ),
# )
# ),
#Recruitment estimation
shinyjs::hidden(wellPanel(id="panel_SS_recdevs",
fluidRow(column(width=10,checkboxInput("rec_choice","Estimate recruitment?",FALSE))),
wellPanel(
# fluidRow(column(width=8,offset=-10, h3("Estimate recruitment?")),column(width=6,checkboxInput("rec_choice","",FALSE))),
# fluidRow(column(width=8, h3("Estimate recruitment?")),column(width=4,radioButtons("rec_choice","",FALSE))),
tags$style("
.checkbox { /* checkbox is a div class*/
# line-height: 10px;
margin-bottom: 0px;
margin-left: 0px;
font-size: 20px;
}
input[type='checkbox']{ /* style for checkboxes */
width: 20px; /*Desired width*/
height: 20px; /*Desired height*/
line-height: 100px;
# span {
# margin-left: 30px; /*set the margin, so boxes don't overlap labels*/
# line-height: 30px;
}
}"),
uiOutput("Rec_options1"),
uiOutput("Rec_options2"),
fluidRow(column(width=10,checkboxInput("biasC_choice","Bias correct recruitments?",FALSE))),
h5("Years of no bias correction"),
uiOutput("Rec_options3"),
h5("Years of bias correction"),
uiOutput("Rec_options4"),
uiOutput("Rec_options5")
),
)
),
#Selectivity
shinyjs::hidden(wellPanel(id="panel_selectivity_sss",
# wellPanel(
h4(strong("Selectivity")),
h5("Enter parameter values for each fleet and survey."),
h5("Example using 50% selectivity with two fleets: Inputs could be 35,40 for starting values."),
p("If using a mix of logistic and dome-shaped selectivities, select", strong("dome-shaped"),"and use the default values (10000,0.0001,0.9999 for the additonal parameters, respectively) to achieve a logistic shape for any given fleet."),
br(),
fluidRow(selectInput("Sel_choice_sss","Length selectivity type",c("Logistic","Dome-shaped"))),
uiOutput("Sel_parms1_sss"),
uiOutput("Sel_parms2_sss"),
uiOutput("Sel_parms3_sss")
)
),
shinyjs::hidden(wellPanel(id="panel_selectivity",
# wellPanel(
h4(strong("Selectivity")),
h5("Enter parameter and phase values for each fleet and survey."),
h5("Example using 50% selectivity with two fleets: Inputs could be 35,40 and 2,2 for starting values and phases respectively."),
h5("The phase input indicates estimated parameters. To fix the parameter, set the phase value to a negative number."),
p("If using a mix of logistic and dome-shaped selectivities, select", strong("dome-shaped"),"and fix (i.e., use a negative phase) the provided default values (10000,0.0001,0.9999 for the additonal parameters, respectively) to achieve a logistic shape for any given fleet."),
br(),
fluidRow(selectInput("Sel_choice","Length selectivity type",c("Logistic","Dome-shaped"))),
# fluidRow(column(width=6,numericInput("Sel50", "Length at 50% Selectivity", value=NA,min=0, max=10000, step=0.01)),
# column(width=6,numericInput("Sel50_phase","Estimation phase", value=1,min=-1000, max=10, step=1))),
# fluidRow(column(width=6,numericInput("Selpeak", "Length at Peak Selectvity", value=NA,min=0, max=10000, step=0.01)),
# column(width=6,numericInput("Selpeak_phase","Estimation phase", value=1,min=-1000, max=10, step=1))),
#if(input$Sel_choice=="Logistic")
# {uiOutput("Sel_logistic")},
#if(input$Sel_choice=="Dome-shaped")
# {uiOutput("Sel_domed")}
uiOutput("Sel_parms1"),
uiOutput("Sel_parms2"),
uiOutput("Sel_parms3"),
uiOutput("Sel_parms4"),
uiOutput("Sel_parms5"),
fluidRow(checkboxInput("Sex_lt_sel","Sex-specific selectivity?",FALSE)),
fluidRow(checkboxInput("age_sel_choice","Age-based selectivity?",FALSE))
# ),
)
),
#Jitter inputs
# shinyjs::hidden(wellPanel(id="panel_SS_jitter1",
shinyjs::hidden(wellPanel(id="panel_SS_jitter",
fluidRow(column(width=10,checkboxInput("jitter_choice","Jitter starting values?",FALSE))),
uiOutput("Jitter_value"),
h5("Jittering refers to changing the input starting values."),
h5("Jittering provides a quick way to adjust starting values for two main purposes:"),
tags$ul(tags$li(h5(p("Start the model at different values to assist model convergence.")))),
tags$ul(tags$li(h5(p("Validate global versus local model convergence. This requires running many models at different jittered starting values to make sure a lower minimized likelihood value is not found. If a lower likelihood value is found, that would be considered the best fit model.")))),
h5("Run just 1 jitter value to find a converged model. Then run multiple jittered models to confrim that model is the best fit model."),
)
),
#Reference Points
shinyjs::hidden(wellPanel(id="panel_RPs",
fluidRow(column(width=10,checkboxInput("RP_choices","Define reference points?",FALSE))),
uiOutput("RP_selection1"),
uiOutput("RP_selection2")
)
),
#Forecast options
shinyjs::hidden(wellPanel(id="panel_Forecasts",
fluidRow(column(width=10,checkboxInput("Forecast_choice","Define forecasts?",FALSE))),
uiOutput("Forecasts")
)
),
shinyjs::hidden(wellPanel(id="panel_Mod_dims",
h4(strong("Model dimensions: years and ages")),
h5(p(em("Starting year values based on first year of data inputs"))),
# tags$ul(tags$li(h5(p(em("If catch data is used, starting and ending model years are based on the time series of catch"))))),
# tags$ul(tags$li(h5(p(em("If using only length or age data, starting model year is based on earliest year minus age at 95% Linf"))))),
# h5(p(em("Start year recommendations are:"))),
# tags$ul(tags$li(h5(p(em("If length data only, count the year back from the first year of length data based on maximum age likely contained in length data"))))),
# tags$ul(tags$li(h5(p(em("If using catch data, use the first year of catches"))))),
# h5(p(em(""))),
uiOutput("Model_dims1"),
# uiOutput("Model_dims2"),
)
),
shinyjs::hidden(wellPanel(id="panel_advanced_SS",
h4(strong("Additional SS options")),
#fluidRow(column(width=10,checkboxInput("advance_ss_click","Advanced SS options",FALSE))),
uiOutput("AdvancedSS_nohess"),
uiOutput("AdvancedSS_noplots"),
uiOutput("AdvancedSS_par"),
uiOutput("AdvancedSS_datanew"),
uiOutput("AdvancedSS_controlnew"),
uiOutput("AdvancedSS_forecastnew"),
uiOutput("AdvancedSS_phase0"),
uiOutput("AdvancedSS_Sex3"),
uiOutput("AdvancedSS_Indexvar"),
uiOutput("AdvancedSS_ageerror"),
uiOutput("AdvancedSS_ageerror_in"),
uiOutput("AdvancedSS_Ctunits"),
uiOutput("AdvancedSS_Ctunitsfleets"),
uiOutput("AdvancedSS_GT1"),
uiOutput("AdvancedSS_retro_choice"),
uiOutput("AdvancedSS_retro_years"),
h5(p("Define modelled length bins. Default values are by 2 cm bin ranging from 4 to 25% above the Linf value. If using conditional age at lengths, length bins must be consistent with these population bins, not the length data bins.")),
h5(p(em("Inputs must be smaller and larger than the length compositin bins. Input values will be overridden to meet this requirement"))),
uiOutput("AdvancedSS_Ltbin")
# prettyCheckbox(
# inputId = "no_hess", label = "Turn off Hessian",
# shape = "round", outline = TRUE, status = "info"),
# prettyCheckbox(
# inputId = "no_plots_tables", label = "Turn off plots and tables",
# shape = "round", outline = TRUE, status = "info"),
# prettyCheckbox(
# inputId = "GT1", label = "Use only one growth type",
# shape = "round", outline = TRUE, status = "info"),
# prettyCheckbox(
# inputId = "Sex3", label = "Retain sex ratio in length compositions (Sex = 3)",
# shape = "round", outline = TRUE, status = "info"),
)
),
shinyjs::hidden(wellPanel(id="panel_advanced_user_SS",
h4(strong("Additional SS options")),
#fluidRow(column(width=10,checkboxInput("advance_ss_click","Advanced SS options",FALSE))),
uiOutput("AdvancedSS_nohess_user"),
uiOutput("AdvancedSS_noplots_user"),
uiOutput("AdvancedSS_par_user"),
uiOutput("AdvancedSS_datanew_user"),
uiOutput("AdvancedSS_controlnew_user"),
uiOutput("AdvancedSS_forecastnew_user"),
uiOutput("AdvancedSS_phase0_user"),
uiOutput("AdvancedSS_retro_choice_user"),
uiOutput("AdvancedSS_retro_years_user")
)
),
shinyjs::hidden(wellPanel(id="panel_advanced_SSS",
h4(strong("Additional SS options")),
h5(strong("Choosing catch units")),
h6(strong("Default is biomass (in MT), but click below button to specify for each fleet.")),
#fluidRow(column(width=10,checkboxInput("advance_ss_click","Advanced SS options",FALSE))),
uiOutput("AdvancedSS_Ctunits_SSS"),
uiOutput("AdvancedSS_Ctunitsfleets_SSS"),
h5(strong("Add additional growth platoons?")),
uiOutput("AdvancedSS_GT5_SSS")
)
),
#SSS iterations
shinyjs::hidden(wellPanel(id="panel_SSS_reps",
h4(strong("SSS run specifications")),
fluidRow(column(width=10,numericInput("SSS_reps", "Number of SSS iterations", value=1000,min=1, max=1000000, step=1))),
fluidRow(column(width=10,numericInput("SSS_seed", "Seed number for draws", value=19,min=1, max=1000000, step=1)))
)
),
#wellPanel(
shinyjs::hidden(awesomeRadio(
inputId = "OS_choice",
label = "Which OS?",
choices = c("Windows","Mac","Linux"),
selected = "Windows",
inline=TRUE,
status = "warning")),
#),
shinyjs::hidden(wellPanel(id="Scenario_panel",
h4(strong("Scenario name")),
fluidRow(column(width=8,textInput("Scenario_name", strong("Choose the name of your scenario"), value="Scenario_1"))),
h5(p(em("Each scenario folder is saved. Changing the scenario name therefore creates a new folder of results."))),
h5(p(em("Using different scenario names when changing data or parameter values allows easy sensitivity exploration."))),
h5(p(strong("For Mac and Linux users, do not leave spaces in the Scenario name."))),
br(),
h4(strong("Select a folder to copy results")),
h5(p(em("Results are copied from the 'Scenarios' folder"))),
h5(p(em("Required to access results if using the online version"))),
shinyDirButton(
id="Modelout_dir",
label="Select model folder",
title="Choose folder to copy model scenario"
),
)
),
shinyjs::hidden(actionButton("run_SS",strong("Run Model"),
width="100%",
icon("circle-play"),
style="font-size:120%;border:2px solid;color:#FFFFFF;background:#658D1B")),
shinyjs::hidden(actionButton("run_SSS",strong("Run SSS"),
width="100%",
icon("circle-play"),
style="font-size:120%;border:2px solid;color:#FFFFFF; background:#236192")),
####################
### Other panels ###
####################
###########################
### Likelihood profiles ###
###########################
shinyjs::hidden(wellPanel(id="Profile_panel",
h4(strong("Run likelihood profiles")),
h5(em("Likelihood profiles are a powerful way to understand the information content of data and sensitivity of models to parameter uncertainty.")),
h5(em("A likelihood profile fixes a chosen parameter to a specified set of values in a reference model. The reference model will maintain estimation of any other parameters estimated in the reference model.")),
h5(em("For example, natural mortality (M) could be profiled over the value 0.1 to 0.3 at steps of 0.01. This creates 21 model runs that fix M to different values while keeping all other specifications the same as the reference model.")),
h5(em("For each model run, the likelihood value and derived outputs are retained for analysis.")),
h5(em("Any likelihood values >1.96 units from the minimum value are identify as models statistically less supported by the data. ")),
h5(em("Plots with the profiled parameter values compared to the likelihood values and derived model outputs indicate how much information is contained in the model for the parameter and how sensitive the model is to parameters values resulting non-statistically different models.")),
br(),
h5(strong("Choose folder of scenario to run profile")),
#shinyFilesButton("LikeProf_dir", "Select scenario", "Choose folder containing model scenarios", multiple = F),
shinyDirButton(
id="LP_dir",
label="Select scenario",
title="Choose folder containing model scenarios"
),
br(),
br(),
h4(("Individual likelihood profiles- each parameter run independently.")),
h5(em("If choosing multiple parameters to individually profile over, entries should be done in order of the parameters shown and separated by a comma (e.g., 0.1, 0.3).")),
h5(em("The range of values must also include the value of the model being used. If not, the profile will not run.")),
uiOutput("LikeProf_model_picks"),
# fluidRow(selectInput("Profile_choice_choice","Parameter to profile",c("Steepness","lnR0","Natural mortality","Linf","k"))),
fluidRow(column(width=4,textInput("Prof_Low_val", "Low value", value="")),
column(width=4,textInput("Prof_Hi_val", "High value", value="")),
column(width=4,textInput("Prof_step","Sequence step", value=""))),
#br(),
actionButton("run_Profiles",strong("Run Likelihood Profile"),
width="100%",
icon("circle-play"),
style="font-size:120%;border:2px solid;color:#FFFFFF; background:#236192"),
br(),
br(),
br(),
h4(("Another option is to run simultaneous likelihood profiles.")),
h5(em("For example, Linf and k are negatively correlated and should be changing together in a profile.")),
h5(em("Read in .csv file with vectors of values for each parameter.")),
h5(em("See the 'Multi_profile_headers.csv' file for parameter header names. Erase columns not used and fill in rows with values for each likelihood run.")),
# fluidRow(column(width=10,checkboxInput("multi_profile","Apply all vectors in one profile?",FALSE))),
uiOutput("Profile_multi_values"),
fluidRow(column(width=5,numericInput("TRP_multi_like", "Target reference point (max=1; 0= no plot)? ", value=0,min=0, max=1, step=0.001)),
column(width=5,numericInput("LRP_multi_like","Limit reference point (max=1; 0= no plot)?", value=0,min=0, max=1, step=0.001))),
fluidRow(column(width=10,checkboxInput("Hess_multi_like","Include uncertainty estimation?",TRUE))),
# fluidRow(column(width=4,numericInput("Prof_Low_val", "Low value", value=NA,min=0, max=10000, step=0.001)),
# column(width=4,numericInput("Prof_Hi_val", "High value", value=NA,min=0, max=10000, step=0.001)),
# column(width=4,numericInput("Prof_step","Sequence step", value=NA,min=0, max=10000, step=0.001))),
#fluidRow(column(width=8,textInput("Profile_plot_file", strong("Label plot file"), value="Profile X"))),
#h5(strong("Choose folder of scenario to run profile")),
#uiOutput("LikeProf_dir_out"),
actionButton("run_MultiProfiles",strong("Run Likelihood Multi-Profile"),
width="100%",
icon("circle-play"),
style="font-size:120%;border:2px solid;color:#FFFFFF; background:#236192"),
)),
###############################
######## Retrospectives #######
###############################
shinyjs::hidden(wellPanel(id="Retro_panel",
h4(strong("Retrospective comparisons and plots")),
h5(em("Retrospecitive modelling means sequentially removing one year of data up to a specified number of years (e.g., -10 years).")),
h5(em("To make these comparisons, choose first the directory containing models, then the models to compare.")),
h5(em("A time series plot of comparisons are shown in the main panel to the right for the follwing model outputs:")),
tags$ul(tags$li(h5(p(em("Spawning output"))))),
tags$ul(tags$li(h5(p(em("Relative spawning output"))))),
tags$ul(tags$li(h5(p(em("Recruitment"))))),
h5(em("A complete compliment of comparison plots (along with the plot on the right) are saved in the chosen folder labeled 'retro'")),
#h5(strong(em("Retrospective Comparison Plots"))),
br(),
h5(strong("Choose folder containing model for retrospective analysis")),
shinyDirButton(
id="Retro_dir",
label="Select folder",
title="Choose folder containing model scenarios"
),
br(),
br(),
#h4(strong("Comparison plot label")),
h5(strong("Define what years to perform retrospective analysis. Input as a negative integer (e.g., -1 mean remove one year of data)")),
fluidRow(column(width=5,numericInput("first_retro_year_in", "1st retrospective year", value=-1,min=-500, max=0, step=1)),
column(width=5,numericInput("final_retro_year_in","Final retrospective year", value=-10,min=-500, max=0, step=1))),
#fluidRow(column(width=8,textInput("Sensi_comp_file", strong("Label comparison plot file"), value="Comparison 1"))),
#br(),
#br(),
actionButton("run_Retro_comps",strong("Run Retrospective Comparisons"),
width="100%",
icon("circle-play"),
style="font-size:120%;border:2px solid;color:#FFFFFF; background:#236192"),
)),
###############################
### Sensitivity comparisons ###
###############################
shinyjs::hidden(wellPanel(id="Sensi_Comparison_panel",
h4(strong("Sensitivity comparison plots")),
h5(em("Comparing models offers insight into how changing data or model specification change model outputs.")),
h5(em("To make these comparisons, choose first the directory containing models, then the models to compare.")),
h5(em("A time series plot of comparisons are shown in the main panel to the right for the follwing model outputs:")),
tags$ul(tags$li(h5(p(em("Spawning output"))))),
tags$ul(tags$li(h5(p(em("Relative spawning output"))))),
tags$ul(tags$li(h5(p(em("Recruitment"))))),
h5(em("A complete compliment of comparison plots (along with the plot on the right) are saved in the chosen directory in a folder labeled")),
#h5(strong(em("Sensitivity Comparison Plots"))),
br(),
h5(strong("Choose folder containing model scenarios")),
shinyDirButton(
id="Sensi_dir",
label="Select directory",
title="Choose folder containing model scenarios"
),
br(),
br(),
#h4(strong("Comparison plot label")),
uiOutput("Sensi_model_Ref"),
uiOutput("Sensi_model_picks"),
#fluidRow(column(width=10,checkboxInput("Sensi_uncertainty_choice","Include uncertainty intervals in plots?",TRUE))),
h5(strong("Add reference points to spawning output plots. Blank input adds no line.")),
fluidRow(column(width=5,numericInput("Sensi_TRP", "Target", value=NA,min=0, max=1, step=0.001)),
column(width=5,numericInput("Sensi_LRP","Limit", value=NA,min=0, max=1, step=0.001))),
h5(strong("Sensitvitiy relative error plot features")),
h5(strong("Add sensitivity group headers, controlling number, position, and text")),
fluidRow(column(width=6,numericInput("SensiRE_ymin", "Minimum y-axis value", value=-1,min=-100, max=100, step=0.01)),
column(width=6,numericInput("SensiRE_ymax","Maximum y-axis value", value=1,min=-100, max=100, step=0.01 ))),
fluidRow(column(width=8,textInput("SensiRE_breaks", strong("Position of vertical breaks"), value="0"))),
fluidRow(column(width=8,textInput("SensiRE_headers", strong("Headers for relative error plots"), value=" "))),
fluidRow(column(width=6,textInput("SensiRE_xcenter", "Vertical (x) centering of headers", value=" ")),
column(width=6,textInput("SensiRE_ycenter","Horizontal (y) centering of headers", value=" "))),
fluidRow(column(width=8,textInput("Sensi_comp_file", strong("Comparison plot folder name"), value="Comparison 1"))),
#br(),
#br(),
actionButton("run_Sensi_comps",strong("Run Sensitivity Comparisons"),
width="100%",
icon("circle-play"),
style="font-size:120%;border:2px solid;color:#FFFFFF; background:#236192"),
)),
######################
### Ensemble panel ###
######################
shinyjs::hidden(wellPanel(id="Ensemble_panel",
h4(strong("Ensemble modelling")),
h5(em("Ensemble modelling allows the user to combine multiple models into one weighted distribution of outputs.")),
h5(em("User first chooses the models to combine, then how to combine them via model weights.")),
h5(em("For example, if 3 models are chosen, weights of 1,1,1 defines equal weights.")),
h5(em("If the middle model should have twice the weight of the others, 1,2,1 is the weighting input.")),
br(),
h5(strong("Choose folder containing models to combine")),
h5(em("")),
shinyDirButton(
id="Ensemble_dir",
label="Select directory",
title="Choose folder containing models to combine"
),
br(),
br(),
#h4(strong("Ensemble label")),
fluidRow(column(width=8,textInput("Ensemble_file", strong("Label ensemble model file"), value="Ensemble 1"))),
uiOutput("Ensemble_model_picks"),
fluidRow(column(width=10,textInput("Ensemble_wts","Relative scenario weights",value=""))),
actionButton("run_Ensemble",strong("Create Ensemble Model"),
width="100%",
icon("circle-play"),
style="font-size:120%;border:2px solid;color:#FFFFFF; background:#236192"),
)),
),
###########################################
###########################################
###########################################
mainPanel(
tabsetPanel(id="tabs",
# navbarPage(id="tabs",
tabPanel("Data and Parameters",
textOutput("catch_plots_label"),
uiOutput("Ctplot_it"),
textOutput("lt_comp_plots_label"),
uiOutput("Ltplot_it"),
textOutput("marginal_age_comp_plots_label"),
uiOutput("Ageplot_it_marginal"),
textOutput("conditional_age_comp_plots_label"),
uiOutput("Ageplot_it_cond"),
#plotOutput("Ageplot"),
textOutput("index_plots_label"),
uiOutput("Indexplot_it"),
h4("Life history"),
column(6,plotOutput("Mplot")),
column(6,plotOutput("VBGFplot")),
h6("."),
#uiOutput("AdvancedSS_nohess_user"),
uiOutput("Dep_plot_title"),
uiOutput("Dep_plot_it"),
#linebreaks(30),
h4("Selectivity"),
plotOutput("Selplot"),
plotOutput("Selplot_SSS"),
value=1),
tabPanel("SSS Model output",
h4("Full model output is contained in the SSS_out.DMP and SSSoutput.DMP files in the specific model scenario folder."),
h5("The SSS_out.DMP contains the prior and posterior values from the model, as well as the catch limits (Overfishing limint (OFL) and Allowable Biological Catch (ABC))."),
h5("The SSSoutput.DMP contains a list of the complete report files for each SSS run."),
br(),
h5(strong("Prior and Posterior input plots")),
plotOutput("SSS_priors_post"),
h5(strong("Prior and Posterior growth parameter plots")),
plotOutput("SSS_growth_priors_post"),
h5(strong("Catch limit plots")),
plotOutput("SSS_OFL_plot"),
plotOutput("SSS_ABC_plot"),
value=11),
tabPanel("SS Model output",
h4("Full model output is contained in the Report.sso file. The following reports are meant for quick examination."),