The aim of package "
distrSim"
is to
provide a conceptual treatment of simulations of random variables
(r.v.'s) by means of distribution
classes from our package
"distr" .
These are grouped together with ``real world'' data as subclasses of
the mother class "
Dataclass"
which both may serve as input data for statistical procedures.
This mother class has slots
filename
(where the data is to be stored),
Data (the data),
samplesize
(the size of the sample),
obsDim
(the observation dimension), and
runs
(number of repetitions
of the experiment).
For simulations in the proper sense there is class "
Simulation" is
introduced with additional slots
seed (for the random number
generator to make the simulations reproducible;
thanks to Paul Gilbert's
setRNG),
distribution (the
distribution from which to sample, of class
Distribution from package
"distr")
For studies in Robust Statistics, we also derive a class "
Contsimulation" is
introduced with additional slots
Data.id (the data from the
ideal situation),
Data.c (the data from the contaminating situation),
ind (a indicator telling the
ideal from the contaminated observations),
rate (the probability for an
outlier to occur),
distribution.id and
distribution.c (the ideal and
contaminating distributions from which to sample; of class
Distribution from package
"distr")
For these classes special
plot,
print,
show and
summary methods are
available; all slots are accessed/modified by accessor/replacement
functions.
As generally, you are not interested in the figures of the simulations,
these are not saved by default, -- only the seed to reproduce them is
retained.
To (re)fill the data slot(s) you use the method
simulate.