-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Completed the exact solutions for the mean and variance of the rth or…
…der statistics. Used multi-precision solution.
- Loading branch information
1 parent
78ab7cd
commit a619115
Showing
7 changed files
with
265 additions
and
58 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 |
---|---|---|
|
@@ -32,5 +32,6 @@ Suggests: | |
testthat, | ||
knitr, | ||
rmarkdown, | ||
MASS | ||
MASS, | ||
Rmpfr | ||
VignetteBuilder: knitr |
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
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.
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,20 +1,22 @@ | ||
test_that("triangle_cdfe works", { | ||
set.seed(10304) | ||
xtest <- rtriangle(100, 1, 5, 2) | ||
cdfe <- triangle_cdfe(xtest) | ||
xtest2 <- rtriangle(100, 1, 5, 2) | ||
cdfe <- triangle_cdfe(xtest2) | ||
|
||
expect_equal("nls", class(cdfe)) | ||
expect_output(print(cdfe)) | ||
expect_output(print(summary(cdfe))) | ||
expect_equal(3, length(coef(cdfe))) | ||
expect_true(coef(cdfe)[1] < coef(cdfe)[2]) | ||
expect_true(coef(cdfe)[1] <= min(xtest)) | ||
expect_true(coef(cdfe)[2] >= max(xtest)) | ||
expect_true(coef(cdfe)[1] <= min(xtest2)) | ||
expect_true(coef(cdfe)[2] >= max(xtest2)) | ||
expect_true(coef(cdfe)[3] <= coef(cdfe)[2]) | ||
expect_true(coef(cdfe)[3] >= coef(cdfe)[1]) | ||
expect_true(coef(cdfe)[3] >= min(xtest)) | ||
expect_true(coef(cdfe)[3] <= max(xtest)) | ||
expect_true(coef(cdfe)[3] >= min(xtest2)) | ||
expect_true(coef(cdfe)[3] <= max(xtest2)) | ||
|
||
if (requireNamespace("MASS", quietly = TRUE)) expect_equal(c(3, 2), dim(confint(cdfe))) | ||
# do this so MASS:::confint.nls can be used | ||
if (requireNamespace("MASS", quietly = TRUE)) { | ||
expect_equal(c(3, 2), dim(confint(cdfe))) | ||
} | ||
}) | ||
|
Oops, something went wrong.