Learn R Programming

easynem (version 1.0.3)

LSD2: Multiple comparisons, "Least significant difference" and Adjust P-values (two-factor)

Description

The LSD2() is used to perform "Least significant difference" for grouped data and create compare2-class. This function is only applicable to two-factor analysis, see LSD for a single factor version of the function.

Usage

LSD2(data, .group1, .group2, y, ...)

Value

An compare2-class object.

Arguments

data

An easynem-class data.

.group1

Grouping variables factor 1.

.group2

Grouping variables factor 2.

y

Dependent variable (numeric data).

...

Other parameters for LSD.test.

Details

To facilitate code interpretation, It is recommended to use this function in conjunction with the calc_compare2 function:

nem_compare <- nem |> calc_compare2(.group1 = con_crop, .group2 = season, y = pH, method = LSD2)

See Also

Other functions related to differential analysis methods: TTest2, TTest, WilcoxTest2, WilcoxTest, KruskalTest2, KruskalTest, LSD, HSD, HSD2.

Examples

Run this code
nem <- read_nem(tab = easynem_example("nemtab1.csv"),
                tax = easynem_example("nemtax1.csv"),
                meta = easynem_example("nemmeta1.csv"))
nem_test <- nem |>
              calc_compare2(.group1 = con_crop, .group2 = season, y = pH, method = LSD2)
nem_test

Run the code above in your browser using DataLab