mv_regression_partition.Rd
This function performs multivariate regression partitioning
using the mvpart R package (mvpart::mvpart()
).
It takes in a data frame of count data, a data frame of sample level
information, and various optional arguments, and returns a list of outputs
including the multivariate regression tree object, the change points, the
partition assignments, and the number of groups.
mv_regression_partition(
data_source_counts,
data_source_levels,
rand = 1000,
transformation = c("chisq", "hellinger", "none")
)
Data frame with pollen data. Each row represents
one level (sample) and each column represents one taxon. Table must contain
sample_id
column with unique values corresponding to data_source_levels
Data frame with level ages, with each row
representing one level (sample). The table must contain two columns:
sample_id
with unique values corresponding to data_source_levels
,
and age
with ages of each level
The number of times to randomly split the data to determine the optimal tree.
Selection of data transformation options. hellinger
=
Hellinger, chisq
= Chisq, none
= without transformation. Both Hellinger
and Chisq are recommended for proportional/percentage data
A list containing the following items:
mrt_result
The multivariate regression tree object.
change_points
The change points in the regression tree.
partitions
The partition assignments for each sample.
mrt_groups
The number of groups in the partitioning.
mrt_groups_per_sample
The number of groups per sample.
mvpart::mvpart()