The app samples with a function SimulateData from a normal distribution with a mean of zero and a standard deviation as defined by the user.The user can define the number of samples, the number of observations within each sample and the alpha risk. The set.seed is set to 1234 if seed=TRUE, allowing to compare multiple simulations.
SimulateData<-function(stdev,nsamples,nobs,alphavalue,seed){
if (seed) {set.seed(1234)}
SimulateData<-matrix(rnorm(nsamples*nobs,0,stdev),nrow=nobs,ncol=nsamples)
Simulations<-SimulateData
return(Simulations)
}
X<-SimulateData(3,100,50,5,FALSE)
The Sampling Matrix X is a random sample from the normal distribution, with Nsamples Columns and Nobs rows. This is evident from the dimensions of X:
## [1] 50 100