fm_load_data.Rd
Load and prepare data for model fitting
character Species of interest
character Fleet chosen according to the species of interest. A fleet is considered to have homogeneous catchability and targeting behavior.
character Type of the data to be fitted to the model (either `biomass` for biomass data - positive-continuous data - or `presabs` for presence-absence data). Default is `biomass`
data.frame Dataframe containing the scientific (survey) data
data.frame Dataframe containing the commercial (vmslogbook) data
data.frame Dataframe containing the data describing the study area
integer Starting year
integer Ending year
integer Starting month
integer Ending month
character Time step for the model (either `Month` for monthly time step or `Quarter` for quarterly time step). Default is `Month`
numeric Parameter controlling the number of knots of the mesh. The higher the denser.
numeric Limitation of the grid for the spatial domain
integer The seed controlling for random effect. Default is 29510.
list A named list of all necessary outputs for model fitting (`fm_fit_model()`)
# \donttest{
# run part1
survey_data_file <- system.file("original_data",
"Solea_solea",
"survey_data.Rds",
package = "FishMap"
)
survey_data <- readr::read_rds(file = survey_data_file)
vmslogbook_data_file <- system.file("original_data",
"Solea_solea",
"vmslogbook_data.Rds",
package = "FishMap"
)
vmslogbook_data <- readr::read_rds(file = vmslogbook_data_file)
study_domain_file <- system.file("original_data",
"Solea_solea",
"study_domain.Rds",
package = "FishMap"
)
study_domain <- readr::read_rds(file = study_domain_file)
fm_data_inputs <- fm_load_data(species = "Solea_solea",
fleet = c("OTB_DEF_>=70_0","OTB_CEP_>=70_0","OTT_DEF_>=70_0"),
fitted_data = "biomass",
survey_data = survey_data,
vmslogbook_data = vmslogbook_data,
study_domain = study_domain,
year_start = 2018,
year_end = 2018,
month_start = 11,
month_end = 11,
time_step = "Month",
k = 0.25,
grid_xmin = -6,
grid_xmax = 0,
grid_ymin = 42,
grid_ymax = 48)
#> Running step 1 -loading data-
#> as(<dgCMatrix>, "dgTMatrix") is deprecated since Matrix 1.5-0; do as(., "TsparseMatrix") instead
#> Joining with `by = join_by(Year, Month)`
#> Joining with `by = join_by(Month, Year, Year_Month)`
#> Joining with `by = join_by(layer, cell)`
#> Joining with `by = join_by(layer, cell)`
#> Joining with `by = join_by(layer, cell)`
#> Step 1 -loading data-: 18.163 sec elapsed
# }