# Example 1: usage with the iris dataset
result_iris <- mlob(
Sepal.Length ~ Sepal.Width + Petal.Length,
data = iris, group = 'Species',
conf.level = 0.01,
jackknife = FALSE)
# View summary statistics (similar to summary of a linear model);
summary(result_iris)
# Example 2: usage with slightly unbalanced ChickWeight dataset
if (FALSE) {
result_ChickWeight <- mlob(
weight ~ Diet,
data = ChickWeight,
group = 'Time',
punish.coeff = 1.5,
jackknife = FALSE)
# View the results
print(result_ChickWeight)
# View summary statistics
summary(result_ChickWeight)
}
# Example 3: usage with highly unbalanced mtcars dataset (adjusted balancing.limit)
result_mtcars <- mlob(
mpg ~ hp + wt + am + hp:wt + hp:am,
data = mtcars, group = 'cyl',
balancing.limit = 0.35)
# View summary statistics
summary(result_mtcars)
Run the code above in your browser using DataLab