Learn R Programming

fishmethods (version 1.3-0)

pstrat: Post-stratification of Marine Recreational Fisheries Statistics Survey Estimates of Catch

Description

Post-stratified catch and variance estimates are generated from the original intercept data and catch & effort estimates provided by the Marine Recreational Fisheries Statistics Survey (MRFSS).

Usage

pstrat(intdir = NULL, estdir = NULL, pstdir = NULL, state = NULL,
 year = NULL, stwave = NULL, endwave = NULL, psfactor = NULL)

Arguments

intdir
the path and main directory (in quotes) under which raw intercept sub-directories are stored.
estdir
the path and main directory (in quotes) under which catch/effort sub-directories are stored.
pstdir
the path and main directory (in quotes) under which post-stratified estimates will be stored. The program will store the post-stratification estimates as a .csv file under a subdirectory named pestyear.
year
year of data to include.
state
state(s) code of data to include. A complete list of state codes is provided at the MRFSS website. Atlantic and Gulf States: 23= ME, 33= NH, 25= MA, 44= RI, 9= CT, 36= NY, 34= NJ, 10= DE, 24= MD, 51= VA, 37= NC, 45= SC, 13= GA, 12= FL (1
stwave
bimothly wave(s) of data to include. Bimothly Waves: 1= Jan-Feb, 2= Mar-Apr, 3= May-Jun, 4= Jul-Aug, 5= Sept-Oct, and 6= Nov-Dec. Any combination of waves can be included in c().
endwave
last bimonthly wave of data to include.
psfactor
name of dataframe with poststratification variable(s)

Value

  • Post-stratified estimates from each year and wave are written to comma-delimited (.csv) files and are stored under the pestdir directory as AG_yyyywv.csv (e.g., AG_20075.csv).

Details

Raw intercept data and catch/effort estimates must be extracted using function extractMRFSS. Post-stratification methodology follows the SAS post-stratification program available from MRFSS. A dataframe must be created that contains the MRFSS variable(s) linked to the variable AREA.G which identifies the post-stratification scheme. As a first example, the State of Massachusetts post-stratifies catch estimates by county to examine regional fishing harvest. The MRFSS variable CNTY is used to group the regions. To code the post-stratification variable, a dataframe containing CNTY numbers and the associated grouping labels under variable AREA.G is created as follows: post<-data.frame(CNTY=c(9,21,25,23,1,7,5,18,17,27), AREA.G=c("A","B","C","D","E","F","G","H","Y","Y")) Each AREA.G label is matched to a specific county. AREA.G must be the name of the grouping label. More than one variable (other than CNTY) can be used to parse the data into more specific strata by creating an additional column in the dataframe. As a second example, the State of Florida post-stratifies catch estimates into four regions (Northeast, Southeast, Southwest and Northwest Florida) related to spotted seatrout (Cynoscion nebulosus) management. The coding for the four regions uses CNTY to create groupings: post<-data.frame(CNTY=c(89,31,109,35,19,107,127,9,61,111,85, 99,11,25,87,21,51,71,15,27,115,81, 57,103,101,53,17,75,1,29,123,65,129,37, 77,45,5,133,131,91,113,33 ), AREA.G=c("N","N","N","N","N","N", "S","S","S","S","S","S","S", "S","S","S","S","S","S","S", "S","S","S","S","N","N","N", "N","N","N","N","N","N","N", "N","N","N","N","N","N","N", "N")) Notice that there are not four AREA.G labels for the different areas because post-stratification is automatically performed over the sub-region variable (Florida East Coast SUB.REG=6 and Florida West Coast is SUB.REG=7). For states with only one SUB.REG code, four AREA.Glabels would need to be created. The AREA.S variable, which is the AREA.G and AREA.X labels combined, is created in the output file and designates the post-stratification levels. All variables coded found in the MRFSS Recreational Fisheries Data User's Manual.

References

Marine Recreational Fisheries Statistics Survey - Recreational Fisheries Data User's Manual http://www.st.nmfs.noaa.gov/st1/recreational/SurveyMaterials.html

See Also

extractMRFSS

Examples

Run this code
## An example of code - not a working example
post<-data.frame(CNTY=c(9,21,25,23,1,7,5,18,17,27),
            AREA.G=c("A","B","C","D","E","F","G","H","Y","Y"))

pstrat(intdir="C:/Temp", estdir="C:/Temp",pstdir="C:/Temp",state=25,
  year=2007,stwave=2,endwave=6,psfactor=post)

Run the code above in your browser using DataLab