diff --git a/articles/getting_started.html b/articles/getting_started.html index 8cbdbe1..8bcd60d 100644 --- a/articles/getting_started.html +++ b/articles/getting_started.html @@ -148,18 +148,10 @@

Re-fitting growth curves at

It is common for growth curves to be very similar especially when the number of strata is large (>3), so user judgment is required to discern the best use of the information provided here.

- - - - - - - -

Run the function with the breakpoints as-is and inspect the outputs.

-# fits1 <- refit_Growth(simulated_data, breakpoints, showPlot = FALSE)
+fits1 <- refit_Growth(simulated_data, breakpoints, showPlot = FALSE)
 
 names(fits1$split_tables) ## description of the strata used
 #> [1] "lat_less_66_long_less_-141"    "lat_greater_66_long_less_-141"
@@ -199,9 +191,9 @@ 

Updating and re-fitting the bre replacing it with -Inf.

 breakpoints$long <- -Inf 
-# fits2 <- refit_Growth(simulated_data, 
-#                       breakpoints, 
-#                       showPlot = FALSE) ## refit the curves
+fits2 <- refit_Growth(simulated_data, + breakpoints, + showPlot = FALSE) ## refit the curves

We can repeat the visualization and see that 1) the key parameter values are now more distinct from one another and 2) so are the curves.

