-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
67 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ export(avg_RR_logit) | |
export(cicc_AR) | ||
export(cicc_RR) | ||
export(cicc_plot) | ||
export(trim_pr) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#' @title Trimming the estimates to be strictly between 0 and 1 | ||
#' | ||
#' @description Trimming the estimates to be strictly between 0 and 1 | ||
#' | ||
#' @param ps n-dimensional vector of estimated probabilities | ||
#' @param eps a small constant that determines the trimming of the estimated probabilities. | ||
#' Specifically, the estimate probability is trimmed to be between eps and 1-eps (default = 1e-8). | ||
#' | ||
#' @return | ||
#' \item{ps_tr}{n-dimensional trimmed estimates} | ||
#' | ||
#' @export | ||
trim_pr = function(ps, eps=1e-8){ | ||
|
||
ps_tr = eps*(ps < eps) + ps*(ps >= eps)*(ps <= 1-eps) + (1-eps)*(ps > 1-eps) | ||
|
||
ps_tr | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.