bootSummary.fn | R Documentation |
Output from the function _________________________ Two pieces are output 1. a dataframe that summarizes the discard, retained, and ratio statistics a) column names with the prefix 'obs.' are observed values b) column names with the prefix 'mn.' are means of the bootstrapped values c) column names with the prefix 'md.' are medians of the bootstrapped values d) column names with the prefix 'sd.' are standard deviations of the bootstrapped values e) column names with the prefix 'cv.' are coefficients of variation (mean/sd) of the bootstrapped values f) boot.sample = B = the number of bootstrap iterations 2. a postscript of the bootstrapped values by year and strata, which can be converted to pdf red vert. line = observed ratio green vert. line = mean ratio blue vert. line = median ratio
bootSummary.fn(dat, B = NULL, fname = NULL, strtNms = NULL)
dat |
the dataframe of observations |
fname |
the file name where the postscript file is to be saved |
strtNms |
the strata names |
the |
number of bootstrap iterations used in the function. This argument is used to give the appropriate output. If set B=0, then the output is simply the observed ratios by strata in dataframe format. If B = anything else (including NULL = default), then the output is a dataframe & a postscript file of plots of the actual distribution of the bootstrapped values. |
Example Syntax ______________ This would just give you the observed discard, retained, and ratio without any summary of the bootstraps. Boot.sumry.fxn(outB.pet,B=0,fname=paste(drive2,"Petrale_Boot_History_19Mar2013",sep=”),strtNms=list("Gears","States","Seasons"))
This would give you a summary dataframe and a ps file of plots (any value other than B=0, including B=NULL=default) Boot.sumry.fxn(outB.pet,B=10000,fname=paste(drive2,"Petrale_Boot_History_19Mar2013",sep=”),strtNms=list("Gears","States","Seasons"))
IMPORTANT NOTES _______________ 1. Be sure to turn the postscript device off after running the function (i.e., 'dev.off()' ) 2. The x-axis label is currently hard-coded to 'standard discard ratio (dis/dis+ret)'. If you bootstrap a different discard ratio (e.g., dis/ret), this label is mis-leading. It will still plot correctly, however, the x-axis label will be incorrect. ——————————————————————————- Date Author Modifications ——————————————————————————- 19 Mar 2013 J.Jannot Original code ——————————————————————————- 27 Mar 2013 J.Jannot Fixed the CV equation ——————————————————————————- 01 Apr 2013 A.Hicks Changed the CV equation for ratio so that the observed mean is in the denominator ——————————————————————————- 26 Feb 2015 A.Hicks Changed the CV equations so that the observed mean is in the denominator _______________________________________________________________________________
Jason Jannot and Alan Hicks
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.