-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
79,443 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
74,460 changes: 74,460 additions & 0 deletions
74,460
2024_ASSESSMENT/AGING_ERROR_BIAS/PCod all ages 2000 to 2023 Barbeaux AGE3.csv
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
|
||
|
||
## splined aging error | ||
data<-AgeingError:::CreateData("dataBoth10.dat", NDataSet = 1, verbose = TRUE, EchoFile = "data_echo.out") | ||
PCOD_spline <- AgeingError:::CreateSpecs("spline5.spc", DataSpecs = data,verbose = TRUE) | ||
|
||
PCOD_spline <- AgeingError::DoApplyAgeError( | ||
Species = "Pcod", | ||
DataSpecs = data, | ||
ModelSpecsInp = PCOD_spline, | ||
AprobWght = 1e-06, | ||
SlopeWght = 0.01, | ||
SaveDir = "Results_spline", | ||
verbose = TRUE | ||
) | ||
|
||
|
||
PCOD_spline_out <- AgeingError:::ProcessResults(Species = "Pcod", SaveDir = "Results_spline", CalcEff = TRUE, verbose = FALSE) | ||
|
||
## linear aging error | ||
data<-AgeingError:::CreateData("dataBoth10.dat", NDataSet = 1, verbose = TRUE, EchoFile = "data_echo.out") | ||
PCOD_linear <- AgeingError:::CreateSpecs("linear.spc", DataSpecs = data,verbose = TRUE) | ||
|
||
PCOD_linear <- AgeingError::DoApplyAgeError( | ||
Species = "Pcod", | ||
DataSpecs = data, | ||
ModelSpecsInp = PCOD_linear, | ||
AprobWght = 1e-06, | ||
SlopeWght = 0.01, | ||
SaveDir = "Results_linear", | ||
verbose = TRUE | ||
) | ||
|
||
|
||
PCOD_linear_out <- AgeingError:::ProcessResults(Species = "Pcod", SaveDir = "Results_linear", CalcEff = TRUE, verbose = FALSE) | ||
|
||
|
||
## splined aging error w/bias | ||
data<-AgeingError:::CreateData("dataREREADS.dat", NDataSet = 1, verbose = TRUE, EchoFile = "data_echo.out") | ||
PCOD_spline_bias <- AgeingError:::CreateSpecs("spline5_bias.spc", DataSpecs = data,verbose = TRUE) | ||
|
||
PCOD_spline <- AgeingError::DoApplyAgeError( | ||
Species = "Pcod", | ||
DataSpecs = data, | ||
ModelSpecsInp = PCOD_spline_bias, | ||
AprobWght = 1e-06, | ||
SlopeWght = 0.01, | ||
SaveDir = "Results_spline_bias", | ||
verbose = TRUE | ||
) | ||
|
||
|
||
PCOD_spline_bias_out <- AgeingError:::ProcessResults(Species = "Pcod", SaveDir = "Results_spline_bias", CalcEff = TRUE, verbose = FALSE) | ||
|
||
|
||
|
||
|
||
|
||
|
||
## splined aging error w/bias | ||
data<-AgeingError:::CreateData("dataREREADS.dat", NDataSet = 1, verbose = TRUE, EchoFile = "data_echo.out") | ||
PCOD_linear_bias <- AgeingError:::CreateSpecs("linear_bias.spc", DataSpecs = data,verbose = TRUE) | ||
|
||
PCOD_spline <- AgeingError::DoApplyAgeError( | ||
Species = "Pcod", | ||
DataSpecs = data, | ||
ModelSpecsInp = PCOD_linear_bias, | ||
AprobWght = 1e-06, | ||
SlopeWght = 0.01, | ||
SaveDir = "Results_linear_bias", | ||
verbose = TRUE | ||
) | ||
|
||
|
||
PCOD_linear_bias_out <- AgeingError:::ProcessResults(Species = "Pcod", SaveDir = "Results_linear_bias", CalcEff = TRUE, verbose = FALSE) | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
age_dat<-data.table(read.csv('paired_age_readings.csv')) | ||
x=ageing_comparison(xvec=age_dat$read_age, yvec=age_dat$test_age, scale.pts = 0.75, | ||
col.pts = grDevices::heat.colors(100, alpha = .4), | ||
col.hist = grDevices::rgb(0, 0, .5, alpha = .7), | ||
counts = TRUE, maxage = 14, | ||
hist = F, hist.frac = .1, | ||
xlab = "Age reader 1", | ||
ylab = "Age reader 2", | ||
title = NULL, | ||
png = FALSE, | ||
filename = "ageing_comparison.png", | ||
SaveFile = NULL, | ||
verbose = TRUE) | ||
|
||
|
||
x=ageing_comparison(xvec=f3$Second_Age, yvec=f3$Final_Age, scale.pts = 0.75, | ||
col.pts = grDevices::heat.colors(100, alpha = .4), | ||
col.hist = grDevices::rgb(0, 0, .5, alpha = .7), | ||
counts = TRUE, maxage = 14, | ||
hist = F, hist.frac = .1, | ||
xlab = "2018 Read", | ||
ylab = "2004 Read", | ||
title = NULL, | ||
png = FALSE, | ||
filename = "ageing_comparison.png", | ||
SaveFile = NULL, | ||
verbose = TRUE) |
4,772 changes: 4,772 additions & 0 deletions
4,772
2024_ASSESSMENT/AGING_ERROR_BIAS/Stark_rereads.csv
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
|
||
|
||
data2<-AgeingError:::CreateData("dataBSAll.dat", NDataSet = 1, verbose = TRUE, EchoFile = "dataAll_echo.out") | ||
|
||
PCOD2_spc <- AgeingError:::CreateSpecs("control3.spc", DataSpecs = data2,verbose = TRUE) | ||
|
||
|
||
PCOD2_mod <- AgeingError::DoApplyAgeError( | ||
Species = "Pcod", | ||
DataSpecs = data2, | ||
ModelSpecsInp = PCOD2_spc, | ||
AprobWght = 1e-06, | ||
SlopeWght = 0.01, | ||
SaveDir = "ResultsBS10_Spline", | ||
verbose = TRUE | ||
) | ||
|
||
|
||
|
||
PCOD2_out <- AgeingError:::ProcessResults(Species = "Pcod", SaveDir = "ResultsBS10_Spline", CalcEff = TRUE, verbose = FALSE) | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
data1<-AgeingError:::CreateData("dataBoth10.dat", NDataSet = 1, verbose = TRUE, EchoFile = "data1_echo.out") | ||
|
||
PCOD1_spc <- AgeingError:::CreateSpecs("control3.spc", DataSpecs = data1,verbose = TRUE) | ||
|
||
|
||
PCOD1_mod <- AgeingError::DoApplyAgeError( | ||
Species = "Pcod", | ||
DataSpecs = data1, | ||
ModelSpecsInp = PCOD1_spc, | ||
AprobWght = 1e-06, | ||
SlopeWght = 0.01, | ||
SaveDir = "ResultsBoth_Linear", | ||
verbose = TRUE | ||
) | ||
|
||
|
||
|
||
PCOD1_out <- AgeingError:::ProcessResults(Species = "Pcod", SaveDir = "ResultsBoth_Linear", CalcEff = TRUE, verbose = FALSE) | ||
|
||
|
||
## 2000-2007 data aging error | ||
|
||
|
||
data2000<-AgeingError:::CreateData("data2000.dat", NDataSet = 1, verbose = TRUE, EchoFile = "data2000_echo.out") | ||
|
||
PCOD2000_spc <- AgeingError:::CreateSpecs("control2.spc", DataSpecs = data2000,verbose = TRUE) | ||
|
||
|
||
PCOD2000_mod <- AgeingError::DoApplyAgeError( | ||
Species = "Pcod", | ||
DataSpecs = data2000, | ||
ModelSpecsInp = PCOD2000_spc, | ||
AprobWght = 1e-06, | ||
SlopeWght = 0.01, | ||
SaveDir = "Results2000", | ||
verbose = TRUE | ||
) | ||
|
||
|
||
PCOD2000_out <- AgeingError:::ProcessResults(Species = "Pcod", SaveDir = "Results2000", CalcEff = TRUE, verbose = FALSE) | ||
|
||
|
||
|
||
## 2007-2023 data aging error | ||
|
||
|
||
data2007<-AgeingError:::CreateData("data2007.dat", NDataSet = 1, verbose = TRUE, EchoFile = "data2007_echo.out") | ||
|
||
PCOD2007_spc <- AgeingError:::CreateSpecs("control2.spc", DataSpecs = data2007,verbose = TRUE) | ||
|
||
|
||
PCOD2007_mod <- AgeingError::DoApplyAgeError( | ||
Species = "Pcod", | ||
DataSpecs = data2007, | ||
ModelSpecsInp = PCOD2007_spc, | ||
AprobWght = 1e-06, | ||
SlopeWght = 0.01, | ||
SaveDir = "Results2007", | ||
verbose = TRUE | ||
) | ||
|
||
|
||
PCOD2007_out <- AgeingError:::ProcessResults(Species = "Pcod", SaveDir = "Results2007", CalcEff = TRUE, verbose = FALSE) | ||
|
||
|