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
1 parent
0b77416
commit 76a687a
Showing
22 changed files
with
1,045 additions
and
166 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Version 1.1: | ||
* Added function unifed.canonical.link to R/unifed.R | ||
* Added "canonical" to the possible links of unifed(). | ||
* Added unifed functions to use with stan | ||
* Added R/unifed.stan.path.R for getting the path to include in stan files. | ||
|
||
Version 1.0.2: | ||
* Fixed roxygen comments of R/unifed.kappa.R and | ||
R/unifed.deviance.R that were generating wrong Rd files. | ||
|
||
Version 1.0.1: | ||
* Fixed bug in function unifed.kappa.prime.inverse. It was giving | ||
the wrong sign for values smaller than 0.1 |
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 |
---|---|---|
@@ -1,18 +1,18 @@ | ||
Package: unifed | ||
Title: The Unifed Distribution | ||
Version: 1.0.2 | ||
Date: 2019-03-11 | ||
Version: 1.1.0 | ||
Date: 2019-05-17 | ||
Description: Probability functions and family for glm() of the unifed distribution (Quijano Xacur, 2018; <arXiv:1812.00251>). | ||
Depends: R (>= 3.1), methods | ||
License: GPL (>= 3) | ||
Encoding: UTF-8 | ||
LazyData: true | ||
RoxygenNote: 6.1.0 | ||
Suggests: knitr, rmarkdown, testthat, rstan | ||
RoxygenNote: 6.1.1 | ||
Suggests: knitr, rmarkdown, testthat, rstan, data.table | ||
VignetteBuilder: knitr | ||
Author: Oscar Alberto Quijano Xacur [aut,cre] | ||
Maintainer: Oscar Alberto Quijano Xacur <oscar.quijano@use.startmail.com> | ||
NeedsCompilation: yes | ||
Packaged: 2019-03-12 02:57:31 UTC; oscar | ||
Packaged: 2019-05-20 13:53:41 UTC; oscar | ||
Repository: CRAN | ||
Date/Publication: 2019-03-12 06:00:03 UTC | ||
Date/Publication: 2019-05-20 17:20:03 UTC |
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 |
---|---|---|
@@ -1,27 +1,35 @@ | ||
c4f7508e463c615351eb92065226212a *DESCRIPTION | ||
1f14593fdae9328057e53441f20653e6 *NAMESPACE | ||
fae84e5c585849b94446655fa95d6922 *ChangeLog | ||
4a405ba69cfa97b0d4cae9cd2e28dc8c *DESCRIPTION | ||
4d4d69c000d86b1b9f3c735181c288ca *NAMESPACE | ||
dfa125ee5b266fd3e2a47a8da47bcfa1 *R/dirwin.hall.R | ||
f2757132e44a7e2fc86e494e140e2fed *R/dunifed.R | ||
df13e6d7622d04f973aa7664ca130227 *R/doc-unifed_stan.R | ||
3810c704e8d8294233f8aabc3ea269b4 *R/dunifed.R | ||
e67fa11806ca3c759ac56553bd1f664c *R/summary_unifed_glm.R | ||
9df00b055204c5756274f0044d4d9d74 *R/unifed.R | ||
97048cb4ab69a87084e6e1c8df575e84 *R/unifed.R | ||
61adc440861f4334cb98cd158eb1f536 *R/unifed.deviance.R | ||
e436bbef2c1433749a3e26be7ca08c4c *R/unifed.kappa.R | ||
36631861ede43aec23726456eb859984 *R/unifed.stan.path.R | ||
7aa7d160accd44e2bc4ca44adc6de39c *R/unifed.varf.R | ||
d107da57f8fd4f8b5461dfda55901508 *R/zzz.R | ||
094d2e28bae1cf7c28860266973290b0 *README.md | ||
89fccd567e926662d80feaadf6998311 *build/vignette.rds | ||
0e57fd2f8b9ca3806b35e9e2b0164b97 *inst/doc/introduction_unifed.R | ||
aaaa8f6d17f32b4d0976394b3e7f23ec *inst/doc/introduction_unifed.Rmd | ||
153e5c2b117d6fc4821709cc5e50bab7 *inst/doc/introduction_unifed.html | ||
c44f50d6b6e3e778143d1eb546c148f7 *README.md | ||
1a4fc81a0a84a7b2213ee4a85e9fc001 *build/vignette.rds | ||
b055e618049cefa7ccae8c5c3a7207d9 *inst/doc/introduction_unifed.R | ||
1b245b107bcc83d963170693712efed3 *inst/doc/introduction_unifed.Rmd | ||
ec26f63b60c695f74d68352a4711e4a6 *inst/doc/introduction_unifed.html | ||
48764658f90c2ecc23dbaab161d73eca *inst/stan/unifed.stan | ||
4e8c0a0cc72788425161fc37173b4ea7 *man/dirwin.hall.Rd | ||
49c483775cff05601eefbaab98435570 *man/dunifed.Rd | ||
1d9a033a7ad29fdce341677cfde69dd9 *man/dunifed.Rd | ||
7cfe0eaf19949070341752b444c40cd3 *man/summary_unifed_glm.Rd | ||
58186ae61b2fb8ae4bc83cfb71eb6ce5 *man/unifed.Rd | ||
794dbd69adf63b38fa66f23d9c18ef86 *man/unifed.Rd | ||
7ec848a088f49baed7e0306d7b92f824 *man/unifed.deviance.Rd | ||
d947d0d1eeffacf630a71777278aa001 *man/unifed.kappa.Rd | ||
f23247936487979bba2a17db60723e2a *man/unifed.stan.Rd | ||
63d2733b217abfab8f6aa63c4439cb24 *man/unifed.stan.path.Rd | ||
fdbfca941463b82b7350772ab5fbabed *man/unifed.varf.Rd | ||
397dedc00189410e0157beab1cfb8b9b *src/unifed_kappa.c | ||
e2241c5c92234698d7ae027b0f24b5f6 *src/unifed_kappa.c | ||
1c790fe953ea9463feee4ca9e12e77be *tests/testthat.R | ||
bef324c7f169fb8c914dd9d2e9e8cc95 *tests/testthat/tests.r | ||
2d8ce114754786b08468d15627a48cf0 *vignettes/bibliography.bib | ||
aaaa8f6d17f32b4d0976394b3e7f23ec *vignettes/introduction_unifed.Rmd | ||
1b245b107bcc83d963170693712efed3 *vignettes/introduction_unifed.Rmd | ||
6b472202745e012ac175c3e6f3769749 *vignettes/unifed_example.stan | ||
6774582fd69a5ec5cae7545a23f882ff *vignettes/unifed_test.r |
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,55 @@ | ||
#' Stan functions for working with the unifed distribution | ||
#' | ||
#' @name unifed.stan | ||
#' | ||
#' @details | ||
#' | ||
#' A script with stan functions of the unifed is provided. The script | ||
#' can be included in stan code. The full path to the script can be | ||
#' obtained with the function \code{\link{unifed.stan.path}}. The | ||
#' following list are the names of functions that take one real value: | ||
#' | ||
#' \describe{ | ||
#' \item{\code{real unifed_kappa(real theta)}}{Computes the cumulant generator of the | ||
#' unifed distribution.} | ||
#' \item{\code{real unifed_kappa_prime(real theta)}}{Computes the first derivative of | ||
#' the cumulant generator.} | ||
#' \item{\code{real unifed_kappa_double_prime(real theta)}}{Computes the second | ||
#' derivative of the cumulant generator.} | ||
#' \item{\code{real unifed_lpdf(real x,real theta)}}{Computes the | ||
#' logarithm of the probability density function of a unifed | ||
#' distribution. \code{theta} is the value of the canonical | ||
#' parameter of the unifed and \code{x} if the value where the | ||
#' density is evaluated.} | ||
#' \item{\code{real unifed_quantile(real p,real theta)}}{Returns the | ||
#' p-th quantile of a unifed distribution with canonical parameter | ||
#' \code{theta}}. | ||
#' \item{\code{real unifed_rng(real theta)}}{Returns a simulated value | ||
#' of a unifed distribution with canonical parameter | ||
#' \code{theta}.} | ||
#' \item{\code{real unifed_lcdf(real x,real theta)}}{Computes the | ||
#' logarithm of the cumulative density function of a unifed | ||
#' distribution. \code{theta} is the value of the canonical | ||
#' parameter of the unifed and \code{x} if the value where the | ||
#' density is evaluated.} | ||
#' \item{\code{real unifed_kappa_prime_inverse(real mu)}}{Returns the | ||
#' inverse of the derivative of the unifed cumulant generator} | ||
#' \item{\code{real unifed_unit_deviance(real y,real mu)}}{Unit | ||
#' deviance function of the unifed.} | ||
#' } | ||
#' | ||
#' The following functions take vectors as arguments | ||
#' | ||
#' \describe{ | ||
#' \item{\code{vector unifed_kappa_v(vector theta)}}{Vectorized | ||
#' version of \code{unifed_kappa}.} | ||
#' \item{\code{vector unifed_kappa_prime_inverse_v(vector | ||
#' mu)}}{Vectorized version of \code{unifed_kappa_prime_inverse}.} | ||
#' \item{\code{void unifed_glm_lp(vector y, vector theta, vector | ||
#' weights)}}{Adds to the Log Probability Accumulator the | ||
#' logarithm of the likelihood function of a GLM with observed | ||
#' response \code{y}, estimated canonical parameter \code{theta} | ||
#' and weights \code{weights}.} } | ||
NULL | ||
|
||
## LocalWords: unifed cumulant stan lpdf Vectorized contant |
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,25 @@ | ||
#' Unifed Stan function paths | ||
#' | ||
#' The unifed.stan provided by the file contains functions for using | ||
#' the unifed distribution in stan. The file can be included (with | ||
#' #include) insided the functions block of a stan program or its | ||
#' contents can be copied and pasted. | ||
#' | ||
#' @return The full path to the unifed.stan file provided by the | ||
#' package. | ||
#' | ||
#' @export | ||
unifed.stan.path <- function(){ | ||
system.file("stan/unifed.stan",package="unifed") | ||
} | ||
|
||
#' @rdname unifed.stan.path | ||
#' @name unifed.stan.folder | ||
#' | ||
#' @return \code{unifed.stan.folder} returns a string containing the | ||
#' path to the folder containing the unifed.stan file. This can be | ||
#' used as the \code{isystem} parameter in stan functions. | ||
#' @export | ||
unifed.stan.folder <- function(){ | ||
system.file("stan/",package="unifed") | ||
} |
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
Binary file not shown.
Oops, something went wrong.