diff --git a/articles/getting_started_files/figure-html/unnamed-chunk-10-1.png b/articles/getting_started_files/figure-html/unnamed-chunk-10-1.png index 28f9bd1..b109517 100644 Binary files a/articles/getting_started_files/figure-html/unnamed-chunk-10-1.png and b/articles/getting_started_files/figure-html/unnamed-chunk-10-1.png differ diff --git a/articles/getting_started_files/figure-html/unnamed-chunk-9-1.png b/articles/getting_started_files/figure-html/unnamed-chunk-9-1.png index 2aca10f..06ee1af 100644 Binary files a/articles/getting_started_files/figure-html/unnamed-chunk-9-1.png and b/articles/getting_started_files/figure-html/unnamed-chunk-9-1.png differ diff --git a/pkgdown.yml b/pkgdown.yml index 7b8b352..400f3ed 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -3,7 +3,7 @@ pkgdown: 2.1.1 pkgdown_sha: ~ articles: getting_started: getting_started.html -last_built: 2024-12-16T19:27Z +last_built: 2024-12-17T22:01Z urls: reference: https://afsc-assessments.github.io/growthbreaks/reference article: https://afsc-assessments.github.io/growthbreaks/articles diff --git a/search.json b/search.json index fe2ca4b..1a4468a 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":"https://afsc-assessments.github.io/growthbreaks/articles/getting_started.html","id":"loading-viewing-your-data","dir":"Articles","previous_headings":"","what":"Loading & viewing your data","title":"Getting Started","text":"example shown include simulated spatial process giving rise heterogeneity fish length--age predominant north-south cline. first step ensure data formatted correctly aware sample size issues. accomplished via check_data(), returns plots observations residuals. first plot (p[[1]]) shows input data, colored year: second two plots p[[2]];p[[3]] maps observations simple residuals (observation minus age-specific mean). red colors highest values. ’d expect look similar one another. ’ve completed step ready investigate potential breakpoints length--age via get_Breaks(). example use default option axes = 0 looks spatial breakpoints . function ignorant underlying structure data fitting growth curves time. keep default settings get back plots hypothesized breaks well dataframe breakpoints.","code":"library(growthbreaks) data(simulated_data) ## from the package head(simulated_data) #> year age length lat long #> 2 1 1 5.174880 56.97959 -156.2602 #> 3 1 1 6.532786 57.34694 -142.2419 #> 5 1 2 9.067383 56.61224 -151.8233 #> 7 1 2 13.178737 67.63265 -169.8984 #> 8 1 2 16.415712 55.14286 -169.2174 #> 9 1 2 19.372655 51.46939 -148.3869 p <- check_data(simulated_data, showPlot = FALSE)"},{"path":"https://afsc-assessments.github.io/growthbreaks/articles/getting_started.html","id":"detecting-breakpoints","dir":"Articles","previous_headings":"","what":"Detecting Breakpoints","title":"Getting Started","text":"Now can pass data get_Breaks(). ages_to_use argument allows specify subset age observations ’d like test breakpoints. unsure, may choose use age(s) well sampled data, ages. However, want include least observations small (young) fish, since discrepancies size may less obvious fish near asymptotic length. testing three ages saving output dataframe called breakpoints. might expected based raw observations, algorithm detected break 66∘66^{\\circ}N, well unexpected one 141∘~141^{\\circ}W. can see map well dataframe. count column indicates proportion tested ages breakpoint detected (case, 1/3, suggesting breakpoints detected 2/3 ages). may choose stop . ’re interested automated checking curve fitting functionality, proceed next step.","code":"breakpoints <- get_Breaks(dat = simulated_data, ages_to_use = c(5,10,15), sex = FALSE, axes = 0, showPlot = TRUE) breakpoints #> lat long detected_break count #> 87 65.63636 -141.4534 TRUE 0.3333333"},{"path":"https://afsc-assessments.github.io/growthbreaks/articles/getting_started.html","id":"re-fitting-growth-curves-at-putative-breaks","dir":"Articles","previous_headings":"","what":"Re-fitting growth curves at putative breaks","title":"Getting Started","text":"function refit_Growth() can used generate plots growth parameters associated curves splitting data spatio/temporal zones (“strata”) defined breakpoints. can allow make inferences ) magnitude significance differences individual parameters b) resultant impact perception length--age. common growth curves similar especially number strata large (>3), user judgment required discern best use information provided . Run function breakpoints -inspect outputs. can inspect fitted curves two ways: first, visualizing $par_plot. red points & error bars indicate estimates mean fell outside confidence interval(s) strata. can used infer components growth curve possibly contributing detected differences among strata. doesn’t look like second strata’s L∞L_{\\infty} kk values different regions’. second way explore results visualizing fitted curves strata-specific observations contained $fits_plot. see second third strata (data points 66∘66^{\\circ})N exhhibit similar curves, many data points second strata begin .","code":"# fits1 <- refit_Growth(simulated_data, breakpoints, showPlot = FALSE) names(fits1$split_tables) ## description of the strata used #> [1] \"lat_less_66_long_less_-141\" \"lat_greater_66_long_less_-141\" #> [3] \"lat_less_66_long_greater_-141\" ## split_tables contains your observed data broken up by strata fits1$pars_plot fits1$fits_plot"},{"path":"https://afsc-assessments.github.io/growthbreaks/articles/getting_started.html","id":"updating-and-re-fitting-the-breakpoints","dir":"Articles","previous_headings":"","what":"Updating and re-fitting the breakpoints","title":"Getting Started","text":"Based exploration , may decide manually combine second third strata, using just single breakpoint north south. case, away breakpoint −141∘-141^{\\circ})W, replacing -Inf. can repeat visualization see 1) key parameter values now distinct one another 2) curves.","code":"breakpoints$long <- -Inf # fits2 <- refit_Growth(simulated_data, # breakpoints, # showPlot = FALSE) ## refit the curves fits2$pars_plot fits2$fits_plot"},{"path":"https://afsc-assessments.github.io/growthbreaks/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Maia S. Kapur. Maintainer.","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Kapur MS (2024). growthbreaks: Spatio-temporal Growth Anomaly Detection. R package version 0.1.0, https://afsc-assessments.github.io/growthbreaks/.","code":"@Manual{, title = {growthbreaks: Spatio-temporal Growth Anomaly Detection}, author = {Maia S. Kapur}, year = {2024}, note = {R package version 0.1.0}, url = {https://afsc-assessments.github.io/growthbreaks/}, }"},{"path":"https://afsc-assessments.github.io/growthbreaks/index.html","id":"growthbreaks","dir":"","previous_headings":"","what":"Spatio-temporal Growth Anomaly Detection","title":"Spatio-temporal Growth Anomaly Detection","text":"package designed implement GAM-based breakpoint detection method developed tested Kapur et al. (2020).","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Spatio-temporal Growth Anomaly Detection","text":"remotes::install_github('afsc-assessments/growthbreaks')","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/index.html","id":"vignettes","dir":"","previous_headings":"","what":"Vignettes","title":"Spatio-temporal Growth Anomaly Detection","text":"Check vignettes via vignette('growthbreaks') read Articles available https://afsc-assessments.github.io/growthbreaks/.","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/Deriv.html","id":null,"dir":"Reference","previous_headings":"","what":"Evaluate first derivative of GAM smooth(s), adapted from Gavin Simpson. — Deriv","title":"Evaluate first derivative of GAM smooth(s), adapted from Gavin Simpson. — Deriv","text":"Evaluate first derivative GAM smooth(s), adapted Gavin Simpson.","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/Deriv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Evaluate first derivative of GAM smooth(s), adapted from Gavin Simpson. — Deriv","text":"","code":"Deriv(mod, n = 200, eps = 1e-04, newdata, term)"},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/Deriv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Evaluate first derivative of GAM smooth(s), adapted from Gavin Simpson. — Deriv","text":"mod output mgcv::gam() n number intervals evaluate smooth. default 200. eps tolerance threshold. default 1e-4. newdata optional; data.frame new smooth parameters evaluate term string smooth name, .e. \"year\". must match values mod newdata","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/Deriv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Evaluate first derivative of GAM smooth(s), adapted from Gavin Simpson. — Deriv","text":"vector derivative values length n","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/check_Deriv.html","id":null,"dir":"Reference","previous_headings":"","what":"Check whether the CI of the derivative includes zero or not — check_Deriv","title":"Check whether the CI of the derivative includes zero or not — check_Deriv","text":"Check whether CI derivative includes zero ","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/check_Deriv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check whether the CI of the derivative includes zero or not — check_Deriv","text":"","code":"check_Deriv(x, d, upper, lower, eval = 0, crit.eval)"},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/check_Deriv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check whether the CI of the derivative includes zero or not — check_Deriv","text":"x vector values derivatives evaluated d vector output Deriv() upper upper confidence interval; output confint_Deriv() lower lower confidence interval; output confint_Deriv() eval value like examine. default 0","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/check_Deriv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check whether the CI of the derivative includes zero or not — check_Deriv","text":"vector confidence intervals length object.","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/check_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Load, check and plot input data for use in breakpoint detection — check_data","title":"Load, check and plot input data for use in breakpoint detection — check_data","text":"Load, check plot input data use breakpoint detection","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/check_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load, check and plot input data for use in breakpoint detection — check_data","text":"","code":"check_data(dat, sex = FALSE, showPlot = TRUE)"},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/check_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load, check and plot input data for use in breakpoint detection — check_data","text":"dat data.frame columns year, age, length, sex (optional) sex logical. data frame include sex column? showPlot logical. want visualize input data?","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/check_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Load, check and plot input data for use in breakpoint detection — check_data","text":"plots","code":""},{"path":[]},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/confint_Deriv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate confidence interval of derivative, adapted from Gavin Simpson. — confint_Deriv","text":"","code":"confint_Deriv(object, term, alpha = 0.05, ...)"},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/confint_Deriv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate confidence interval of derivative, adapted from Gavin Simpson. — confint_Deriv","text":"object vector output Deriv() term string smooth name, .e. \"year\". must match values mod newdata alpha confidence threshold. default 0.05 (95 vector confidence intervals length object. Calculate confidence interval derivative, adapted Gavin Simpson.","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/get_Breaks.html","id":null,"dir":"Reference","previous_headings":"","what":"Wrapper function to to fit gams & evaluate first derivatives — get_Breaks","title":"Wrapper function to to fit gams & evaluate first derivatives — get_Breaks","text":"Wrapper function fit gams & evaluate first derivatives","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/get_Breaks.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Wrapper function to to fit gams & evaluate first derivatives — get_Breaks","text":"","code":"get_Breaks(dat, ages_to_use = c(5, 10), sex = FALSE, axes = 0, showPlot = TRUE)"},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/get_Breaks.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Wrapper function to to fit gams & evaluate first derivatives — get_Breaks","text":"dat data.frame columns year, age, length, lat, long, sex (optional) ages_to_use optional. vector age(s) evaluate breakpoints. sex logical. axes want evaluate axes space (0, default), time (1), simultaneously (2)? showPlot logical. want see detected break(s) map? Applicable axes options 0 2.","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/get_Breaks.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Wrapper function to to fit gams & evaluate first derivatives — get_Breaks","text":"matrix detected breakpoints plots","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/hello.html","id":null,"dir":"Reference","previous_headings":"","what":"Hello, World! — hello","title":"Hello, World! — hello","text":"Prints 'Hello, world!'.","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/hello.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Hello, World! — hello","text":"","code":"hello()"},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/hello.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Hello, World! — hello","text":"","code":"hello() #> Error in hello(): could not find function \"hello\""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/refit_Growth.html","id":null,"dir":"Reference","previous_headings":"","what":"Re-fit growth data at putative breaks and return estimates for validation — refit_Growth","title":"Re-fit growth data at putative breaks and return estimates for validation — refit_Growth","text":"Re-fit growth data putative breaks return estimates validation","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/refit_Growth.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Re-fit growth data at putative breaks and return estimates for validation — refit_Growth","text":"","code":"refit_Growth(dat = simulated_data, breakpoints, selex = FALSE, showPlot = TRUE)"},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/refit_Growth.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Re-fit growth data at putative breaks and return estimates for validation — refit_Growth","text":"dat data.frame columns year, age, length, lat, long, sex (optional) breakpoints data.frame columns year /lat long. can output get_Breaks(). showPlot logical. want see plots fitted curves?","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/refit_Growth.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Re-fit growth data at putative breaks and return estimates for validation — refit_Growth","text":"Von B growth parameters input breakpoints; plots uncertainty growth curves: $split_tables list tables input data split strata specified breakpoints $fits_df input data, estimates associated standard errors single dataframe $pars_df Parameter estimates associated standard errors $fits_plot input observations fitted growth curves, strata $pars_plot Parameter estimates associated standard errors; red lines indicate statistically significant differences","code":""}] +[{"path":"https://afsc-assessments.github.io/growthbreaks/articles/getting_started.html","id":"loading-viewing-your-data","dir":"Articles","previous_headings":"","what":"Loading & viewing your data","title":"Getting Started","text":"example shown include simulated spatial process giving rise heterogeneity fish length--age predominant north-south cline. first step ensure data formatted correctly aware sample size issues. accomplished via check_data(), returns plots observations residuals. first plot (p[[1]]) shows input data, colored year: second two plots p[[2]];p[[3]] maps observations simple residuals (observation minus age-specific mean). red colors highest values. ’d expect look similar one another. ’ve completed step ready investigate potential breakpoints length--age via get_Breaks(). example use default option axes = 0 looks spatial breakpoints . function ignorant underlying structure data fitting growth curves time. keep default settings get back plots hypothesized breaks well dataframe breakpoints.","code":"library(growthbreaks) data(simulated_data) ## from the package head(simulated_data) #> year age length lat long #> 2 1 1 5.174880 56.97959 -156.2602 #> 3 1 1 6.532786 57.34694 -142.2419 #> 5 1 2 9.067383 56.61224 -151.8233 #> 7 1 2 13.178737 67.63265 -169.8984 #> 8 1 2 16.415712 55.14286 -169.2174 #> 9 1 2 19.372655 51.46939 -148.3869 p <- check_data(simulated_data, showPlot = FALSE)"},{"path":"https://afsc-assessments.github.io/growthbreaks/articles/getting_started.html","id":"detecting-breakpoints","dir":"Articles","previous_headings":"","what":"Detecting Breakpoints","title":"Getting Started","text":"Now can pass data get_Breaks(). ages_to_use argument allows specify subset age observations ’d like test breakpoints. unsure, may choose use age(s) well sampled data, ages. However, want include least observations small (young) fish, since discrepancies size may less obvious fish near asymptotic length. testing three ages saving output dataframe called breakpoints. might expected based raw observations, algorithm detected break 66∘66^{\\circ}N, well unexpected one 141∘~141^{\\circ}W. can see map well dataframe. count column indicates proportion tested ages breakpoint detected (case, 1/3, suggesting breakpoints detected 2/3 ages). may choose stop . ’re interested automated checking curve fitting functionality, proceed next step.","code":"breakpoints <- get_Breaks(dat = simulated_data, ages_to_use = c(5,10,15), sex = FALSE, axes = 0, showPlot = TRUE) breakpoints #> lat long detected_break count #> 87 65.63636 -141.4534 TRUE 0.3333333"},{"path":"https://afsc-assessments.github.io/growthbreaks/articles/getting_started.html","id":"re-fitting-growth-curves-at-putative-breaks","dir":"Articles","previous_headings":"","what":"Re-fitting growth curves at putative breaks","title":"Getting Started","text":"function refit_Growth() can used generate plots growth parameters associated curves splitting data spatio/temporal zones (“strata”) defined breakpoints. can allow make inferences ) magnitude significance differences individual parameters b) resultant impact perception length--age. common growth curves similar especially number strata large (>3), user judgment required discern best use information provided . Run function breakpoints -inspect outputs. can inspect fitted curves two ways: first, visualizing $par_plot. red points & error bars indicate estimates mean fell outside confidence interval(s) strata. can used infer components growth curve possibly contributing detected differences among strata. doesn’t look like second strata’s L∞L_{\\infty} kk values different regions’. second way explore results visualizing fitted curves strata-specific observations contained $fits_plot. see second third strata (data points 66∘66^{\\circ})N exhhibit similar curves, many data points second strata begin .","code":"fits1 <- refit_Growth(simulated_data, breakpoints, showPlot = FALSE) names(fits1$split_tables) ## description of the strata used #> [1] \"lat_less_66_long_less_-141\" \"lat_greater_66_long_less_-141\" #> [3] \"lat_less_66_long_greater_-141\" ## split_tables contains your observed data broken up by strata fits1$pars_plot fits1$fits_plot"},{"path":"https://afsc-assessments.github.io/growthbreaks/articles/getting_started.html","id":"updating-and-re-fitting-the-breakpoints","dir":"Articles","previous_headings":"","what":"Updating and re-fitting the breakpoints","title":"Getting Started","text":"Based exploration , may decide manually combine second third strata, using just single breakpoint north south. case, away breakpoint −141∘-141^{\\circ})W, replacing -Inf. can repeat visualization see 1) key parameter values now distinct one another 2) curves.","code":"breakpoints$long <- -Inf fits2 <- refit_Growth(simulated_data, breakpoints, showPlot = FALSE) ## refit the curves fits2$pars_plot fits2$fits_plot"},{"path":"https://afsc-assessments.github.io/growthbreaks/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Maia S. Kapur. Maintainer.","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Kapur MS (2024). growthbreaks: Spatio-temporal Growth Anomaly Detection. R package version 0.1.0, https://afsc-assessments.github.io/growthbreaks/.","code":"@Manual{, title = {growthbreaks: Spatio-temporal Growth Anomaly Detection}, author = {Maia S. Kapur}, year = {2024}, note = {R package version 0.1.0}, url = {https://afsc-assessments.github.io/growthbreaks/}, }"},{"path":"https://afsc-assessments.github.io/growthbreaks/index.html","id":"growthbreaks","dir":"","previous_headings":"","what":"Spatio-temporal Growth Anomaly Detection","title":"Spatio-temporal Growth Anomaly Detection","text":"package designed implement GAM-based breakpoint detection method developed tested Kapur et al. (2020).","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Spatio-temporal Growth Anomaly Detection","text":"remotes::install_github('afsc-assessments/growthbreaks')","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/index.html","id":"vignettes","dir":"","previous_headings":"","what":"Vignettes","title":"Spatio-temporal Growth Anomaly Detection","text":"Check vignettes via vignette('growthbreaks') read Articles available https://afsc-assessments.github.io/growthbreaks/.","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/Deriv.html","id":null,"dir":"Reference","previous_headings":"","what":"Evaluate first derivative of GAM smooth(s), adapted from Gavin Simpson. — Deriv","title":"Evaluate first derivative of GAM smooth(s), adapted from Gavin Simpson. — Deriv","text":"Evaluate first derivative GAM smooth(s), adapted Gavin Simpson.","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/Deriv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Evaluate first derivative of GAM smooth(s), adapted from Gavin Simpson. — Deriv","text":"","code":"Deriv(mod, n = 200, eps = 1e-04, newdata, term)"},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/Deriv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Evaluate first derivative of GAM smooth(s), adapted from Gavin Simpson. — Deriv","text":"mod output mgcv::gam() n number intervals evaluate smooth. default 200. eps tolerance threshold. default 1e-4. newdata optional; data.frame new smooth parameters evaluate term string smooth name, .e. \"year\". must match values mod newdata","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/Deriv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Evaluate first derivative of GAM smooth(s), adapted from Gavin Simpson. — Deriv","text":"vector derivative values length n","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/check_Deriv.html","id":null,"dir":"Reference","previous_headings":"","what":"Check whether the CI of the derivative includes zero or not — check_Deriv","title":"Check whether the CI of the derivative includes zero or not — check_Deriv","text":"Check whether CI derivative includes zero ","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/check_Deriv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check whether the CI of the derivative includes zero or not — check_Deriv","text":"","code":"check_Deriv(x, d, upper, lower, eval = 0, crit.eval)"},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/check_Deriv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check whether the CI of the derivative includes zero or not — check_Deriv","text":"x vector values derivatives evaluated d vector output Deriv() upper upper confidence interval; output confint_Deriv() lower lower confidence interval; output confint_Deriv() eval value like examine. default 0","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/check_Deriv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check whether the CI of the derivative includes zero or not — check_Deriv","text":"vector confidence intervals length object.","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/check_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Load, check and plot input data for use in breakpoint detection — check_data","title":"Load, check and plot input data for use in breakpoint detection — check_data","text":"Load, check plot input data use breakpoint detection","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/check_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load, check and plot input data for use in breakpoint detection — check_data","text":"","code":"check_data(dat, sex = FALSE, showPlot = TRUE)"},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/check_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load, check and plot input data for use in breakpoint detection — check_data","text":"dat data.frame columns year, age, length, sex (optional) sex logical. data frame include sex column? showPlot logical. want visualize input data?","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/check_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Load, check and plot input data for use in breakpoint detection — check_data","text":"plots","code":""},{"path":[]},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/confint_Deriv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate confidence interval of derivative, adapted from Gavin Simpson. — confint_Deriv","text":"","code":"confint_Deriv(object, term, alpha = 0.05, ...)"},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/confint_Deriv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate confidence interval of derivative, adapted from Gavin Simpson. — confint_Deriv","text":"object vector output Deriv() term string smooth name, .e. \"year\". must match values mod newdata alpha confidence threshold. default 0.05 (95 vector confidence intervals length object. Calculate confidence interval derivative, adapted Gavin Simpson.","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/get_Breaks.html","id":null,"dir":"Reference","previous_headings":"","what":"Wrapper function to to fit gams & evaluate first derivatives — get_Breaks","title":"Wrapper function to to fit gams & evaluate first derivatives — get_Breaks","text":"Wrapper function fit gams & evaluate first derivatives","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/get_Breaks.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Wrapper function to to fit gams & evaluate first derivatives — get_Breaks","text":"","code":"get_Breaks(dat, ages_to_use = c(5, 10), sex = FALSE, axes = 0, showPlot = TRUE)"},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/get_Breaks.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Wrapper function to to fit gams & evaluate first derivatives — get_Breaks","text":"dat data.frame columns year, age, length, lat, long, sex (optional) ages_to_use optional. vector age(s) evaluate breakpoints. sex logical. axes want evaluate axes space (0, default), time (1), simultaneously (2)? showPlot logical. want see detected break(s) map? Applicable axes options 0 2.","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/get_Breaks.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Wrapper function to to fit gams & evaluate first derivatives — get_Breaks","text":"matrix detected breakpoints plots","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/hello.html","id":null,"dir":"Reference","previous_headings":"","what":"Hello, World! — hello","title":"Hello, World! — hello","text":"Prints 'Hello, world!'.","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/hello.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Hello, World! — hello","text":"","code":"hello()"},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/hello.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Hello, World! — hello","text":"","code":"hello() #> Error in hello(): could not find function \"hello\""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/refit_Growth.html","id":null,"dir":"Reference","previous_headings":"","what":"Re-fit growth data at putative breaks and return estimates for validation — refit_Growth","title":"Re-fit growth data at putative breaks and return estimates for validation — refit_Growth","text":"Re-fit growth data putative breaks return estimates validation","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/refit_Growth.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Re-fit growth data at putative breaks and return estimates for validation — refit_Growth","text":"","code":"refit_Growth(dat = simulated_data, breakpoints, selex = FALSE, showPlot = TRUE)"},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/refit_Growth.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Re-fit growth data at putative breaks and return estimates for validation — refit_Growth","text":"dat data.frame columns year, age, length, lat, long, sex (optional) breakpoints data.frame columns year /lat long. can output get_Breaks(). showPlot logical. want see plots fitted curves?","code":""},{"path":"https://afsc-assessments.github.io/growthbreaks/reference/refit_Growth.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Re-fit growth data at putative breaks and return estimates for validation — refit_Growth","text":"Von B growth parameters input breakpoints; plots uncertainty growth curves: $split_tables list tables input data split strata specified breakpoints $fits_df input data, estimates associated standard errors single dataframe $pars_df Parameter estimates associated standard errors $fits_plot input observations fitted growth curves, strata $pars_plot Parameter estimates associated standard errors; red lines indicate statistically significant differences","code":""}]