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 upper and lower CI quantile 0.025 and 0.975 to stats tibbles #187

Closed
spsanderson opened this issue May 18, 2022 · 0 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@spsanderson
Copy link
Owner

Lower CI
Functions:

ci_lo <- function(x, na.rm = FALSE){
  unname(stats::quantile(x, 0.025, na.rm = na.rm))
}
ci_hi <- function(x, na.rm = FALSE){
  unname(stats::quantile(x, 0.975, na.rm = na.rm))
}

Example:

x <- rnorm(1000, mean = 0, sd = 1)
> ci_lo(x)
[1] -2.045667

> ci_hi(x)
[1] 2.04782
@spsanderson spsanderson added the enhancement New feature or request label May 18, 2022
@spsanderson spsanderson added this to the TidyDensity v1.2.0 milestone May 18, 2022
@spsanderson spsanderson self-assigned this May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant