| generate_report_chamming | R Documentation |
This function takes a dataframe, a factor or factors (two or more) and returns a Microsoft Word document about the Hamming distances matrix or matrices (two or more) and the p-values matrix or matrices (two or more).
generate_report_chamming(
dataset,
formula,
pvalue.method = "permutation",
seed = NULL,
min_group_size = 3,
num_replicas = 1000,
automatic_encoding = TRUE,
na_removal = TRUE,
grouping_stat = "mean"
)
dataset |
A dataframe. |
formula |
A variable or variables (two or more) with factors which you want to calculate the Hamming distances matrix or matrices (two or more) and the p_values matrix or matrices (two or more). |
pvalue.method |
A p_value method used to calculate the matrix or matrices (two or more), the default value is "permutation". Another method is "bootstrap". |
seed |
Optionally, set a seed for "bootstrap" and "permutation". |
min_group_size |
Minimum group size to maintain. The default value is 3, therefore groups, inside variables, with less than 3 observations will be discarded. |
num_replicas |
Number of permutations or bootstraps trials, the default value is 1000. |
automatic_encoding |
Logical, if TRUE, names inside factor variables will be transformed in numbers with ordinal order (1,2,....). |
na_removal |
Logical, if TRUE, missing value removal on rows is performed. |
grouping_stat |
When a factor variable is specified, calculate the specified grouping statistic for each factor. Available methods are: mean (arithmetic mean), median and SDS (standard deviations). |
A Microsoft Word document about the Hamming distances matrix or matrices (two or more) and the p_values matrix or matrices (two or more).
About pvalues, this function leverages on an early stopping procedure in which the resulting matrix is printed also if the specified number of replicas is not reached; if every 500 replicas the maximum difference between each p_value does not exceed 0.0001, the function will print the entire matrix, else it continues.
generate_report_chamming(CO2, ~Plant + Type,
pvalue.method = "permutation",
seed = 122,
num_replicas = 10,
grouping_stat = 'median',
automatic_encoding = TRUE)
generate_report_chamming(airquality, ~Ozone,
pvalue.method = 'bootstrap',
na_removal = TRUE, num_replicas = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.