Closed larryshamalama closed 1 month ago
Here is a sketch of what and how the existing code would have to be modified
causens <- function(...) { ... result <- list(estimated_ate = estimated_ate) class(result) <- "causens" return(result) }
The following works via S3 dispatch
summary.causens <- function(causens_object, ...) { cat("Summary of Causal Effect Analysis\n") cat("=================================\n") cat(sprintf("Estimated Average Treatment Effect (ATE): %f\n", causens_object$estimated_ate)) invisible(object) }
Probably good to also do this with plot
plot
Here is a sketch of what and how the existing code would have to be modified
The following works via S3 dispatch