Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dealing with commented code in standardize models function #333

Open
IndrajeetPatil opened this issue Dec 12, 2022 · 2 comments
Open

Dealing with commented code in standardize models function #333

IndrajeetPatil opened this issue Dec 12, 2022 · 2 comments
Assignees
Labels
Upkeep 🧹 maintenance

Comments

@IndrajeetPatil
Copy link
Member

Can this be deleted?

# if (is.numeric(y_data[[x$treat]]) || is.numeric(m_data[[x$treat]])) {
# if (!(is.numeric(y_data[[x$treat]]) && is.numeric(m_data[[x$treat]]))) {
# stop("'treat' variable is not of same type across both y and m models.",
# "\nCannot consistently standardize.", call. = FALSE)
# }
#
# temp_vals <- .rescale_fixed_values(c(control.value, treat.value), x$treat,
# y_data = y_data, m_data = m_data,
# y_data_std = y_data_std, m_data_std = m_data_std)
#
# control.value <- temp_vals[1]
# treat.value <- temp_vals[2]
# if (verbose) message("control and treatment values have been rescaled to their standardized scales.")
# }

@IndrajeetPatil
Copy link
Member Author

bump

@mattansb
Copy link
Member

Could you keep this? This was my attempt to deal with some edge case... Currently, we give a warning:

if (verbose && !all(c(control.value, treat.value) %in% c(0, 1))) {
insight::format_warning(
"Control and treat values are not 0 and 1, and have not been re-scaled.",
"Interpret results with caution."
)
}

I would like to someday try again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Upkeep 🧹 maintenance
Projects
None yet
Development

No branches or pull requests

3 participants