-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
) * add first pass at dist lookup * add look ups and tests second pass * fix checks * update news entry to be easier to read * improve docs for dist and primary id * close testing gaps * update family for datasets
- Loading branch information
Showing
30 changed files
with
465 additions
and
39 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
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,33 @@ | ||
#' Supported delay distributions | ||
#' | ||
#' A dataset containing information about the supported delay distributions in | ||
#' primarycensored. Includes both distributions with base R implementations and | ||
#' those only available in Stan. Distributions beyond these are not supported | ||
#' in the stan code but any user functions can be used in the R code. | ||
#' | ||
#' @format A data.frame with 17 rows and 4 columns: | ||
#' \describe{ | ||
#' \item{name}{Distribution name} | ||
#' \item{pdist}{R distribution function name (e.g. plnorm), NA if there is no | ||
#' base R implementation} | ||
#' \item{aliases}{Alternative names/identifiers} | ||
#' \item{stan_id}{Stan distribution ID used in the stan code} | ||
#' } | ||
#' @family utils | ||
"pcd_distributions" | ||
|
||
#' Supported primary event distributions | ||
#' | ||
#' A dataset containing information about the supported primary event | ||
#' distributions in primarycensored. Distributions beyond these are not | ||
#' supported in the stan code but any user functions can be used in the R code. | ||
#' | ||
#' @format A data.frame with 2 rows and 4 columns: | ||
#' \describe{ | ||
#' \item{name}{Distribution name} | ||
#' \item{dprimary}{R density function name} | ||
#' \item{aliases}{Alternative names/identifiers} | ||
#' \item{stan_id}{Stan distribution ID used in the stan code} | ||
#' } | ||
#' @family utils | ||
"pcd_primary_distributions" |
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
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,34 @@ | ||
pcd_distributions <- data.frame( | ||
name = c( | ||
"lnorm", "gamma", "weibull", "exp", "gengamma", "nbinom", | ||
"pois", "bern", "beta", "binom", "cat", "cauchy", "chisq", | ||
"dirich", "gumbel", "invgamma", "logis" | ||
), | ||
pdist = c( | ||
"plnorm", "pgamma", "pweibull", "pexp", NA, "pnbinom", | ||
"ppois", NA, "pbeta", "pbinom", NA, "pcauchy", "pchisq", | ||
NA, "pgumbel", NA, "plogis" | ||
), | ||
aliases = c( | ||
"lognormal", "gamma", "weibull", "exponential", "generalized gamma", | ||
"negative binomial", "poisson", "bernoulli", "beta", "binomial", | ||
"categorical", "cauchy", "chi-square", "dirichlet", "gumbel", | ||
"inverse gamma", "logistic" | ||
), | ||
stan_id = 1:17, | ||
stringsAsFactors = FALSE | ||
) | ||
|
||
pcd_primary_distributions <- data.frame( | ||
name = c("unif", "expgrowth"), | ||
dprimary = c("dunif", "dexpgrowth"), | ||
aliases = c("uniform", "exponential growth"), | ||
stan_id = 1:2, | ||
stringsAsFactors = FALSE | ||
) | ||
|
||
usethis::use_data( | ||
pcd_distributions, | ||
pcd_primary_distributions, | ||
overwrite = TRUE | ||
) |
Binary file not shown.
Binary file not shown.
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 |
---|---|---|
|
@@ -66,6 +66,7 @@ pcd | |
pcens | ||
pdist | ||
pearsonca | ||
plnorm | ||
pprimarycensored | ||
precalculation | ||
primaryeventdistributions | ||
|
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.
Oops, something went wrong.