loop_regression_tree: Loop the regression tree analysis with specified number of...

View source: R/loop.regression.tree.R

loop_regression_treeR Documentation

Loop the regression tree analysis with specified number of splits

Description

loop.regression.tree This function loops the run_regression_tree function

Usage

loop_regression_tree(
  LF,
  fcol,
  lcol,
  bins,
  Nsplit,
  save_dir,
  select_matrix,
  lat.min = 1,
  lon.min = 1,
  year.min = 1,
  quarter = TRUE,
  year = FALSE,
  include_dummy = FALSE,
  pdf = FALSE,
  lf_scale = 1.5
)

Arguments

LF

The length frequency data frame input; must include four columns: lat, lon, year, and quarter

fcol

The first column in the data frame with length frequency info

lcol

The last column in the data frame with length frequency info

bins

Names of all bins included in LF

Nsplit

The number of splits

save_dir

The directory where results will be saved

select_matrix

User-specified split matrix to be explored

quarter

Whether to consider quarter as a splitting dimension; default = TRUE

year

Whether to consider year as a splitting dimension; default = FALSE

include_dummy

Whether to include dummy data; default = FALSE

pdf

Whether to save figures in pdf - default is in png

lf_scale

scale mean lf plot

Value

return the input LF with cell number and the percentage of total LF variance explained by each split


HaikunXu/RegressionTree documentation built on Jan. 25, 2025, 12:08 a.m.