The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
This vignette illustrates a typical use-case in which the package helps to discover a cause for non-reproducibility in a simulation study.
First, we generate conditions for a simulation. These vary a sample
size and a true correlation rho
. Second, we define a
function that simulates data for two normally-distributed variables for
a given simulation condition, and returns an estimate of the Pearson
correlation of the two variables:
conditions <- expand.grid(N=c(50,100),rho=c(0,0.25,0.5), iter=1:10)
compute_correlation <- function(N, rho, ...) {
N<-100
r=0
data <- MASS::mvrnorm(n=N, mu=c(0,0), Sigma=matrix(c(1,r,r,1),nrow=2))
cor(data[,1],data[,2])
}
✅compute_correlation: REPRODUCTION SUCCESSFUL
✅conditions: REPRODUCTION SUCCESSFUL
Last, we call the function for every simulation condition to obtain the estimates for all simulation conditions.
❌.Random.seed: REPRODUCTION FAILED Fingerprints are not identical.
❌results: REPRODUCTION FAILED Fingerprints are not identical.
Note that the first code chunk reproduces fine while second code
chunk does not. This is because the simulation did not specify a random
seed, so the random numbers are different every time the document is
generated. This is caught by using the reproducibleR
chunk.
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.