
Comparative habitat selection analysis using positioning and/or space use data
Source:R/1.7.14_function_comparative_habitat_selection.R
analyze_comparative_habitat_selection.Rd
Comparative habitat selection analysis using positioning and/or space use data
Usage
analyze_comparative_habitat_selection(
positioning_data = NULL,
space_use_data = NULL,
analysis_type = "both",
formula = presence ~ depth_m + fish_id + time_period,
sample_size = 10000,
ntree = 500,
depth_variable = "depth_m",
fish_id_variable = "fish_id",
time_variable = "time_period",
type_variable = "type",
n_depth_points = 100,
create_plots = TRUE,
create_comparison = TRUE
)
Arguments
- positioning_data
Presence-absence data from positioning analysis (optional)
- space_use_data
Presence-absence data from space use analysis (optional)
- analysis_type
Type of analysis ("positioning", "space_use", or "both")
- formula
Model formula (default: presence ~ depth_m + fish_id + time_period)
- sample_size
Number of points to sample per dataset (default: 10000)
- ntree
Number of trees in random forest (default: 500)
- depth_variable
Name of depth variable column (default: "depth_m")
- fish_id_variable
Name of fish ID variable column (default: "fish_id")
- time_variable
Name of time period variable column (default: "time_period")
- type_variable
Name of presence/absence type variable column (default: "type")
- n_depth_points
Number of depth points for prediction curves (default: 100)
- create_plots
Whether to create plots (default: TRUE)
- create_comparison
Whether to create comparison plots when both datasets provided (default: TRUE)