# 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 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)
#' # Example 3: Using all available S3 methods on slightly unbalanced ChickWeight dataset
result <- mlob(weight ~ Time, data = ChickWeight, group = 'Diet', jackknife = FALSE)
# Display methods
print(result) # Display results
summary(result) # Comprehensive summary
coef(result) # Extract coefficients
se(result) # Extract standard errors
vcov(result) # Extract variance-covariance matrix
confint(result) # Extract confidence intervals
confint(result, "beta_b") # Extract CI for specific parameter
confint(result, level = 0.99) # Extract CI with different confidence level
as.data.frame(result) # Convert to data frame
dim(result) # Get dimensions
length(result) # Get number of parameters
names(result) # Get parameter names
# Update model with new parameters
update(result, conf.level = 0.99)
# List all available methods
methods(class = "mlob_result")
Run the code above in your browser using DataLab