Skip to content

Commit

Permalink
Major Vignette Changes
Browse files Browse the repository at this point in the history
Major updates to the vignette after Gordon’s feedback
  • Loading branch information
dm13450 authored and dm13450 committed Dec 8, 2017
1 parent f19882c commit 3a85887
Show file tree
Hide file tree
Showing 104 changed files with 43,469 additions and 474 deletions.
Binary file removed .RData
Binary file not shown.
1 change: 0 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ Suggests: testthat,
Imports: gtools,
ggplot2,
mvtnorm
VignetteBuilder: knitr
RoxygenNote: 6.0.1
1 change: 1 addition & 0 deletions R/fit.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Fit.default <- function(dpObj, its, updatePrior = FALSE, progressBar=TRUE) {
}
}

dpObj$weights <- dpObj$pointsPerCluster / dpObj$n
dpObj$alphaChain <- alphaChain
dpObj$weightsChain <- weightsChain
dpObj$clusterParametersChain <- clusterParametersChain
Expand Down
2 changes: 1 addition & 1 deletion dirichletprocess.Rproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8

RnwWeave: knitr
RnwWeave: Sweave
LaTeX: pdfLaTeX

AutoAppendNewline: Yes
Expand Down
12 changes: 12 additions & 0 deletions tests/testthat/test_weibull_uniform_gamma.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@ test_that("Weibull Likelihood", {

})

test_that("Weibull Likelihood: Negative x", {

weibull_test_params_1 <- list(array(1, dim=c(1,1,1)), array(1, dim=c(1,1,1)))
weibull_test_params_2 <- list(array(.1, dim=c(1,1,1)), array(.1, dim=c(1,1,1)))
testEval <- sapply(seq(-10, -0.1, by=0.1), function(x) Likelihood(test_mdobj, x, weibull_test_params_1))
testEval2 <- sapply(seq(-10, -0.1, by=0.1), function(x) Likelihood(test_mdobj, x, weibull_test_params_2))

expect_true(all(testEval==0))
expect_true(all(testEval2==0))
})


test_that("Weibull Prior Density", {

expect_equal(PriorDensity(test_mdobj, matrix(c(1,1),ncol=2)), dunif(1, 0,1))
Expand Down
171 changes: 0 additions & 171 deletions vignettes/Custom-Distributions.Rmd

This file was deleted.

Loading

0 comments on commit 3a85887

Please sign in to comment.