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

Add "expit()" option for logit variables #26

Open
atredennick opened this issue Apr 17, 2024 · 1 comment
Open

Add "expit()" option for logit variables #26

atredennick opened this issue Apr 17, 2024 · 1 comment
Labels
needs SME input SEM = Subject Matter Expert

Comments

@atredennick
Copy link

This is very, very minor. I often use $\text{expit}(\beta)$ to reduce the width of my tables when I have logit-transformed variables. Then I define expit in the notes: expit = exp(x) / (1 + exp(x)). Would be convenient, though completely not necessary, to have an option to use expit short-hand to reduce table widths.

@barrettk barrettk added the needs SME input SEM = Subject Matter Expert label Feb 6, 2025
@barrettk
Copy link
Contributor

barrettk commented Feb 6, 2025

@KatherineKayMRG and I briefly discussed this, and Katherine plans to follow up with DARTS about the implementation of this.

  • Katherine proposed adding a new yaml short for "logitTrans" that would allow you to choose a shortened equation. Something like the following here:
    greek = dplyr::case_when(
        TH & LOG ~ expGreek(text, num2),
        TH & LOGIT_SHORT ~ logitGreekShort(text, num2),
        TH & LOGIT ~ logitGreek(text, num2),

This would require making a new shortened function here and would implicate other spots, like this function.

This suggestion, while easy for users to implement, is unfortunate within pmparams because we would have to check for LOGIT or LOGIT_SHORT for doing the same math (only one can be true in the yaml, which feels counterintuitive when displayed as the output from define_param_table()).

  • If we implement this approach we may want to create a new column under the hood that's used for the math (for clarity purposes), and only use LOGIT and LOGIT_SHORT for getting the correct latex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs SME input SEM = Subject Matter Expert
Projects
None yet
Development

No branches or pull requests

2 participants