-
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.
- Loading branch information
nvietto
committed
Jan 31, 2025
1 parent
87c4c6e
commit 2bfe74d
Showing
6 changed files
with
42 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 |
---|---|---|
@@ -1,50 +1,53 @@ | ||
distributions <- list( | ||
small = function() { # using a function keeps values mutable, allowing set.seed to work | ||
small = function() { | ||
data.frame( | ||
norm = rnorm(n = 100, mean = 50, sd = 15), | ||
norm2 = rnorm(n = 100, mean = 60, sd = 10), # Smaller spread normal dist | ||
norm3 = rnorm(n = 100, mean = 40, sd = 20), # Larger spread normal dist | ||
binom = rbinom(n = 100, size = 1, prob = 0.20), | ||
norm_2 = rnorm(n = 100, mean = 60, sd = 10), | ||
norm_3 = rnorm(n = 100, mean = 40, sd = 20), | ||
binom = rbinom(n = 100, size = 1, prob = runif(n = 100, min = 0, max = 1)), | ||
neg = rnbinom(n = 100, size = 1, prob = 0.50), | ||
pois = rpois(n = 100, lambda = 3), | ||
exp = rexp(n = 100, rate = 0.10), | ||
unif = runif(n = 100, min = 0, max = 1), | ||
beta = rbeta(n = 100, shape1 = 2, shape2 = 5), | ||
gamma = rgamma(n = 100, shape = 2, scale = 2), | ||
chisq = rchisq(n = 100, df = 2), | ||
t_dist = rt(n = 100, df = 10) | ||
chi_sq = rchisq(n = 100, df = 2), | ||
t_dist = rt(n = 100, df = 10), | ||
f_dist =rf(n = 100, df1 = 10, df2 = 10) | ||
) | ||
}, | ||
medium = function() { | ||
data.frame( | ||
norm = rnorm(n = 1000, mean = 50, sd = 15), | ||
norm2 = rnorm(n = 1000, mean = 60, sd = 10), | ||
norm3 = rnorm(n = 1000, mean = 40, sd = 20), | ||
binom = rbinom(n = 1000, size = 1, prob = 0.20), | ||
norm_2 = rnorm(n = 1000, mean = 60, sd = 10), | ||
norm_3 = rnorm(n = 1000, mean = 40, sd = 20), | ||
binom = rbinom(n = 1000, size = 1, prob = runif(n = 1000, min = 0, max = 1)), | ||
neg = rnbinom(n = 1000, size = 1, prob = 0.50), | ||
pois = rpois(n = 1000, lambda = 3), | ||
exp = rexp(n = 1000, rate = 0.10), | ||
unif = runif(n = 1000, min = 0, max = 1), | ||
beta = rbeta(n = 1000, shape1 = 2, shape2 = 5), | ||
gamma = rgamma(n = 1000, shape = 2, scale = 2), | ||
chisq = rchisq(n = 1000, df = 5), | ||
t_dist = rt(n = 1000, df = 20) | ||
chi_sq = rchisq(n = 1000, df = 5), | ||
t_dist = rt(n = 1000, df = 20), | ||
f_dist =rf(n = 1000, df1 = 10, df2 = 10) | ||
) | ||
}, | ||
large = function() { | ||
data.frame( | ||
norm = rnorm(n = 10000, mean = 50, sd = 15), | ||
norm2 = rnorm(n = 10000, mean = 60, sd = 10), | ||
norm3 = rnorm(n = 10000, mean = 40, sd = 20), | ||
binom = rbinom(n = 10000, size = 1, prob = 0.20), | ||
norm_2 = rnorm(n = 10000, mean = 60, sd = 10), | ||
norm_3 = rnorm(n = 10000, mean = 40, sd = 20), | ||
binom = rbinom(n = 10000, size = 1, prob = runif(n = 10000, min = 0, max = 1)), | ||
neg = rnbinom(n = 10000, size = 1, prob = 0.50), | ||
pois = rpois(n = 10000, lambda = 3), | ||
exp = rexp(n = 10000, rate = 0.10), | ||
unif = runif(n = 10000, min = 0, max = 1), | ||
beta = rbeta(n = 10000, shape1 = 2, shape2 = 5), | ||
gamma = rgamma(n = 10000, shape = 2, scale = 2), | ||
chisq = rchisq(n = 10000, df = 10), | ||
t_dist = rt(n = 10000, df = 30) | ||
chi_sq = rchisq(n = 10000, df = 10), | ||
t_dist = rt(n = 10000, df = 30), | ||
f_dist =rf(n = 10000, df1 = 10, df2 = 10) | ||
) | ||
} | ||
) |
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 |
---|---|---|
@@ -1,3 +1,15 @@ | ||
## Minor Update | ||
|
||
In this update I have: | ||
|
||
* Added support for the F distribution. | ||
|
||
* Fixed incorrect binomial aliases in the documentation. | ||
|
||
* Introduced a variability parameter to the binomial distribution. | ||
|
||
* Corrected notation errors (e.g., norm2 instead of norm_2) | ||
|
||
## R CMD check results | ||
|
||
0 errors | 0 warnings | 0 note |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,4 +1,5 @@ | ||
Version: 1.0 | ||
ProjectId: 053bde2d-6c5b-4af1-ba7f-2055d8384156 | ||
|
||
RestoreWorkspace: No | ||
SaveWorkspace: No | ||
|